arXiv:2604.08801 | April 2026

When it comes to steering large language models, the system prompt matters. A well-crafted system prompt can dramatically improve performance without touching the model's weights. But automatically finding that prompt has been a crapshoot. On some tasks, optimization works beautifully. On others, it flat-out fails.

A new paper from researchers at Cornell, Microsoft, Harvard, and Databricks gets to the bottom of this inconsistency. Their method, called p1, doesn't just improve prompt optimization. It explains why prompt optimization has always been unpredictable, and in doing so, reveals a counterintuitive insight that flies in the face of conventional wisdom: using fewer prompts can produce better results.


The Core Problem: Why Does Prompt Optimization Sometimes Not Work?

System prompts shape how a language model reasons, formats output, and follows instructions. Prompt optimization treats this as a reinforcement learning problem. A prompt-generation policy proposes candidate system prompts. Each candidate gets scored based on task accuracy. The policy learns to propose better prompts over time.

Simple in concept. Messy in practice.

On instruction-following benchmarks like IFBench, this works beautifully. The training reward climbs steadily. Evaluation accuracy improves. But on competition math benchmarks like AIME, something goes wrong. The training reward barely moves. The optimized prompts fail to outperform random ones. The same algorithm, the same compute, wildly different outcomes.

The paper's first contribution is diagnostic. The authors decompose reward variance into two distinct components.

Variance among responses captures generation stochasticity. Even with a fixed system prompt, the model can produce many different outputs. Some correct, some wrong. This variance is noise from the perspective of prompt selection.

Variance among system prompts captures real differences in prompt quality. A good system prompt consistently leads to better outcomes than a bad one. This variance is signal.

On IFBench, the signal dominates. Different system prompts produce clearly different reward distributions. The learning algorithm can tell good from bad. On AIME, the noise dominates. Even good system prompts produce inconsistent results because math reasoning is inherently stochastic. The response variance swamps the signal, making it impossible to identify which prompt is actually better.

This is the fundamental learnability problem. Prompt optimization only works when variance among system prompts is sufficiently large relative to variance among responses. When generation stochasticity dominates, the reward signal becomes unreadable.


The Counterintuitive Finding: More Prompts Can Hurt

Here is where things get strange.

Conventional machine learning intuition says more data helps. But the researchers found that scaling the number of user prompts can actually degrade prompt optimization performance.

The mechanism is subtle. Different user prompts don't all respond to the same system prompt the same way. A system prompt that helps on one math problem might hurt on another. When you average reward across many diverse prompts, these preferences cancel out.

The result is that candidate system prompts begin to look statistically identical in their expected reward. The variance among system prompts shrinks. The optimization signal dilutes. More data actively obscures what you are trying to learn.

This effect is especially severe on heterogeneous tasks like mathematical reasoning. Different problems tax different reasoning capabilities. A prompt emphasizing step-by-step reasoning might ace geometry but stumble on number theory. Averaging over a diverse math dataset masks these task-specific strengths and weaknesses.

On homogeneous tasks like instruction following, a good system prompt helps consistently across the dataset. The signal survives averaging. That is why prompt optimization works on IFBench without filtering.

The practical implication is stark. Throwing more training prompts at prompt optimization is not just wasteful. It can be counterproductive.


p1: Selecting the Right Prompts to Optimize On

The researchers' solution is elegant. Instead of optimizing on the full dataset, p1 filters user prompts to select a small subset with high variance across candidate system prompts.

Why high variance? Because those are the prompts that best distinguish strong system prompts from weak ones. They provide the clearest signal for the learning algorithm. Prompts where all system prompts perform similarly offer no signal. Those get discarded.

The filtering happens before training begins. The researchers sample a set of candidate system prompts from the initial policy. For each user prompt, they measure how much the reward varies across these candidates. Prompts where the reward differences are large get kept. Prompts where all candidates perform similarly get dropped.

This sounds simple, and it is. But the effect is profound.

On AIME, training on all 30 prompts yields no improvement. The signal-to-noise ratio is too low. But training on just 2 prompts from AIME 24, selected by this variance criterion, produces a system prompt that generalizes well to other reasoning benchmarks.

The learned prompt does not overfit to the two specific problems. It transfers. The researchers showed that prompts optimized on Qwen3-4B-Instruct-2507 also improve the larger Qwen3-30B-A3B-Instruct-2507 and boost performance on benchmarks not seen during training.


How p1 Compares to Baselines

The researchers compared p1 against the base model with no optimization and against GEPA, an evolutionary prompt optimization method.

On AIME 2024 training data with Qwen3-4B, p1 substantially outperforms both. The base model achieves a certain accuracy baseline. GEPA shows some improvement but plateaus. p1 continues climbing and achieves higher final accuracy.

More importantly, p1's gains transfer. When evaluating on AIME 2025, MATH, and other reasoning benchmarks not seen during training, the system prompts learned with p1 continue to outperform the base model and GEPA.

The cross-model transfer is also notable. A prompt learned on a 4-billion-parameter model improves a 30-billion-parameter model. This suggests the learned system prompt encodes general principles about reasoning style and problem approach, not just task-specific quirks.


Related Work: Submodular Evaluation Subset Selection

The p1 paper is not alone in recognizing that prompt evaluation data selection matters. A concurrent paper from researchers at Santa Clara University and Walmart Global Tech, Submodular Evaluation Subset Selection in Automatic Prompt Optimization (SESS), frames evaluation subset selection as a submodular optimization problem.

SESS shows that the objective of selecting evaluation prompts to maximize prompt quality is monotone and submodular under mild conditions. This means greedy selection provides theoretical approximation guarantees. The approach achieves better optimized prompts than random selection or simple heuristics on GSM8K, MATH, and GPQA-Diamond.

Both lines of work arrive at the same high-level conclusion: not all prompts are equally useful for evaluating or optimizing system prompts. Intelligent filtering dramatically improves results.

The papers differ in framing. SESS focuses on the evaluation phase. p1 focuses on the training phase for prompt-generation policies. But they share the core insight that subset selection is a lever for making prompt optimization tractable where it previously was not.


What This Means in Practice

Prompt optimization has always been computationally expensive. Evaluating each candidate system prompt requires generating multiple responses across multiple user prompts. Throwing more data at the problem compounds the cost while, as this paper shows, often degrading the signal.

p1 offers a principled way to reduce compute while improving results. By filtering to the highest-variance prompts, practitioners can run faster experiments with smaller datasets and expect better outcomes.

For tasks with high response variance and heterogeneous user prompts, this approach may be essential. On math reasoning, code generation, and other domains where generation is stochastic and problem-dependent, the full-dataset approach is simply untenable.

The broader lesson is about signal quality in reinforcement learning from AI feedback. More rollout data does not automatically mean better learning. The structure of what you are learning from matters enormously. p1 is a concrete demonstration that investing in data quality, not just quantity, pays off.


Summary

  • Prompt optimization fails when response variance dominates system prompt variance
  • Adding more user prompts can hurt by canceling out preferences across heterogeneous tasks
  • p1 filters user prompts to those with highest variance across system prompts
  • Just 2 well-chosen prompts from AIME 24 can yield a generalizable optimized system prompt
  • The approach outperforms full-dataset optimization and strong baselines like GEPA
  • Learned prompts transfer across model sizes and to unseen benchmarks

The paper is available on arXiv.