Manuscript Offprint

arXiv:2611.01135

Compile as Hypothesis: A Headroom Typology for Prompt Optimization on Real Reasoning Models

Zhengshuai Yang, Changyun Li

Abstract

Automated prompt compilers search for or rewrite prompts under the implicit assumption that optimization consistently improves downstream task performance. We evaluate this assumption on frontier reasoning models through rigorous paired, same-day measurements. Across four optimizer families (genome search, profile-guided mutation, GEPA, and ESPO) and eight tasks, structured search yields no statistically significant accuracy gains on strong reasoners. However, a discrete structural genome provides essential architectural stability, preventing catastrophic bimodal seed-collapse (where unconstrained search collapses toward the judge floor in 3/5 runs). Through 190-problem evaluations on knowledge-intensive benchmarks, we establish a three-dimensional headroom typology: prompt optimization cannot compensate for intrinsic knowledge deficits or physical token truncation, but successfully resolves protocol and formatting errors. On gpt-6, while free-text reflective search (GEPA) yields a +.14 gain on a task where structured search remains flat, qualitative ablation reveals that ~.035 stems from judge-rubric reconstruction while ~.105 reflects genuine instruction refinement. Our pre-registered AUTOAPC-SELECT deployment gate matches the oracle policy in 5/7 groups and rescues seed-collapse arms with zero regret. Finally, we expose silent backend-mixing in commercial APIs during outage windows and provide automated per-call audit verification tools to ensure empirical evaluation fidelity.

1 Introduction

The prompt required for a complex downstream task depends intimately on the underlying LLM: models vary substantially in format sensitivity (Sclar et al., 2024) and functional skill profiles (Chen et al., 2023; Liang et al., 2023). While benchmark suites rank aggregate model performance, they offer no actionable guidance for prompt construction. Prompt compilers such as DSPy (Khattab et al., 2024) systematically optimize prompts for specific models, but typically treat the benefit of compilation as an implicit given. Without rigorous paired evaluation against the uncompiled prompt, automated pipelines risk deploying degraded or destabilized prompts without detecting the loss.

Research gap. Existing prompt compilers (Khattab et al., 2024; Agrawal et al., 2025) implicitly assume that optimization improves downstream performance and deploy the best-scoring candidate without paired comparison to the uncompiled base. Without direct measurement of the compilation prior, automated pipelines risk deploying degraded prompts—especially when search exhibits seed-level fragility or when the task lacks exploitable headroom. No prior work systematically evaluates when prompt optimization succeeds versus when it fails, nor establishes operational boundaries for deployment decisions.

We measure the compilation prior directly. Under our Compile-as-Hypothesis protocol, every compiler output is treated as a testable hypothesis that must demonstrate empirical superiority before deployment. The pipeline executes two roots in parallel under identical evaluation budgets: a profile-rule root (APC-FULL) and the uncompiled base root (APC-SAFE), deploying whichever arm proves superior on holdout validation. The compilation prior, defined as Δ(rule-root,base-root)\Delta(\text{rule-root}, \text{base-root}), is thus an empirically signed quantity.

We evaluate this protocol across three complementary environments: APCBench (a deterministic four-task simulator providing exact ground truth across three distinct model profiles), real-world reasoning experiments with qwen3.8-flash on three enterprise tasks, and five external bench-

*Corresponding author.

marks unseen by the authors: GSM8K (Cobbe et al., 2021), MATH Level-5 (Hendrycks et al., 2021), AIME 2024+25, GPQA-Diamond (Rein et al., 2024), and HLE-exact (Phan et al., 2025). Our evaluation benchmarks official reproductions of leading open-source optimizers, including GEPA (Agrawal et al., 2025) and ESPO (Anonymous, 2026b), replicated across gpt-6 and independent infrastructure providers with strict per-call backend verification.

Our empirical findings reveal fundamental boundary conditions for automated prompt optimization: on frontier reasoning models, structured prompt search yields no statistically significant accuracy gains. The base-root arm reliably preserves zero-shot performance within the empirical noise band across all real tasks, whereas unguided profile-rule search introduces severe instability across seeds, including bimodal collapse down to .13. Official GEPA and ESPO reproductions similarly fall within the paired same-day noise band. Under restricted token budgets, all six optimization pathways pin at the judge floor. External competitive benchmarks reproduce these null gains, as the model saturates benchmark ceilings (AIME: 60/60). Crucially, the primary benefits of compilation are structural: a discrete genome prevents catastrophic seed-collapse, and zero-shot cross-task transfer matches target-task zero-shot performance without adaptation budget (up to +.79 over cold re-search). Our pre-registered AUTOAPC-SELECT deployment gate successfully rescues both seed-collapse arms with zero regret.

These findings demonstrate that the underlying headroom dimension dictates whether prompt optimization can succeed. Our headroom typology distinguishes three fundamental operational failure modes:

  1. Knowledge headroom: Missing capabilities or domain facts in model weights.

  2. Physical headroom: Truncated context or output token capacity.

  3. Protocol headroom: Formatting, interface schema, and instruction parsing errors.

Prompt optimization successfully addresses protocol headroom (3) through structured genomes, but fundamentally cannot resolve knowledge (1) or physical (2) limits (Figure 1). In a 190-problem HLE-exact evaluation with reachable headroom, all six optimization arms tie. The tie recurs on GPQA-Diamond (n=190n=190), where reflective search exhausts 28 iterations learning domain heuristics without closing the knowledge gap. When tasks are knowledge-bound, pipelines must pivot to retrieval or model scaling rather than wasting optimization cycles.

Furthermore, optimization dynamics depend heavily on search space constraints. On gpt-6, free-text reflective search (GEPA) achieves a +.14 gain on financial analysis where structured search shows zero headroom. Analysis of the evolved prompt reveals that the optimizer partially reconstructed the deterministic scoring rubric from failure feedback; this judge-gaming accounts for ∼.035\sim.035 of the score, while ∼.105\sim.105 represents genuine task-instruction refinement. Gated ESPO remains null on the identical cell under verified backend enforcement, showing that this divergence is unique to unconstrained reflective rewriting. Finally, our multi-provider audit exposes an undocumented threat to NLP benchmarking: during API outage windows, commercial gateways silently reroute traffic to fallback models. We implement an automated per-call audit mechanism that detects and quarantines contaminated serving windows.

Why this negative result matters. Our findings challenge the implicit assumption underlying automated prompt engineering pipelines: that optimization consistently yields deployable improvements. By demonstrating null gains across four optimizer families on frontier reasoners, we establish clear operational boundaries for when to invest in prompt search versus when to pivot to model scaling or retrieval. The headroom typology prevents wasted optimization cycles on knowledge-bound tasks, while AutoAPC-Select safeguards against seed-level collapse observed in 3/5 unconstrained runs. Without paired measurement, existing pipelines would blindly deploy these degraded prompts.

References (21)