SEPO: Evidence-Grounded Prompt Optimization via Structural Editing
Organizations: School of Science and Engineering, The Chinese University of Hong Kong, Shenzhen · Xi’an Jiaotong University · Shenzhen Future Network of Intelligence Institute (FNiI-Shenzhen) · Guangdong Provincial Key Laboratory of Future Networks of Intelligence, CUHK(SZ)
Abstract
Existing API-only prompt optimisers are often described as interpretable, but in practice, this usually means only post-hoc inspectability: each iteration still rewrites the prompt as one opaque string, leaving a trace of full-prompt diffs rather than localisable, machine-readable edits. This paper introduces SEPO (Structural, Evidence-grounded Prompt Optimization), a multi-trajectory prompt optimiser centred on edit-effect lineage feedback. Rather than treating each iteration as an isolated whole-prompt rewrite, SEPO locally edits stable, typed units in a two-layer prompt schema, links the target and realised structural operations of each edit to the examples it newly fixes or breaks, and carries this edit-effect record forward to guide later architect calls on the same search branch. This makes prompt optimisation addressable, attributable, and actionable. Across a 14-task held-out suite, SEPO improves over the strongest baseline, GEPA, by 3.1 pp on Llama-3.1-8B-Instruct and 2.2 pp on Qwen3-8B, reaching 61.9% and 73.3% macro accuracy. SEPO also lies on both the optimisation-time and test-time Pareto frontiers, spending 2.9M optimisation tokens versus 4.1M for GEPA and producing prompts over 5x shorter.
Figures & tables
| Method | BBH | Code | MMLU-Pro | Reasoning | Avg. | ||||||||||
| Caus. | Date | Disamb. | Fall. | Deduct. | Obj. | Snarks | Word. | MBPP+ | CS | Econ. | Psych. | GSM-H | HQA | ||
| Worker LLM: Llama-3.1-8B-Instruct | |||||||||||||||
| Seed | 37.5 ±0.0 | 66.7 ±0.0 | 61.7 ±0.0 | 44.5 ±0.0 | 45.0 ±0.0 | 82.5 ±0.0 | 72.4 ±0.0 | 0.0 ±0.0 | 57.3 ±0.0 | 44.7 ±0.0 | 57.5 ±0.0 | 56.7 ±0.0 | 35.8 ±0.0 | 25.0 ±0.0 | 49.1 ±0.0 |
| OPRO | 59.9 ±3.2 | 65.2 ±2.3 | 65.8 ±4.1 | 42.8 ±3.8 | 45.7 ±5.2 | 81.8 ±9.0 | 82.3 ±3.2 | 5.2 ±0.6 | 60.2 ±1.4 | 41.0 ±2.6 | 52.2 ±2.6 | 59.8 ±2.6 | 30.2 ±4.9 | 69.6 ±8.7 | 54.4 ±3.9 |
| APSF | 52.6 ±8.3 | 68.2 ±1.2 | 62.8 ±2.4 | 45.8 ±7.3 | 45.2 ±4.3 | 83.5 ±1.3 | 76.8 ±4.0 | 25.2 ±12.0 | 60.7 ±2.3 | 48.7 ±4.5 | 57.8 ±2.8 | 60.3 ±2.3 | 30.1 ±2.5 | 51.9 ±11.2 | 55.0 ±4.7 |
| MIPROv2 | 63.3 ±2.9 | 67.8 ±2.3 | 65.2 ±4.7 | 49.3 ±8.6 | 44.5 ±2.2 | 79.0 ±1.7 | 76.6 ±1.4 | 3.3 ±0.3 | 56.0 ±2.2 | 47.3 ±3.0 | 52.7 ±1.9 | 59.3 ±2.6 | 37.2 ±2.1 | 62.5 ±1.1 | 54.6 ±2.6 |
| Variant | P | Acc. | Acc | Len. | |
|---|---|---|---|---|---|
| Full Sepo | — | 61.1 | 2.2 | — | 228 |
| Attribution | P1 | 58.0 | 2.5 | 450 | |
| Lineage | P2 | 58.2 | 1.5 | 292 | |
| Breadcrumb | P2 | 59.3 | 2.0 | 235 | |
| Multitraj | P3 | 56.4 | 2.3 | 198 |
| P1 | P2 | P3 | ||
| Task | Attr | Lin | Brd | MT |
| BBH Date | ||||
| BBH Snarks | ||||
| MBPP+ | ||||
| GSM-Hard | ||||
| MMLU-Pro CS | ||||
| Rule-level op | # | share | Structural op | # | share |
|---|---|---|---|---|---|
| AddRule | 423 | 75.4% | RewriteStep | 34 | 7.3% |
| DropRule | 147 | 31.7% | AddStep | 14 | 3.0% |
| RefineRule | 126 | 37.2% | SplitStep | 18 | 4.0% |
| MergeRules | 3 | 0.6% | Backbone | 1 | 0.3% |
| Opt. (M tok) | Dep. | Len. | $/cell | \boldsymbol{\rho_{\}}$ | |||||
|---|---|---|---|---|---|---|---|---|---|
| Method | Acc. | Arch. | Work. | Total | (k) | (tok) | (USD) | (pp/$) | |
| OPRO | 54.4 | 6.84 | 3.11 | 9.95 | 244.0 | 358 | 0.53 | 1.66 | 3.2 |
| MIPROv2 | 54.6 | 3.52 | 2.60 | 6.12 | 208.4 | 230 | 0.90 | 0.89 | 6.2 |
| APSF | 55.0 | 0.69 | 2.13 | 2.82 | 157.8 | 65 | 2.09 | 0.19 | 31.1 |
| MPO | 58.6 | 0.19 | 3.40 | 3.59 | 261.0 | 416 | 2.65 | 0.15 | 63.3 |
| GEPA | 58.8 | 0.23 | 3.88 | 4.11 | 423.7 | 1,324 | 2.36 | 0.18 | 53.9 |
Appendix figures & tables10 assets
Supplementary material from the paper’s appendix.
Appendix
| Task | Test | Metric | Licence | |
|---|---|---|---|---|
| BBH Causal Judgement | 50 | 137 | exact match | MIT |
| BBH Date Understanding | 50 | 200 | exact match | MIT |
| BBH Disambiguation QA | 50 | 200 | exact match | MIT |
| BBH Formal Fallacies | 50 | 200 | exact match | MIT |
| BBH Logical Deduction (7) | 50 | 200 | exact match | MIT |
| BBH Colored Objects | 50 | 200 | exact match | MIT |
| Sub-op | Target | Effect on schema |
|---|---|---|
| (rule-layer): 4 sub-ops, all under step <N> | ||
| AddRule | step <N> | insert sub-rule in step |
| DropRule | step <N> | remove sub-rule from step |
| RefineRule | step <N> | rewrite one sub-rule in step |
| MergeRules | step <N> | merge two sub-rules in step |
| (outline-layer): 4 sub-ops, one label each | ||
| List length (words) | Diagnostic acc. | |
|---|---|---|
| 24 | ||
| – | 30 | |
| – | 20 | |
| 26 | ||
| Diagnostic subset | 100 |
| Method | HQA-Hard EM (%) |
|---|---|
| Seed | 8.00 |
| OPRO | 24.00 |
| APSF | 26.00 |
| MPO | 28.25 |
| GEPA | 28.75 |
| Sepo | 29.25 |
| Architect (M tok) | Worker-Opt (M tok) | Worker-Dep (k tok) | ||||
|---|---|---|---|---|---|---|
| Method | Input | Output | Input | Output | Input | Output |
| OPRO | 6.44 | 0.40 | 2.04 | 1.07 | 134.7 | 109.3 |
| MIPROv2 | 3.32 | 0.20 | 1.64 | 0.96 | 105.0 | 103.4 |
| APSF | 0.69 | 0.00 | 1.33 | 0.80 | 78.9 | 78.9 |
| MPO † | 0.17 | 0.02 | 2.68 | 0.72 | 198.3 | 62.7 |
| GEPA | 0.20 | 0.03 | 3.06 | 0.82 | 321.9 | 101.8 |
| Method | BBH | Code | MMLU-Pro | Reasoning | Mean | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Caus. | Date | Disamb. | Fall. | Deduct. | Obj. | Snarks | Word. | MBPP+ | CS | Econ. | Psych. | GSM-H | HQA | Macro | |
| OPRO | 21.22 | 4.91 | 9.68 | 19.47 | 13.91 | 19.56 | 3.14 | 0.46 | 0.13 | 0.71 | 0.63 | 1.76 | 0.04 | 0.08 | 6.84 |
| MIPROv2 | 12.05 | 5.71 | 5.23 | 1.07 | 1.44 | 5.38 | 3.02 | 0.53 | 1.34 | 5.46 | 2.92 | 4.61 | 0.18 | 0.28 | 3.52 |
| APSF | 1.57 | 1.67 | 0.28 | 0.95 | 0.89 | 0.34 | 0.14 | 0.91 | 0.28 | 0.61 | 0.57 | 0.24 | 0.61 | 0.58 | 0.69 |
| MPO | 0.32 | 0.30 | 0.25 | 0.27 | 0.23 | 0.30 | 0.22 | 0.21 | 0.09 | 0.10 | 0.13 | 0.10 | 0.04 | 0.07 | 0.19 |
| GEPA | 0.24 | 0.23 | 0.15 | 0.54 | 0.52 | 0.18 | 0.13 | 0.37 | 0.68 | 0.07 | 0.07 | 0.04 | 0.03 | 0.00 | 0.23 |
| Method | BBH | Code | MMLU-Pro | Reasoning | Mean | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Caus. | Date | Disamb. | Fall. | Deduct. | Obj. | Snarks | Word. | MBPP+ | CS | Econ. | Psych. | GSM-H | HQA | Macro | |
| OPRO | 3.14 | 3.78 | 2.19 | 5.40 | 4.93 | 3.09 | 1.48 | 1.70 | 1.35 | 3.68 | 2.81 | 2.92 | 2.47 | 4.65 | 3.11 |
| MIPROv2 | 3.10 | 3.11 | 1.42 | 4.37 | 4.96 | 2.23 | 1.20 | 1.17 | 1.14 | 2.96 | 2.36 | 2.08 | 2.05 | 4.28 | 2.60 |
| APSF | 1.08 | 2.02 | 0.49 | 3.76 | 2.48 | 1.08 | 0.30 | 4.56 | 1.16 | 2.68 | 2.20 | 2.05 | 1.25 | 4.69 | 2.13 |
| MPO | 3.98 | 3.76 | 2.56 | 5.20 | 5.71 | 2.94 | 2.13 | 4.33 | 1.52 | 2.60 | 3.16 | 2.39 | 2.28 | 4.99 | 3.40 |
| GEPA | 5.62 | 4.11 | 4.28 | 6.95 | 5.59 | 3.94 | 3.08 | 6.06 | 1.64 | 3.80 | 3.17 | 2.54 | 2.16 | 1.32 | 3.88 |
| Method | BBH | Code | MMLU-Pro | Reasoning | Mean | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Caus. | Date | Disamb. | Fall. | Deduct. | Obj. | Snarks | Word. | MBPP+ | CS | Econ. | Psych. | GSM-H | HQA | Macro | |
| OPRO | 84.7 | 268.0 | 180.8 | 226.4 | 319.0 | 209.2 | 86.0 | 65.7 | 117.0 | 287.6 | 234.5 | 241.7 | 380.6 | 714.7 | 244.0 |
| MIPROv2 | 83.5 | 233.4 | 123.6 | 186.3 | 324.0 | 182.2 | 67.7 | 46.7 | 98.9 | 225.6 | 195.3 | 175.9 | 316.1 | 659.0 | 208.4 |
| APSF | 36.0 | 137.9 | 36.9 | 144.4 | 164.8 | 77.6 | 14.9 | 177.7 | 87.3 | 183.5 | 157.8 | 154.2 | 175.8 | 660.6 | 157.8 |
| MPO | 108.1 | 277.2 | 223.1 | 216.4 | 359.1 | 251.9 | 123.5 | 168.1 | 132.4 | 206.8 | 264.7 | 203.7 | 350.9 | 767.7 | 261.0 |
| GEPA | 208.0 | 413.4 | 535.7 | 337.9 | 447.8 | 468.3 | 236.9 | 295.6 | 153.1 | 506.8 | 424.1 | 500.8 | 741.6 | 661.3 | 423.7 |
| Variant | Test Acc. | Fixes /100 | Breaks /100 | Net gain /100 | Net-positive edits |
|---|---|---|---|---|---|
| Full Sepo | 61.1 | 7.5 | 5.0 | 61% | |
| Attribution | 58.0 | 8.0 | 7.3 | 47% | |
| RandomTarget | 57.4 | 4.8 | 6.5 | 34% | |
| RandomError | 59.9 | 6.3 | 5.5 | 51% |
Automatic Prompt Optimization
Automatic prompt optimization uses model or task feedback to revise instructions for stronger, more reliable language-model performance.
See all 97 papers