ESPO: Error-Structured Prompt Optimization via Diagnose, Diversify, and Stabilize
AuthorsLihao Liu, Peng Tang, Kunwar Yashraj Singh, Shabnam Ghadar
Resources
ESPO makes evolutionary prompt optimization more accurate, shorter, and more reliable by diagnosing errors, diversifying candidate prompts, and selecting them with bootstrap stability.
Key results
Average accuracy across seven benchmarks with Claude Sonnet 4.5
Baseline average accuracy across the same seven benchmarks
ESPO reduces average prompt length from 1878 to 1004 characters
Accuracy achieved by ESPO on Qwen3 32B for GSM8K
Accuracy change when adding proposal diversity without bootstrap selection
What the paper found
ESPO, or Error-Structured Prompt Optimization, replaces GEPA’s append-and-select evolutionary loop with three stages: Diagnose clusters all training errors into 3–7 structural failure patterns, Propose generates candidates through four complementary strategies—diagnostic revision, consolidation, ablation, and factual injection—and Select uses 20 bootstrap resamples to choose the most stable prompt. Across Tweet, MMLU, GSM8K, HotpotQA, ScoNe, HoVer, and PUPA, evaluated with Claude Sonnet 4.5 on deliberately weak starting instructions, ESPO reaches 74.67% average accuracy versus GEPA’s 70.91%, a 3.76-percentage-point gain, while reducing average prompt length by 47%, from 1878 to 1004 characters, with equal or lower inference latency. The method generalizes across Gemma 3 12B, Mistral 14B, Qwen3 32B, and Claude Haiku 4.5; its largest improvement occurs on Qwen3 GSM8K, where accuracy rises from 15.00% by default to 91.40% with ESPO. Ablations show that diversity alone can reduce accuracy by 1.20%, supporting the claim that candidate diversification requires reliable bootstrap selection. Theoretical analysis links diagnosis, proposal diversity, and stability selection to bias reduction, exploration gain, and lower selection error, while limitations include optimization-time evaluation cost and dependence on LLM-generated error clustering.
Original abstract
Evolutionary prompt optimizers such as GEPA suffer from prompt bloat: each iteration appends rules and caveats, producing prompts up to 3$\times$ longer yet no more accurate. We trace this to three deficiencies - incomplete error observation, limited search diversity, and unreliable selection - and propose ESPO (Error-Structured Prompt Optimization), which decomposes prompt optimization into three phases: Diagnose clusters all training errors into structural patterns in one round; Propose generates candidates via four complementary strategies with independent biases; Select applies bootstrap stability selection. On seven public NLP benchmarks - Tweet, MMLU, GSM8K, HotpotQA, ScoNe, HoVer, and PUPA - ESPO improves average accuracy by $+$3.76 pp over the state-of-the-art (74.67% vs 70.91% for GEPA), matching or exceeding GEPA on every dataset while producing prompts 47% shorter (1,004 vs 1,878 chars) and faster at inference. Cross-model experiments across four additional student models (Gemma 3 12B, Mistral 14B, Qwen3 32B, Claude Haiku 4.5) show ESPO yields the best average accuracy on every model tested, with the largest gap on Qwen3 GSM8K (15.00% $\to$ 91.40%). A generalization bound (Appendix) grounds each phase in a corresponding term of the test-time gap, and the ablation confirms a key prediction: adding diversity without bootstrap selection actually hurts performance ($-$1.20%).
Read the original paperMore in Optimization
Browse all 36 papers →An $Ω(κ_y^8ε^{-6})$ Lower Bound for Stochastic NC-SC Bilevel Optimization with First-order Oracles
Zhihao Gu, Qilong Wu, Junchi Yang
This work proves that stochastic bilevel optimization fundamentally requires up to epsilon^{-6} oracle queries, showing existing methods are asymptotically optimal.
Hyper Algorithm Design Agent: Evolving Learnable Optimizer from Zero
Zipei Yu, Yue-Jiao Gong, Zeyuan Ma, Yuncheng Jiang, Zhiguang Cao
A pair of self-improving coding agents evolves new learnable optimization algorithms from a simple template, reducing the need for handcrafted optimizer design.
Tight Regret Bound for Online Inverse Linear Optimization via Multiscale Matrix Weights
Shinsaku Sakaue
A new multiscale matrix-weights algorithm learns hidden linear preferences online with provably optimal dimension-dependent regret.