Reflective text-space optimizers such as GEPA and SkillOpt have reported large gains on frontier and mid-size models. We test replication across two reasoning-native target-serving configurations: DeepSeek V4 Flash through DwarfStar and Qwen3.8-27B through LM Studio. For each target, we evaluate the same held-out tasks and four conditions - minimal baseline, GEPA prompt, SkillOpt skill, and manually engineered prompt - on HotpotQA (n=500 per condition) and MATH-500 (n=250). In the primary Qwen v2 rerun under the same frozen protocol, GEPA selects the HotpotQA seed and exactly reproduces baseline behavior, whereas SkillOpt's validation gain reverses into held-out degradation. On MATH-500, GEPA raises exact match from 0.828 to 0.904 while reducing latency but increasing token consumption, so lower response time does not imply lower token cost. DeepSeek likewise shows its strongest GEPA effect on MATH-500 (0.852 to 0.908). Across both targets, GEPA's strongest gains occur on MATH-500, while neither optimizer improves the HotpotQA baseline. Optimization is therefore task- and method-dependent, and validation gains may reverse on held-out evaluation. An earlier Qwen run is retained as serving-sensitivity evidence. These results suggest that textual headroom for a model-task pair and the observed effect of a text-space optimizer are more informative when decomposed into content/reasoning, answer-realization/evaluator alignment, and serving-completion/reliability. The cross-benchmark pattern further suggests that optimization may benefit from low-ambiguity, actionable evaluation signals.
Figures & tables
Figure 1: Framework pipeline. A single YAML configuration drives an optimization phase (top: optimizer runners calling the reflection model and emitting versioned artifacts) and an evaluation phase (bottom: deterministic scoring of the four conditions feeding the statistics and reporting layer) against one frozen target at a time; all target traffic passes through one OpenAI-compatible adapter with timeout, retry, and configured dual-NIC failover (see § 4 for the role of each layer). The diagram’s abbreviated “Qwen 3.8” label denotes the Qwen3.8-27B target.
Figure 2: Paired changes from the minimal baseline in the benchmark-native primary metric, with task-bootstrap 95% confidence intervals. Each panel uses the same held-out tasks within a model (HotpotQA n=500 ; MATH-500 n=250 ). The forest plot visualizes within-model effects; it does not treat the different serving stacks as exchangeable.
Benchmark
Target
Condition
Score [95% CI]
Δ vs A (pp)
Raw p
OK/ n
HotpotQA
DeepSeek
A baseline
0.8150 [0.7857, 0.8436]
—
—
500/500
B GEPA
0.8086 [0.7795, 0.8381]
−0.64
.5363
499/500
C SkillOpt
0.7532 [0.7196, 0.7867]
−6.18
<.0001
500/500
D manual
0.7937 [0.7634, 0.8243]
−2.13
.0036
500/500
Qwen
A baseline
0.8215 [0.7918, 0.8491]
—
—
500/500
B GEPA
0.8215 [0.7918, 0.8491]
0.00
1.0000
500/500
Table 1: Held-out benchmark-native score by target and condition. Values in brackets are bootstrap 95% CIs; Δ and raw paired permutation p compare each condition with A. OK is the number of successful calls. Scores and intervals use four decimal places; deltas are percentage points. Bold marks the best primary score within each target–benchmark block (ties included). Holm-adjusted results are reported in § 6.5 .
Condition
F1
EM
Composite [95% CI]
Format
Lat. (s)
Δ F1 vs A ( p )
A baseline (minimal)
0.8150
0.6720
0.8456 [0.8233, 0.8664]
0.9720
15.2
—
B GEPA
0.8086
0.6800
0.8376 [0.8133, 0.8605]
0.9400
21.7
−0.64 (0.5363)
C SkillOpt
0.7532
0.6300
0.7885 [0.7609, 0.8154]
0.8680
23.0
−6.18 ( <10−4 )
D manual
0.7937
0.6600
0.8260 [0.8016, 0.8494]
0.9340
18.9
−2.13 (0.0036)
Table 2: DeepSeek HotpotQA test results ( n=500 tasks). F1 is the benchmark-native primary metric; composite is Eq. 1 . Deltas are paired vs. condition A over all n tasks with sign-permutation p -values (in points); a failed call scores 0. Negative deltas are regressions. Bold marks the column-best score, format rate, or latency (lower is better); p-values communicate significance separately. No optimizer delta versus A constitutes a significant improvement.
Figure 3: DeepSeek GEPA candidate validation scores vs. metric-call budget. Left (HotpotQA): candidates scatter mostly below the seed; the best-so-far line creeps up by +1.3 points, below the approximate selection-noise scale. Right (MATH-500): the deployed best candidate is discovered by 220 metric calls, with a +6.0 -point climb beyond that scale; the complete optimization run consumes 445 metric calls, and the gain transfers to test.
Condition
EM
Composite [95% CI]
Format
Lat. (s)
Δ EM vs A ( p )
A baseline (minimal)
0.8520
0.8846 [0.8480, 0.9188]
0.9040
65.9
—
B GEPA
0.9080
0.9282 [0.8982, 0.9554]
0.9400
45.8
+5.60 (0.0047)
C SkillOpt
0.8560
0.8866 [0.8508, 0.9198]
0.9040
64.9
+0.40 (1.0000)
D manual
0.8720
0.9016 [0.8676, 0.9332]
0.9240
57.4
+2.00 (0.3055)
Table 3: DeepSeek MATH-500 test results ( n=250 tasks). EM is the benchmark-native primary metric; composite is Eq. 1 . Deltas are paired vs. condition A over all n tasks with sign-permutation p -values (in points); a failed call scores 0. GEPA is the only condition with a significant improvement; it also dominates on latency. Bold marks the column-best score, format rate, or latency (lower is better); p-values communicate significance separately.
Figure 4: GEPA candidate tree on MATH-500, redrawn from the run’s own candidate_tree.html and run_log.json . Solid circles are candidates accepted into the pool, labeled with their full-validation scores ( n=100 ); arrows point from parent to child; dotted callouts are proposals rejected at the reflection-minibatch stage. Candidate 2 (cyan) is the deployed best; candidate 3 remains on the per-task Pareto front (orange) despite a lower aggregate score.
Figure 5: DeepSeek quality vs. mean latency. On MATH-500 (right), GEPA Pareto-dominates every other condition: higher composite score at the lowest latency. On HotpotQA (left), the baseline dominates: every longer prompt costs latency without quality.
Figure 6: DeepSeek SkillOpt gate trajectory (selection-set score per training step; triangles mark accepted edits). Right (MATH-500, hard-EM gate, n=50 ): a 0.78→0.84 staircase in epoch 1, plateau in epoch 2. Left (HotpotQA, soft-F1 gate, n=100 ): flat except one late accept — the edit that degrades test F1 by 6.2 points.
Figure 7: MATH-500 primary end-to-end EM (left) and successful-call rate (right) for both DeepSeek and Qwen, each over all 250 assigned tasks. Qwen v2 completion is 99.6% under A, B, and D and 96.4% under C; the GEPA score gain therefore remains visible at matched completion. Cross-target absolute latency is omitted because serving stacks differ.
Condition
End-to-end EM
OK/ n
EM ∣ OK
Paired OK Δ vs A
A baseline
0.8280
249/250
0.8313
—
B GEPA
0.9040
249/250
0.9076
+0.0726
C SkillOpt
0.8640
241/250
0.8963
+0.0375
D manual
0.8680
249/250
0.8715
+0.0363
Table 4: Qwen v2 MATH reliability decomposition ( n=250 per condition). End-to-end EM scores failures as zero. EM ∣ OK conditions on successful calls; paired OK Δ restricts each comparison to tasks where both A and the comparator succeeded and is descriptive. Bold marks the column-best value (ties included).
Condition
Read timeout
Other errors
Final failures
A baseline
1
0
1
B GEPA
1
0
1
C SkillOpt
9
0
9
D manual
1
0
1
Table 5: Recorded Qwen v2 MATH failure categories in the final assigned-task panel. The uninterrupted evaluation records only read timeouts and required no recovery. Bold marks the column minimum (ties included).
Figure 8: Qwen v2 MATH-500 execution timeline from retained per-task timestamps. Conditions ran sequentially; crosses mark the 12 recorded read timeouts. The figure diagnoses temporal non-exchangeability and does not attribute failures causally to prompt text.
Figure 9: Qwen v2 quality, mean end-to-end latency, and observed total-token trade-offs. Bubble area is proportional to total reported tokens. Within a benchmark, lower latency and higher score are preferable, but smaller bubbles represent a distinct token-economy objective.
Target
Benchmark
Contrast
Effect
Raw p
Holm p
DeepSeek
HotpotQA
B–A
−0.0064
.5363
1.0000
DeepSeek
HotpotQA
C–A
−0.0618
<.0001
.0008
DeepSeek
MATH-500
B–A
+0.0560
.0047
.0235
DeepSeek
MATH-500
C–A
+0.0040
1.0000
1.0000
Qwen
HotpotQA
B–A
0.0000
1.0000
1.0000
Qwen
HotpotQA
C–A
−0.0322
.0004
.0024
Table 6: Multiplicity sensitivity for the eight primary automated-optimizer contrasts. Raw values are paired sign-permutation p -values; adjusted values use Holm’s step-down procedure.
Figure 10: Validation-to-test transfer across two targets and two optimizers. x is gain on the optimizer’s own validation/selection metric; y is paired held-out gain on the corresponding primary metric. The diagonal denotes numerical, not mechanistic, transfer; axis metrics differ for GEPA development and MATH held-out evaluation.
Transition
Count
Correct under both
209
Wrong under both
19
A wrong → B correct
18
— of which: A emitted no parseable boxed answer
12
— of which: A’s value equivalent, format mismatch
6
A correct → B wrong
4
Table 7: MATH-500 item-level transition audit between conditions A (baseline) and B (GEPA) on the 250 paired test items.
Target
Benchmark
Optimizer
Recorded units
Wall clock
Edits (accepted/rejected)
DeepSeek
HotpotQA
GEPA
1220
9h 45m
—
HotpotQA
SkillOpt
75
14h 58m
1/19
MATH-500
GEPA
445
6h 10m
—
MATH-500
SkillOpt
95
22h 45m
3/17
Qwen
HotpotQA
GEPA
1220
13h 25m
—
HotpotQA
SkillOpt
67
25h 54m
1/19
Table 8: One-time optimization telemetry. Counts follow each optimizer’s manifest (GEPA metric calls; SkillOpt recorded optimizer rollouts) and are not direct measures of model tokens. Wall times are descriptive because serving stacks differ. Authoritative Qwen monetary cost was not retained. The final column reports accepted/rejected candidate edits.
Target
Cond.
OK/assigned
Input
Output
Total
Output tok/s
Latency (s)
DeepSeek
A
750/750
722,998
331,687
1,054,685
13.77
32.1
B
749/750
1,434,184
259,678
1,693,862
11.73
29.6
C
749/750
1,117,864
364,910
1,482,774
13.41
36.3
D
750/750
776,498
317,265
1,093,763
13.35
31.7
Qwen
A
749/750
793,823
382,299
1,176,122
7.54
67.7
B
749/750
1,105,204
287,956
1,393,160
7.22
53.2
Table 9: Held-out target-model inference by condition, pooled across HotpotQA and MATH-500. Token columns are observed totals for successful calls only; the last two columns use those same calls. Conditions are A=baseline, B=GEPA, C=SkillOpt, D=manual. Bold marks the highest output-token rate and lowest mean latency within each target; these descriptive extrema are not causal efficiency estimates.
Target
Benchmark
OK/assigned
Input
Output
Total
Output tok/s
Latency (s)
DeepSeek
HotpotQA
1999/2000
3,497,082
319,318
3,816,400
8.15
19.6
MATH-500
999/1000
554,462
954,222
1,508,684
16.45
58.1
Qwen
HotpotQA
2000/2000
3,153,468
356,858
3,510,326
5.24
34.1
MATH-500
988/1000
717,758
975,673
1,693,431
8.50
116.2
Table 10: The same held-out inference accounting, pooled over the four conditions within each benchmark. Missing usage from unsuccessful calls is not imputed; these token totals are not full-experiment consumption. Bold marks the highest output-token rate and lowest mean latency within each target, descriptively; benchmark workloads differ.
Benchmark
Condition
v1
v2
v2–v1
Errors v1/v2
Same artifact
HotpotQA
baseline
.8215
.8215
.0000
0/0
n/a
GEPA
.8215
.8215
.0000
0/0
yes
SkillOpt
.8184
.7893
-.0291
0/0
no
manual
.7883
.7971
+.0088
7/0
n/a
MATH-500
baseline
.804
.828
+.024
40/1
n/a
GEPA
.852
.904
+.052
26/1
no
Table 11: Qwen v1–v2 sensitivity. Values are held-out F1 for HotpotQA and exact match for MATH-500. “Same artifact” applies only to optimized conditions. Errors are assigned tasks without an OK response. No v1/v2 scores are pooled.
Reasoning modes of language models outperform their non-reasoning counterparts on multi-step agentic tasks, but pay a 3-6x premium in output tokens on every episode -- much of it spent re-deriving procedures that are shared across episodes of the same domain. We show this recurring cost can be amortized: a coding agent analyses a small corpus of existing trajectories from a training split and compiles a compact natural-language skill that is injected into the non-reasoning model's system prompt. Across four agentic benchmarks (ALFWorld, tau2-bench telecom and retail, and SpreadsheetBench-Verified), skills recover 55%-100%+ of the reasoning gap for GPT-5.4-mini on held-out tasks -- exceeding the reasoning mode outright on two of four -- while emitting 2.7-6x fewer output tokens and zero reasoning tokens. Notably, reasoning traces are not a prerequisite: skills distilled from non-reasoning trajectories alone remain competitive with skills distilled from paired reasoning/non-reasoning corpora, with domain-dependent differences between the two sources. We interpret these results through a search lens: test-time reasoning is deep search inside a single episode, re-paid at every deployment, while corpus distillation is wide search across episodes, paid once. The two recover overlapping procedural knowledge, and width over cheap trajectories is often the better buy -- with the residual gap on some domains (telecom, SpreadsheetBench) delineating where genuinely per-instance deep search remains necessary.
Prompt optimizers automate the search for prompts that improve language-model performance, but existing methods rely on a predefined optimization procedure: the algorithm determines which candidates to explore and how the search progresses, while the language model generates or refines prompt proposals. We introduce RLMOpt, a prompt optimizer that makes the search policy itself language-model-driven through a recursive language model (RLM). The RLM agent operates over a tool-based environment, inspecting task information, analyzing failures, generating candidates, allocating evaluation budget, and deciding when to stop. A deterministic harness complements the agent by enforcing objective scoring, Pareto-based selection, and regression constraints. We evaluate RLMOpt across four benchmarks spanning structured clinical information extraction (Chia), multi-hop question answering (HotpotQA), verifiable instruction following (IFBench-2025), and multi-turn tool-calling agents (BFCL). In a matched comparison at a single seed, RLMOpt obtains the best held-out score on all four benchmarks and leads the four-task mean (0.610 against 0.589 for GEPA). Repeating each benchmark across seeds yields 11 matched benchmark-seed comparisons, in which RLMOpt outperforms GEPA in 9 cases. Across all 11 runs, it never produced a prompt that underperformed its seed, whereas GEPA fell below its starting point twice. It is also more efficient, achieving these results with fewer search rollouts while producing prompts that are 27-79% the size of those produced by GEPA. Our results further show that optimization gains are determined primarily by the headroom available in the seed prompt, rather than by the search budget. Efficient optimization therefore depends on reaching the available headroom reliably and with minimal search
Automated prompt optimization methods (e.g., DSpy, TextGrad) can substantially improve the performance of large language model (LLM), however, their generalization ability across different tasks remains underperformed. In practice, the superiority of the optimized prompt on one benchmark often fails to transfer to another, and this limitation persists even when switching across different LLM backbones. To investigate the underexplored sources of heterogeneity in prompt performance, we conduct a causal inference-inspired observational analysis of optimized prompts across a diverse set of optimization frameworks, LLM backbones, and NLP benchmarks. To achieve the goal, we build upon the propensity-adjusted associational analysis together with multiple complementary representations of prompt edits, where the consistent task-conditioned edits patterns are identified. We find that complexity-increasing and meta-instructional edits are negatively associated with mathematical and multi-hop reasoning performance, whereas step-by-step and meta-cognitive edits improve logical and sequential reasoning tasks. These effects are robust across cognitive-load annotations, surface-level text features, and edit-motif analyses, and can generalize across optimization frameworks. Overall, these results indicate that prompt optimization failures arise from systematic interactions between edit families and task characteristics rather than random optimization artifacts, providing feature-level characterization of optimizer behavior and motivating future task-conditioned optimizer design.
Shuzhi Gong, Hechuan Wen
The University of Melbourne, Melbourne, Victoria, Australia · The University of Queensland, Brisbane, Queensland, Australia