Reflective Prompt Optimization of a Deep-Research Agent: A Topic-Disjoint, Multi-Seed Protocol for Measuring Transferable Gains and Prompt-Level Overfitting
Abstract
Prompt optimization is an attractive alternative to reinforcement learning for adapting language-model agents, since it is cheap and produces human-readable artifacts. On factual tasks, however, it carries a failure mode that scalar-reward reinforcement learning does not. An optimizer that reads the training examples can write their answers into the prompt, so an in-distribution gain may be memorization rather than transferable behaviour. We apply reflective prompt evolution (GEPA) to the two system prompts of a multi-agent deep-research agent and evaluate it under a topic-disjoint split in which no topic is shared across train, validation, and test. Held-out citation reward rises by 0.079, from 0.702 to 0.781, with a bootstrap 95% confidence interval of [0.051, 0.107], and the gain replicates across three seeds (mean 0.107). Nearly half of the winning prompt is a memorized answer key, yet a controlled ablation shows this content earns no reward even on the exact training questions it encodes. The large validation-minus-held-out gap is therefore small-sample selection under a noisy judge, not memorization. Varying the verifier isolates what makes the gain transfer. Decomposed per-dimension feedback is the causal ingredient, and collapsing it to a single scalar reward makes held-out transfer negative. The gain persists under an out-of-family judge and is largely reproduced by a hand-written version of the discovered recipe. Credible evaluation of prompt optimizers therefore requires held-out topics, multiple seeds, and verifier ablations. We release the candidate prompts, lineage diffs, figures, tables, and analysis.
Figures & tables
| Split | Tasks | Distinct topics |
|---|---|---|
| Train | 24 | 12 |
| Validation | 24 | 12 |
| Test | 500 | 254 |
| Train Validation topics | 0 | |
| Train Test topics | 0 | |
| Validation Test topics | 0 |
| Role | Model | Note |
|---|---|---|
| Policy (agent) | OpenAI GPT-5.4 ( gpt-5.4-2026-03-05 ) | deployment target |
| Reflector (optimizer) | OpenAI GPT-5.5 ( gpt-5.5-2026-04-23 ) | high reasoning effort |
| Relevance judge | OpenAI GPT-5-mini ( gpt-5-mini-2025-08-07 ) | citation relevance |
| Factual-support judge | OpenAI GPT-5.4-mini ( gpt-5.4-mini-2026-03-17 ) | claim support |
| Answer gate | OpenAI GPT-5-mini ( gpt-5-mini-2025-08-07 ) | correctness gate (tier 3) |
| Cand. | Parent | Rollout | Val. reward | parent | Component | Orch. words | Res. words |
|---|---|---|---|---|---|---|---|
| 0 | – | 0 | 0.672 | – | (seed) | 679 | 390 |
| 1 | 0 | 60 | 0.725 | researcher | 679 | 1075 | |
| 2 | 1 | 90 | 0.795 | orchestrator | 1460 | 1075 | |
| 3 | 2 | 120 | 0.867 | researcher | 1460 | 1608 | |
| 4 | 2 | 156 | 0.874 | orchestrator | 2536 | 1075 | |
| 5 | 4 | 186 | 0.805 | researcher | 2536 | 1503 |
| Statistic | Value |
|---|---|
| N (paired test tasks) | 500 |
| Distinct topics | 254 |
| Seed mean sd | |
| Optimized mean sd | |
| Mean paired delta | |
| Bootstrap 95% confidence interval |
| Reward lever | Seed (val) | Best (val) | (val) | Seed (test) | Best (test) | (test) |
|---|---|---|---|---|---|---|
| answer_gate | 0.875 | 1.000 | 0.895 | 0.925 | ||
| link_works | 0.842 | 0.937 | 0.827 | 0.913 | ||
| relevant_content | 0.811 | 0.908 | 0.804 | 0.898 | ||
| fact_check | 0.526 | 0.645 | 0.527 | 0.622 | +0.095 | |
| citation_numbering | 1.000 | 1.000 | 1.000 | 0.998 |
| Seed | Val. | Test | Bootstrap 95% CI | Wilcoxon | Win/tie/loss | Val test gap |
|---|---|---|---|---|---|---|
| 0 | 287/66/147 | 0.123 | ||||
| 1 | 348/39/113 | 0.160 | ||||
| 2 | 309/46/145 | 0.034 | ||||
| mean | – | – | – | – | – |
| Subset | n | Seed | Best | Win/tie/loss | |
|---|---|---|---|---|---|
| Exact-leak (all 24 train questions) | 24 | 0.695 | 0.784 | 12/6/6 | |
| memorized families | 12 | 0.606 | 0.695 | 6/2/4 | |
| other train families | 12 | 0.783 | 0.874 | 6/4/2 | |
| Topic-shared fresh (all 96) | 96 | 0.593 | 0.705 | 53/15/28 | |
| memorized families | 48 | 0.559 | 0.630 | 25/10/13 | |
| non-memorized families | 48 | 0.627 | 0.781 | 28/5/15 |
| Verifier configuration | Val. | Transfer | Gaming gap | Seed spread |
|---|---|---|---|---|
| fine / 1x / decomposed (reference) | 0.043 | 0.037 | ||
| coarse / 1x / decomposed | 0.071 | 0.079 | ||
| fine / 3x / decomposed | 0.049 | 0.018 | ||
| fine / 1x / scalar | 0.061 | 0.030 |
| Contrast | held-out | Bootstrap 95% CI | Win/tie/loss |
|---|---|---|---|
| Recipe seed | 51/14/35 | ||
| Best recipe | 43/18/39 | ||
| Best seed | 56/12/32 |
| Comparison | Dimension | n | Agreement | Cohen’s |
|---|---|---|---|---|
| Human vs. in-family judge | source relevance | 45 | 77.8% | 0.23 |
| Human vs. in-family judge | factual support | 45 | 80.0% | 0.60 |
| Human vs. out-of-family judge | source relevance | 45 | 91.1% | 0.46 |
| Human vs. out-of-family judge | factual support | 45 | 80.0% | 0.61 |
| Candidate | Orchestrator | Researcher |
|---|---|---|
| 0 (seed) | 0% | 0% |
| 1 | 0% | 39% |
| 2 | 40% | 39% |
| 3 | 40% | 40% |
| 4 (best) | 52% | 39% |
| 5 | 52% | 72% |
| Failure theme | Weak-citation count |
|---|---|
| Source does not support the specific claim | 173 |
| Topically related but not the exact fact | 165 |
| Composite or multi-claim citation | 36 |
| Wrong number, figure, or date | 6 |
| URL inaccessible or not in corpus | 4 |
Automatic Prompt Optimization
Automatic prompt optimization uses model or task feedback to revise instructions for stronger, more reliable language-model performance.
See all 103 papers