What Prompt Optimization Is
Prompt programs, evaluators, traces, and why the unit of improvement is a workflow.
A short introduction to
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
GEPA / MIPROv2 / evals / agents
promptoptbook.com
Abstract
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
Prompt programs, evaluators, traces, and why the unit of improvement is a workflow.
Datasets, rubrics, task containers, flaky metrics, and the line between signal and leaderboard noise.
Reflective prompt evolution, candidate selection, edit proposals, and offline optimization loops.
Instruction and demonstration search, Bayesian proposal policies, and budget-aware prompt tuning.
How prompt optimization changes for multi-step tools, browser work, code agents, and long-horizon tasks.
Regression gates, monitoring, rollback, provenance, and when an optimized prompt is safe to ship.
Companions
Changelog
Citation
@book{promptopt2026purtell,
author = {Josh Purtell},
title = {Prompt Optimization},
year = {2026},
publisher = {Online},
url = {https://promptoptbook.com}
}