The Research Report
EEVEE: When AI Agents Learn Their Own Prompts at Test Time
How Princeton's AI2 Lab solved the messy, multi-task reality that breaks every existing prompt optimization method — and why a cartoon creature from Gen I might be the mascot self-improving agents needed.
The promise of self-improving AI agents is seductive: deploy a model, let it interact with the world, and watch it get better over time. The reality is messier. Real agents don't see one tidy benchmark after another. They get hit with graduate-level physics questions, financial formula lookups, theorem proofs, and Python coding tasks in the same operating loop — all interleaved, all demanding different kinds of reasoning.
When you try to optimize a single prompt for that kind of mixed stream, everything falls apart. Feedback that helps with code generation hurts theorem proving. Improvements on mathematical reasoning degrade performance on factual knowledge. The prompt becomes a battleground where task families compete for attention, and nobody wins.
That's the problem EEVEE solves. Released this month by Weixian Xu, Shilong Liu, and Mengdi Wang from Princeton University's AI2 Lab (with Xu visiting from Shanghai Jiao Tong University), EEVEE — short for Evolutionary Evaluation and Versatile Expert Ensembles — is the first multi-dataset test-time prompt learning framework for LLM agents. It learns specialized prompts during inference, routes each input to the right specialist, and avoids the catastrophic interference that kills existing methods when tasks get diverse.
The results are striking: on a four-benchmark suite mixing GPQA Diamond, Formula, TheoremQA, and HumanEval, EEVEE improves average scores by 10.38 points over Qwen3-4B-Instruct baselines and 24.32 points over DeepSeek-V3.2 baselines. Against the best existing prompt-learning methods — GEPA and ACE — EEVEE outperforms by up to 37.2% and 48.2% respectively. And critically, where those baselines accumulate negative retention as more tasks enter the stream, EEVEE stays positive.
The Interference Problem
To understand why EEVEE matters, you have to understand what goes wrong without it.
Existing test-time prompt learning methods — GEPA (gradient-free evolutionary prompt adaptation), ACE (adaptive context evolution), and their predecessors — work well in controlled settings. Feed them one benchmark at a time, and they improve the model's performance by iteratively refining the system prompt based on feedback from correct and incorrect examples.
But real deployment isn't one benchmark at a time. An agent handling customer support might see billing disputes, technical troubleshooting, and feature requests in the same hour. A research assistant might toggle between literature search, data analysis, and draft writing. The task distribution shifts constantly.
The paper demonstrates this elegantly. When GEPA and ACE are given an incremental stream — first GPQA Diamond, then Formula added, then TheoremQA, then HumanEval — their cumulative retention plummets. Each new benchmark's feedback degrades what was learned from previous ones. GEPA ends at -15.36 cumulative retention after all four tasks. ACE ends at -18.58. These are negative numbers. The models are literally worse than where they started.
This isn't a minor degradation. It's catastrophic. The very mechanism that improves performance on one task family actively harms performance on others. A single prompt simply cannot serve four masters.
Route First, Then Specialize
EEVEE's core insight is deceptively simple: don't force all inputs through one prompt. Instead, maintain a set of K specialized prompt slots and learn a router that assigns each input to the most appropriate slot.
At inference time, the process is straightforward:
- An input arrives
- The router selects a slot: z = R(x; P) ∈ {1, ..., K}
- The target model processes the input with that slot's prompt: ŷ = M(x; p_z)
No weight updates. No fine-tuning. The target model stays frozen. Only the prompts change, and they change in specialized ways that don't interfere with each other.
This routing architecture is what makes multi-dataset adaptation possible. A prompt optimized for code generation (where the model needs to produce complete function bodies with proper indentation and return statements) can coexist peacefully with a prompt optimized for closed-book science QA (where the model needs domain priors and elimination strategies). They never compete for the same real estate in the same prompt string.
The Chicken-and-Egg Problem
But there's a catch. The router and the prompts depend on each other.
The router's quality depends on the prompts it's routing to — a route to a bad prompt is a bad route, regardless of how well it groups similar inputs. Meanwhile, the prompts' quality depends on which examples the router sends them — a prompt can only specialize in what it actually sees.
This mutual dependency makes naive approaches fail. You can't first learn the router and then learn the prompts (the router was optimized for prompts that no longer exist). You can't first learn the prompts and then learn the router (the prompts were learned without knowing their assignment boundaries).
EEVEE's solution is router-prompt co-evolution: interleaved phases where router and prompt learning alternate, each improving based on the other's current state. In each cycle:
- Router evolution: Fix the current prompts. Search for a better router by mutating the current router prompt, analyzing routing failures (cases where the assigned slot fails but another slot succeeds), reflecting on why reassignment would help, and keeping the mutation or reflection that scores better on a mini-batch.
- Prompt evolution: Fix the current router. Route all data through the router to form slot-specific training sets. Independently evolve each slot's prompt using mutation and reflection, keeping improvements that score above the empty-prompt baseline and adding to a Pareto-front pool.
This alternation means routing decisions and prompt specializations improve together rather than in isolation. The router learns better partitions as prompts become more specialized, and prompts become more specialized as the router sends them better-targeted examples.
Three Stages of Training
Co-evolution alone isn't enough — you need careful staging to make it work. EEVEE uses a three-phase design:
Stage 1: Initialization
Before co-evolution can start, you need prompt slots that are good enough for the router to evaluate. EEVEE runs prompt learning on the mixed training set and builds a Pareto-front pool of prompts. Each prompt is represented by its correctness vector over the validation set. A prompt is dominated if another is at least as correct on every example and strictly better on one. The frontier preserves prompts with complementary strengths.
From this pool, EEVEE greedily selects K prompts that maximize marginal coverage — each new prompt covers examples that no previously selected prompt covers. This ensures the initial slots have distinguishable behavior, which is essential for the router to make meaningful routing decisions.
Stage 2: Exploration
Starting from the initialized prompts and an initial router, EEVEE alternates router and prompt evolution under lightweight budgets. Frequent switching is critical here: fully optimizing prompts under an unstable router wastes compute, while fully optimizing a router against stale prompts causes overfitting to outdated prompt behavior.
An annealing mechanism shifts router scoring weights from consistency and balance (encouraging diverse routing early) toward downstream accuracy (rewarding correct routing later). This prevents premature convergence to a router that looks good on paper but serves bad prompts.
Stage 3: Convergence
Once the router stabilizes, EEVEE fixes R* and spends a larger prompt-learning budget within each routed group. This is where the real specialization happens. With routing no longer shifting under them, each prompt can fully optimize for its assigned task cluster without interference.
This three-stage design — initialize, explore, converge — mirrors the curriculum used in many optimization algorithms. Start with diverse coverage, search broadly, then exploit what you've found. The difference is that EEVEE applies this curriculum jointly to the router and the prompts, not just to one or the other.
The Numbers
The benchmark results tell a clear story. On the four-benchmark suite (GPQA Diamond, Formula, TheoremQA, HumanEval):
| Target Model | Method | GPQA | Formula | TheoremQA | HumanEval | Avg. |
|---|---|---|---|---|---|---|
| Qwen3-4B-Instruct | Baseline | 56.00 | 45.22 | 14.79 | 49.46 | 41.37 |
| Qwen3-4B-Instruct | ACE | 48.93 | 39.67 | 15.84 | 35.23 | 34.92 |
| Qwen3-4B-Instruct | GEPA | 50.84 | 49.83 | 19.62 | 30.62 | 37.73 |
| Qwen3-4B-Instruct | EEVEE | 54.55 | 54.55 | 25.27 | 72.63 | 51.75 |
| DeepSeek-V3.2 | Baseline | 64.98 | 30.00 | 21.21 | 42.82 | 39.75 |
| DeepSeek-V3.2 | ACE | 55.89 | 37.78 | 27.05 | 78.59 | 49.83 |
| DeepSeek-V3.2 | GEPA | 41.75 | 60.56 | 31.72 | 89.29 | 55.83 |
| DeepSeek-V3.2 | EEVEE | 63.08 | 60.55 | 39.84 | 92.82 | 64.07 |
Notice the pattern: ACE and GEPA often improve one or two benchmarks while severely degrading others. On Qwen3-4B, ACE improves HumanEval by 35 points over baseline but tanks GPQA by 7 points. GEPA improves Formula by 4.6 points but drops HumanEval by nearly 19 points. These aren't minor trade-offs — they're evidence that single-prompt methods cannot handle task diversity.
EEVEE, by contrast, improves three out of four benchmarks on Qwen3-4B (with only a 1.45-point drop on GPQA) and all four benchmarks on DeepSeek-V3.2. The HumanEval improvement is particularly dramatic: +23.17 on Qwen and +50.00 on DeepSeek.
Ablations: Why Each Component Matters
The paper's ablation studies are informative. On Qwen3-4B:
| Method | Avg. Score |
|---|---|
| Baseline (no adaptation) | 41.37 |
| Default router (no learned routing) | 43.58 |
| Manual router (GPT-5.4-written, fixed) | 37.18 |
| No co-evolution (sequential: learn router first, then prompts) | 42.88 |
| Full EEVEE | 51.75 |
Three takeaways:
- A default router is barely better than no adaptation. Replacing the learned routing prompt with a blank or simple default field gives only +2.21 points. The router needs to learn task-specific routing behavior.
- A manually written router is worse than no adaptation. A GPT-5.4-written router scores 37.18 — 4.19 points below baseline. Human or LLM intuition about routing doesn't capture the behavioral signal that matters.
- Co-evolution is essential. Learning the router and prompts sequentially (no co-evolution) gives only +1.51 points. The mutual dependency is real and must be addressed through interleaved optimization.
These findings underscore a key insight: you can't just route by task labels or surface features. The router needs to learn from downstream performance — from whether a particular assignment actually helps the model get the right answer. And it needs to co-adapt with the prompts it's routing to.
Case Studies: What Learned Prompts Actually Capture
The paper's case studies are where EEVEE's approach really shines. The learned prompts aren't just memorizing training examples — they're capturing reusable procedures.
Formula benchmark: On a free cash flow calculation task, the baseline Qwen model reverses the subtraction and keeps million-scale decimals, producing -0.40. The learned prompt enforces the supplied financial formula at dollar scale and emits a parseable numeric answer: 400000.00. The prompt didn't just learn this specific formula — it learned a general rule: apply the given formula, use the correct unit scale, and format as a strict numeric answer.
HumanEval: On a task to sum even values at odd indices, the baseline produces a bare expression without indentation or return statement. The learned prompt produces a complete function body with an accumulator, a for loop, and a return statement. The prompt learned an output contract for executable code — not just the algorithm, but the structural requirements of a runnable function.
GPQA Diamond (the negative case): Interestingly, EEVEE's learned prompts sometimes make domain QA worse. On a question about which Earth-like exoplanet is densest, the learned prompt applies formulaic density reasoning and incorrectly concludes that all Earth-composition planets have approximately Earth's density. The baseline, without the prompt, correctly used the rocky-planet prior that higher mass increases self-compression and density. The takeaway: generic reasoning improvements can backfire when the missing ingredient is domain-specific knowledge, not better reasoning.
This last case is worth sitting with. EEVEE's framework routes inputs to specialized prompts, but if none of the prompts encode the right domain prior, the model will reason more confidently in the wrong direction. The paper is honest about this limitation — a refreshing change from methods that only report their wins.
The Efficiency Angle
Token cost matters. EEVEE averages 4,320 tokens per example at final test time, comparable to GEPA and far below ACE's expanding playbook context. The router adds minimal overhead — one routing step per input — while the prompt slots are fixed-size strings prepended to the model's input.
This efficiency is by design. Each slot prompt is a learned instruction, not a growing context window. The Pareto-front selection ensures that prompts are minimal and complementary rather than redundant. And because routing happens before the model processes the input, there's no need for the model to reason about which task it's handling — the router handles that upstream.
How It Connects to the Broader Prompt Engineering Landscape
EEVEE lands in a research space that's been heating up rapidly. Test-time prompt learning has seen a flurry of recent work:
- GEPA (gradient-free evolutionary prompt adaptation) iteratively refines prompts using mutation and reflection on a single benchmark. Strong in the single-task setting, but accumulates negative retention in multi-task streams.
- ACE (adaptive context evolution) maintains an evolving context of past examples and reasoning. Also single-benchmark oriented, with expanding context that increases token cost.
- SePO (self-evolving prompt optimization) uses open-ended evolutionary search to optimize system prompts alongside task agents. Demonstrated on AIME25, ARC-AGI-1, GPQA, MBPP, and Sudoku.
- CRAFT (Pareto-front prompt optimization) treats accuracy-cost tradeoffs as multi-objective search, avoiding scalarization collapse.
- DiSR (decomposing prompts into scaffolds and residuals) splits prompts into domain-invariant reusable scaffolds and task-specific residuals.
EEVEE's contribution relative to this landscape is its explicit treatment of cross-dataset interference. Where other methods assume a single adaptation objective or a stationary task distribution, EEVEE confronts the reality that agents encounter heterogeneous task streams. The router-prompt co-evolution strategy is the first principled approach to learning which prompt should handle which input — not just what that prompt should say.
The Code
The implementation is available on GitHub at Princeton-AI2-Lab/EEVEE under the Apache 2.0 license. It's Python-based (95.3% Python, 4.7% Jinja), supports OpenAI-compatible chat completion APIs through provider:model specs, and includes a demo configuration:
git clone https://github.com/Princeton-AI2-Lab/EEVEE.git
cd EEVEE
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
export OPENROUTER_API_KEY="..."
python main.py configs/demo.yaml
The repo includes usage documentation for benchmarks, model specs, smoke tests, output artifacts, and repository layout. At 11 GitHub stars as of this writing, it's early days — but the code quality and documentation suggest a team that intends for this to be used, not just cited.
Why This Matters for Agent Developers
If you're building production agents, EEVEE addresses a problem you've almost certainly hit: your system prompt works great for one type of task but breaks when you try to extend it to cover more. The instinct is to keep adding instructions, but that creates a prompt that's simultaneously too specific for general tasks and too general for specific ones.
EEVEE offers a different mental model. Instead of one monolithic prompt, maintain a portfolio of specialized prompts and learn which one to route to. The routing is itself learned from downstream performance, not from surface-level task labels or human intuition. And the whole system co-evolves: as prompts specialize, the router gets better at routing; as routing improves, prompts get better training signals.
This is particularly relevant for agents that operate across multiple domains — which, let's be honest, is most production agents. A coding agent also needs to explain its code. A research assistant also needs to format citations. A customer support bot also needs to escalate edge cases. The heterogeneity is the norm, not the exception.
Limitations and Open Questions
EEVEE isn't without limitations. The GPQA Diamond results show that routing can't compensate for missing domain knowledge — if none of your prompt slots encode the right prior, you'll reason more confidently toward the wrong answer. The paper is refreshingly honest about this.
The three-stage training process (initialize, explore, converge) adds complexity compared to single-stage methods. While the paper shows stable performance across annealing and weighting settings, the hyperparameter space is still larger than simpler baselines. Practitioners will need to tune budget allocation across stages.
The router itself is a prompt — meaning it's also subject to the same kinds of failures and adversarial manipulation as any prompt. The paper doesn't address adversarial inputs designed to confuse routing, which could be a meaningful attack surface in production settings.
Finally, the evaluation is on four benchmarks with two models. Scaling to more diverse task mixtures, more models, and truly real-world agent workflows (where task boundaries are fuzzy and evaluation is noisy) remains future work.
Bottom Line
EEVEE takes a real, practical problem — cross-dataset interference in test-time prompt learning — and solves it with a principled, well-engineered framework. The router-prompt co-evolution strategy is novel, the three-stage training design is thoughtful, and the results speak for themselves: +10.38 and +24.32 average points over baselines, with positive retention where existing methods go negative.
For anyone building agents that need to handle diverse task streams, this is work worth paying attention to. The code is open, the license is permissive, and the approach is directly applicable to the heterogeneous environments where real agents operate.
The days of one-prompt-fits-all are ending. EEVEE shows us what comes next: learned routing to specialized prompts, co-evolving together, getting better at both routing and reasoning over time. It's not just test-time adaptation — it's test-time specialization, and it works.
References:
- Xu, W., Liu, S., & Wang, M. (2026). EEVEE: Towards Test-time Prompt Learning in the Real World for Self-Improving Agents. arXiv:2606.11182. PDF
- Project website: princeton-ai2-lab.github.io/EEVEE
- Code: github.com/Princeton-AI2-Lab/EEVEE (Apache 2.0)
- Benchmark datasets: GPQA Diamond (Rein et al., 2023), Formula (Liu et al., 2025), TheoremQA (Mishra et al., 2022), HumanEval (Chen et al., 2021)