Reflective prompt optimization improves instructions using task feedback, but coupling candidate generation with full-validation-based selection can make search costly and sequential. We propose a two-stage framework that decouples reflective candidate-pool construction from validation allocation. During construction, sampled parents first answer training questions, and groups of their saved responses guide parallel reflection and revision. Each child is screened on its group's questions against the corresponding parent scores. Improving, nonduplicate prompts enter the pool and can become parents without full validation. After construction, an exploration policy selects candidates from the frozen pool under a fixed full-validation budget, and the prompt with the highest measured validation score is returned. This separation allows candidate-pool size and validation budget to be set independently. We evaluate random selection and a multilayer perceptron with similarity-based exploration (MLP + similarity) on five benchmarks using Qwen3.5-9B and Llama-3.1-8B-Instruct. With 100 retained candidates and 20 full validations, our framework improves over the initial solver by up to 11.22 percentage points. MLP + similarity improves over the initial solver in all ten comparisons, although neither selection policy consistently outperforms the other. These results support separating reflective search from budgeted validation while leaving room for stronger candidate-selection policies.
Figures & tables
Figure 1. GEPA’s original single-proposal workflow. The reflector callout highlights sequential evaluation dependencies and parent-evaluation cost when all sampled answers are correct. Solid arrows show the successful-proposal path and frontier update; return edges for all-correct minibatches and rejected children are omitted for clarity. The dashed arrow connects the reflector to explanatory annotations rather than an execution step. The original single-proposal GEPA pipeline: select a parent from the Pareto frontier, sample questions, obtain parent answers and scores, reflect and revise when errors are present, screen the child, and fully validate an improved child before updating the frontier. A dashed annotation arrow from the reflector points to two bottlenecks: serial reflection attempts, and parent evaluation costs already incurred when an all-correct minibatch causes reflection to be skipped.
Figure 2. Two stages separated by a frozen candidate pool. Stage I constructs N prompts using training feedback only. The dashed region highlights parallel proposal branches: reflection and revision can execute concurrently across minibatches and parents, while each revision follows its own reflection. Locally improved children enter the pool, and the generation loop stays within Stage I. Once the pool reaches N prompts, its texts and metadata are frozen. Stage II uses an exploration policy π to allocate B full validations and returns the prompt with the highest measured validation score, without generating new prompts or sending validation feedback to Stage I. Construction and selection symbols are defined in Sections 3.3 and 3.4 , respectively. Test evaluation follows final selection. A two-stage workflow. Stage I repeatedly samples parents from a growing pool, shares their saved training responses across parallel reflection branches, and admits locally improved, nonduplicate children. After the pool is frozen, Stage II uses an exploration policy to select candidates for full validation and returns the candidate with the highest measured validation score. There is no feedback from Stage II to Stage I.
Method
SuperGPQA
LiveBench-Math
IFBench
BBEH
HotpotQA
Average
Llama-3.1-8B-Instruct
Initial solver
17.00
7.38
31.00
9.33
32.33
19.41
MIPROv2
18.67
8.47
31.50
9.33
44.89
22.57
GEPA
16.67
10.66
30.78
7.33
41.00
21.29
DPO
16.33
7.38
32.00
8.33
41.00
21.01
Ours (Random)
18.89
10.38
28.11
10.00
42.44
21.96
Table 1. Main task scores (%; higher is better). Scores are three-seed test means. Each of our selection policies uses a budget of 20 full-validation evaluations, compared with 30 for GEPA. Average is the unweighted mean across five benchmarks. Bold and underline denote column-wise best and second-best scores within each model block.
Ours (Random)
20 rounds of GEPA
Dataset
Build
Validation
Build
Validation
Llama-3.1-8B-Instruct
SuperGPQA
53.92
54.42
85.91
56.58
LiveBench-Math
219.51
35.54
287.26
37.24
IFBench
38.77
43.33
46.02
40.97
BBEH
173.17
76.37
367.25
78.51
Table 2. Reference runtime in minutes. Times are intended for relative comparison within our experimental setting. Build denotes candidate construction.
Mean depth
Mean branching
Dataset
Ours
GEPA
Ours
GEPA
Llama-3.1-8B-Instruct
SuperGPQA
4.37
3.47
2.41
1.81
LiveBench-Math
4.09
3.00
2.15
2.23
IFBench
3.37
5.73
3.19
1.93
BBEH
5.24
3.80
2.11
1.93
Table 3. Retained search-tree structure. Depth and branching describe search behavior, not prompt quality. Node counts differ across methods.
Reflective prompt optimization revises instructions using examples of a model's behavior, but which evidence the reflector should receive remains unclear. We study evidence composition, visibility of examples, candidate selection and domain-knowledge policy within a single-parent Pareto-guided search. Using Qwen3.5-9B as both task model and reflector, we evaluate nine reflection strategies on five datasets. From these experiments, we find three distinct patterns. For performance improvement, Failures-only produces the largest mean test gain (+8.0 percentage points), while Balanced-mix and No-examples+Val share the best mean performance rank. For reflection effectiveness, No-examples achieves the best rank for improving sampled parents, yet yields only a 1.4-point mean test gain: local reflection success does not necessarily produce a stronger final prompt. For overfitting assessment, Failures-only and Balanced-mix share the lowest mean calibration-gap rank, while larger gaps on GPQA and IFBench show that calibration gains can overstate held-out improvement. This gap is a descriptive indicator, not a direct measure of overfitting. Together, these results show why reflection strategies should be assessed separately on final performance, parent improvement and calibration-to-test transfer.
Large language models (LLMs) have become increasingly capable of following instructions and complex reasoning, making prompting a flexible interface for adapting models without parameter updates. Yet prompt design remains labor-intensive and highly sensitive to formatting, phrasing, and instruction order, motivating automated prompt optimization methods that reduce manual effort while preserving inference-time flexibility. However, existing methods often search over prompt candidates or use fixed critique-refine pipelines driven by individual examples or small batches, limiting their ability to capture systematic error patterns and make targeted edits grounded in failure history. We propose Reflective Prompt Tuning (RPT), a framework that uses LLM function calling to simulate the iterative workflow of human prompt engineers. An LLM optimizer calls a diagnostic function that evaluates the target model over an entire optimization set, summarizes recurring failure modes, and returns a structured diagnostic report. The optimizer uses this report, together with an accumulated memory of prior reports, to revise the prompt for the next iteration. RPT further supports confidence-aware optimization by using calibration signals in diagnostic feedback and final prompt selection. Across three reasoning tasks, RPT improves over initial prompts by up to 12.9 points, remains competitive with state of the art, and improves confidence calibration. Our analyses show that RPT is especially effective on multi-hop and mathematical reasoning, producing targeted prompt revisions that align with diagnosed failure patterns and lead to gains in task performance and calibration.
Reflective prompt optimization improves large language model (LLM) systems without updating model weights, but fixed architectures constrain how self-refinement is organized. We introduce Workflow-Designing Agents (WDA), a framework for streamlined reflective evolution of task-adaptive self-refinement pipelines. Starting from a minimal prompt, WDA jointly evolves stage instructions and their sequential structure. During evolution, we find that repeated revisions can accumulate redundant instructions in a single prompt. In WDA, we propose to address this problem with SPLIT, which redistributes these instructions across specialized stages. Three-example reflection and local screening guide selective search, while calibration scores guide Pareto admission and rollback of unhelpful trailing updates. The resulting pipelines are task-adaptive: their instructions and depth are learned from task data, then fixed for all test inputs within that task. We evaluate WDA on five benchmarks spanning knowledge, mathematical reasoning, multi-hop question answering, and instruction following. On Qwen3.5-9B, WDA achieves an average score of 51.24%, improving over the initial solver by 8.63 percentage points and the variant without SPLIT by 2.60 points. On GPT-4.1-mini, it achieves 49.00%, with corresponding gains of 5.62 and 3.69 points. These results support task-adaptive self-refinement as a complementary direction to broader agentic workflow search.