arXiv(opens in a new tab)cs.CLOct 2026Cited by 1 paper on PaperVantage

Manuscript Offprint

arXiv:2610.12601

Reflective Prompt Optimization of a Deep-Research Agent: A Topic-Disjoint, Multi-Seed Protocol for Measuring Transferable Gains and Prompt-Level Overfitting

Elias Lumer, Sahil Sen, Vamse Kumar Subbiah, Kevin Paul

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

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.

1 Introduction

Language-model agents are increasingly adapted to downstream tasks with reinforcement learning methods such as Group Relative Policy Optimization [Shao et al., 2024], which typically need thousands of rollouts and collapse a rich execution trace into a single scalar reward. Prompt optimization is an attractive alternative because it is cheap, needs no training infrastructure, and produces human-readable artifacts that practitioners can audit. Frameworks such as DSPy [Khattab et al., 2024] have made this practical by treating a system as a program of language-model calls and optimizing its prompts automatically, with instruction-and-demonstration search in MIPROv2 [Opsahl-Ong et al., 2024] and reflective prompt evolution in GEPA [Agrawal et al., 2025].

On factual tasks, prompt optimization has a failure mode that scalar-reward reinforcement learning does not. An optimizer that sees the training examples can copy their specific answers into the prompt, so the reported gain then reflects memorized lookups on seen topics rather than a transferable change in how the agent behaves. This is a form of reward hacking [Skalse et al., 2022, Amodei et al., 2016], in which the optimizer raises the measured reward without improving the behaviour that the reward is meant to track. It is the primary risk when a reflective optimizer is allowed to read and rewrite prompts against a training signal. The risk is sharpened when that signal is a rubric-style reward scored by language-model judges, which are themselves prone to hacking in reinforcement learning with verifiable rewards [Mahmoud et al., 2026, Tyagi et al., 2026, Wang et al., 2026b], as ours is (Section 3.2). A study that reports only an in-distribution gain therefore cannot tell the reader how much of that gain will survive on data the optimizer never saw, and closing that gap is the measurement problem we address.

Our contribution is a generalization-first protocol that separates the two. We use a topic-disjoint split in which no article family is shared across train, validation, and test, and a held-out test set large enough for tight confidence intervals. Under this design the held-out gain reports only transferable behaviour, and the difference between the validation gain and the held-out gain lets us test whether the apparent gain is memorization. The optimizer we use as the instrument is GEPA, the Genetic-Pareto reflective prompt evolution method of Agrawal et al. [2025]. GEPA feeds a language-model reflector the full trajectory (reasoning, tool calls, and tool outputs) together with diagnostic textual feedback, so the reflector can diagnose why a candidate failed and propose a targeted rewrite. It keeps a Pareto frontier of candidates so the search does not collapse to a local optimum. Because GEPA reads execution traces, it can both discover transferable rules and copy specific facts into the prompt, which is exactly the mixture our protocol is designed to separate. Our configuration follows recent practice. Decagon [2026] report that a frontier reflection model is needed, that the optimization sample size has a sweet spot around 20 to 100 examples, and that prompts bloat without length regularization, and GEPA Team [2026] note that enlarging the reflection batch causes context overload. We therefore use a strong reflector and keep the train and validation sets at 24 examples each, and we observe the bloat effect when GEPA's Pareto selection rejects its two longest candidates.

The object we optimize is a source-attribution reward for deep-research agents [Shi et al., 2025]. Onweller et al. [2026] show that deep-research agents routinely emit citations that are present but not verified, where the cited page exists yet fails to support the specific claim. They propose parsing and evaluation machinery for source attribution. Our gated composite reward (Section 3.2) operationalizes those failure modes through the levers link_works, relevant_content, and fact_check, so optimizing against it targets a documented attribution-quality gap. The agent's search behaviour is in turn shaped by its harness [Lumer et al., 2026], and Sen et al. [2026a] show that harness design materially reshapes agentic search quality, which is why prompt edits that change how the researcher searches and cites can move the reward at all. More broadly, structured-retrieval agent systems [Sen et al., 2026b] situate this work in the line of retrieval-augmented agents [Lumer et al., 2025], though our task is single-shot cited reporting rather than long-horizon conversational memory.

This paper makes the following contributions.

  • A generalization-first evaluation protocol, combining topic-disjoint held-out testing, a controlled topic-shared ablation, and multi-seed replication, that tests whether the validation-minus-test gap is memorization and finds that it is not. The memorized answer key the optimizer writes does not improve the reward, and the gap is consistent with small-sample selection under a noisy judge.

  • A rigorous held-out evaluation of reflective prompt optimization on a multi-agent research system with a language-model-judge citation reward, with bootstrap confidence intervals and a paired significance test on 500 tasks, replicated across 3 optimization seeds (mean held-out gain 0.107, significant in every run).

  • A controlled verifier ablation identifying decomposed per-dimension feedback as the causal ingredient behind transfer, since collapsing the reward to a single scalar drives held-out transfer

negative, while finer resolution and repeated scoring do not raise it and reward gaming tracks the weakest verifiers rather than the strongest.

  • A per-lever, error-analyzed account of which prompt edits drove the transferable gain and where the residual failures concentrate, including a prompt autopsy showing that nearly half of the winning prompt by word count is a memorized answer key that does not improve the reward, even on the exact training questions it encodes.

References (59)