A short introduction to

Prompt Optimization

A book about turning prompts into measurable systems: GEPA, MIPROv2, evaluation design, agent traces, and the deployment habits that make optimized prompts reliable.

Josh Purtell

book draft

Prompt
Optimization

GEPA / MIPROv2 / evals / agents

promptoptbook.com

Abstract

A practical recipe for improving prompts.

Prompt optimization is the discipline of improving language-model behavior against an explicit task, dataset, judge, or environment. It begins where prompt engineering usually stops: with a repeatable measurement loop.

This book will introduce the core workflow for prompt optimization, from task definition and evaluation design through offline search with GEPA, instruction and demonstration optimization with MIPROv2, and deployment gates for production agents.

The focus is practical. The goal is to help readers build optimization loops that produce better prompts without confusing benchmark gains for reliable product behavior.

Chapters

Draft table of contents

01

What Prompt Optimization Is

Prompt programs, evaluators, traces, and why the unit of improvement is a workflow.

02

Evaluation First

Datasets, rubrics, task containers, flaky metrics, and the line between signal and leaderboard noise.

03

GEPA

Reflective prompt evolution, candidate selection, edit proposals, and offline optimization loops.

04

MIPROv2

Instruction and demonstration search, Bayesian proposal policies, and budget-aware prompt tuning.

05

Agents

How prompt optimization changes for multi-step tools, browser work, code agents, and long-horizon tasks.

06

Deployment

Regression gates, monitoring, rollback, provenance, and when an optimized prompt is safe to ship.

Companions

Resources

Changelog

Status

June 2026
Initial public shell: abstract, chapter map, companion resources, and citation.
Next
Draft chapters on GEPA, MIPROv2, evaluator design, and production deployment.

Citation

Reference

@book{promptopt2026purtell,
  author = {Josh Purtell},
  title = {Prompt Optimization},
  year = {2026},
  publisher = {Online},
  url = {https://promptoptbook.com}
}