AI agents
Replanning, Branching, and Search Budgets
Use branches, candidate plans, and search only where verification can justify the extra compute.
By the end you can
- Define bounded plan search as an operational contract rather than a capability label
- Contrast Single trajectory with Best-of-N in “An analysis agent generated thirty candidate approaches and evaluated none of them rigorously”
- Trace “Search amplifies evaluator weaknesses” through a concrete execution path
- Produce “Budget a branching experiment” with evidence for “Additional branches increase verified task success at a known cost”
Example
More LM calls first improved the answer, then degraded it
Adding calls to a compound system improves the answer, and then makes it worse. The curve goes up and comes back down. Chen and colleagues measured the turn in 2024. They ran majority-vote (Vote) and filter-then-vote (Filter-Vote) systems on MMLU Physics, TruthfulQA, GPQA and AVERITEC. Their introduction states it plainly: “Specifically, although one might expect their performance to monotonically increase as more LM calls are invoked, we have identified a surprising phenomenon, across multiple language tasks, exhibited by these systems: growing the number of LM calls initially improves performance but then degrades it, as shown in Figure 1.”
The mechanism is simple. Extra calls help easy queries and hurt hard ones, so the aggregate curve turns over. The direction is not even uniform across systems on the same benchmark. On MMLU Physics, Vote first increases then decreases; Filter-Vote first decreases then increases. A run that produces thirty candidates and evaluates none of them rigorously is not buying a probability of correctness. It is buying a position on a curve nobody in the room has plotted.
- Decision at stake: Use branches, candidate plans, and search only where verification can justify the extra compute. On MMLU Physics, TruthfulQA, GPQA and AVERITEC, more calls first improved performance and then degraded it.
- Hidden assumption: More branches automatically increase the probability of a correct result. Chen and colleagues found majority-vote and filter-then-vote systems non-monotone in the number of LM calls, on four named benchmarks.
- Primary control question: Search amplifies evaluator weaknesses. With your scorer held fixed, is the curve still rising at the branch count you are paying for, or are you past the turn?
- Evidence to collect: Additional branches increase verified task success at a known cost, plotted per benchmark rather than assumed. Remember that extra calls helped easy queries and hurt hard ones, and that Vote and Filter-Vote moved in opposite directions on MMLU Physics.
Case
Game of 24, from 4 percent to 74 percent
Search pays when the branches can be checked, and not otherwise. Game of 24 is the clean case. A 2023 paper called Tree of Thoughts reports that “while GPT-4 with chain-of-thought prompting only solved 4% of tasks, our method achieved a success rate of 74%”. Repeated sampling does something similar on code. On SWE-bench Lite, Brown and colleagues reported in 2024, “the fraction of issues solved with DeepSeek-Coder-V2-Instruct increases from 15.9% with one sample to 56% with 250 samples”.
Both numbers rest on a check a machine can run without a human in the loop. Game of 24 arithmetic can be evaluated. SWE-bench Lite runs the repository's own tests. Note also what 250 samples bought: a large multiple of the attempts for a much smaller multiple of the resolve rate. In domains without an automatic verifier, the same authors report that majority voting and reward models plateau beyond several hundred samples. The verifier, not the sampler, is what makes the curve climb.
Figure
Visual
The budget policy and the fallback rule need different owners
Branches are proposed. A cheap filter removes most of them, an evaluator ranks what survives, a budget policy says when to stop, and a selection rule decides what leaves the building. AlphaCode ran exactly that pipeline with a number on every box. DeepMind published it in Science in 2022.
The sampler produced up to one million programs per problem. The problem's own example tests were the cheap filter: “Filtering removes approximately 99% of model samples, although the exact amount depends on the problem and model, and filtering can still leave tens of thousands of candidate samples for many problems.” The survivors were clustered by behaviour, and at most 10 were submitted. The actual average was 2.4 submissions per problem solved. That bought a top 54.3% placing across 10 Codeforces contests.
The budget policy is where the honesty lives. On the validation set the 41B-plus-clustering system went from 21.0% at 10@1k to 34.2% at 10@1M. A 1000x sample budget bought about 13 points. Two separate decisions hide in that sentence: how much to spend, and what to hand over. They should not share an owner or a test.
- 1
Branch proposal
Generate a small set of meaningfully different candidates.
- 2
Cheap filter
Reject invalid, duplicate, or policy-violating branches early.
- 3
Evaluator
Use tests, constraints, evidence, or calibrated graders.
- 4
Budget policy
Limit depth, width, tools, tokens, and wall-clock time.
- 5
Selection and fallback
Choose, combine, escalate, or return no answer.
Branching multiplies calls before it improves anything
Planning search creates multiple candidate actions or plans, evaluates them, and chooses or expands promising branches. It can help when errors are detectable and alternatives differ meaningfully. The multiplication of model calls, tools, context, and merge complexity is charged the moment you fan out. Without strong evaluators, search may select the most persuasive candidate rather than the most correct one.
There is a ceiling on the fan-out, and the compute budget is not what sets it. Stroebl and colleagues showed that an imperfect verifier's false-positive rate caps what resampling can deliver, whatever you spend. Once false positives carry a cost, the optimal number of attempts collapses: “Empirical results show that optimal sampling attempts are often fewer than 10, as the negative utility of false positives outweighs benefits, bending inference scaling curves downward.” At a cost-benefit ratio of 4, the optimal number of samples was K ≤ 5. That held for all four models they tested, drawn from the Llama-3.1 and Code Llama families on HumanEval/HumanEval+. If the ratio is high enough, the optimal K is zero. Sometimes the correct amount of search is none.
The ceiling on resampling is set by the verifier's false-positive rate, not by the compute budget: at a cost-benefit ratio of 4 the optimum was K ≤ 5 for all four models tested.
Key idea
Search amplifies evaluator weaknesses
If the scoring rule rewards verbosity, confident style, or a flawed proxy, additional branches optimize that mistake. Two papers watched it happen and recorded the turning point.
OpenAI's GSM8K paper reranked sampled solutions with a 6B verifier in 2021. The gain ran up to 400 completions and reversed beyond that point. Same model, same verifier, more search. Cobbe and colleagues wrote it down beside the figure: “At this scale, performance improves as we increase the number of completions up to 400. Beyond this point, performance start to decrease. This suggests that the benefits of search are eventually outweighed by the risk of finding adversarial solutions that fool the verifier.” The verifier was still worth having. On the full dataset, 6B verification slightly outperformed a finetuned 175B model, a boost the authors describe as approximately equivalent to a 30x model size increase. What failed was the assumption that more of it is better.
The effect has a name and a shape. Gao and colleagues called it overoptimization and fitted a curve to it: “Optimizing too much against such a model eventually hinders the true objective, a phenomenon we refer to as overoptimization.” Under best-of-n sampling against a proxy reward model, the gold-standard reward rises and then falls. The fitted form is R_bon(d) = d(α_bon − β_bon·d), where d = sqrt(KL divergence from the initial policy). The decline is not an anomaly to be tuned away. Somebody has already drawn it.
Use task-grounded evaluators, adversarial checks, and a stopping rule tied to marginal evidence gain.
A weak scoring rule turns every extra branch into a better search for the thing it was already wrong about. The same verifier improved up to 400 completions and got measurably worse after it.
Analogy
Exploring Trails With a Limited Daylight Budget
Daylight is what limits a hiking team scouting routes before it commits. A few forks can be tested, not every one. Landmarks decide which paths deserve the walk.
Candidate plans cost far less than footsteps, and that is the difficulty rather than the relief. Nothing physical stops the search, so the budget has to be imposed and the landmarks have to be chosen. A landmark that is subtly wrong does not merely fail to help. It makes every additional hour of daylight a more thorough walk toward the wrong ridge.
Branching is useful only when evaluation can distinguish better paths before the budget is exhausted.
Steps
Budget a branching experiment
Give a branching experiment a fixed budget and run the single-branch baseline at the same cost. Two of the five steps below have published settings you can copy rather than invent: choosing evaluators, and allocating compute.
Choose evaluators. Hold the search constant, change only the scorer, and watch where the points actually come from. Lightman and colleagues ran best-of-N over 1,860 sampled solutions per problem, on 500 held-out MATH problems. Then they swapped the evaluator. The process-supervised reward model solved 78.2%, the outcome-supervised reward model 72.4%, and majority voting 69.6%. Their comment on the figure: “While the ORM performs slightly better than the majority voting baseline, the PRM strongly outperforms both.” With the amount of search fixed, the evaluator moved the result by 8.6 points. The better scorer has a price, and it is stated in labels. The training set behind it, PRM800K, contains 800K step-level labels across 75K solutions to 12K problems.
Allocate compute. A budget policy can be a mechanism rather than an instruction. The s1 paper, published in 2025, implements one it calls “budget forcing”. It terminates or extends the model's thinking by appending the word “Wait”. The model was finetuned on just 1,000 curated questions (s1K). The abstract reports: “Further, scaling s1-32B with budget forcing allows extrapolating beyond its performance without test-time intervention: from 50% to 57% on AIME24.” A budget is a knob someone can turn and measure, not a paragraph in a design document.
With diversity defined, hard filters in place, an evaluator chosen, and compute allocated, the final comparison should expose “Search amplifies evaluator weaknesses” and preserve evidence for “Additional branches increase verified task success at a known cost”.
- 1
Define branch diversity
Specify how candidates should differ in method or evidence.
- 2
Create hard filters
Remove invalid, duplicate, unsafe, and unsupported candidates.
- 3
Choose evaluators
Prefer execution tests, environment state, and human rubrics over style.
- 4
Allocate compute
Set maximum width, depth, retries, and tool calls.
- 5
Measure marginal value
Compare search against a single-trajectory baseline at equal cost.
Turn search off once and see if it earned its budget
Search should be an ablated mechanism. If it does not beat a simpler run under equal budget, remove it.
That ablation has been run the honest way. Snell and colleagues allocated test-time compute adaptively per prompt and priced it against a fixed baseline: “Using this compute-optimal strategy, we can improve the efficiency of test-time compute scaling by more than 4x compared to a best-of-N baseline.” The comparison that carried the claim was FLOPs-matched. On problems where a smaller base model already attains somewhat non-trivial success rates, test-time compute can be used to outperform a model 14x larger. Not more search. Better-allocated search, priced against an equal budget and against the alternative of simply buying a bigger model.
The person who turns search on owns “Search amplifies evaluator weaknesses”. The evidence that keeps bounded plan search in the system is “Additional branches increase verified task success at a known cost”.
Nobody can defend a branching budget they never tried switching off. When Snell and colleagues switched theirs to a compute-optimal allocation, the same compute went more than 4x further than best-of-N.
Key takeaways
- Planning search creates multiple candidate actions or plans, evaluates them, and chooses or expands promising branches. But performance proved non-monotone in the number of LM calls on MMLU Physics, TruthfulQA, GPQA and AVERITEC.
- Branching multiplies model calls, tools, context, and merge complexity. Stroebl and colleagues put the optimal number of sampling attempts at fewer than 10, fixed by the verifier's false-positive rate rather than by the compute budget.
- Generate a small set of meaningfully different candidates. AlphaCode sampled up to one million programs per problem and submitted at most 10, an actual average of 2.4 per problem solved.
- Reject invalid, duplicate, or policy-violating branches early: AlphaCode's example-test filter removed approximately 99% of model samples before anything was ranked or submitted.
- Use task-grounded evaluators, adversarial checks, and a stopping rule tied to marginal evidence gain. At a fixed 1,860 samples per problem the PRM solved 78.2%, against 72.4% for the ORM and 69.6% for majority voting. OpenAI's 6B verifier, meanwhile, got worse past 400 completions.
- Search should be an ablated mechanism. If it does not beat a simpler run under equal budget, remove it. Snell and colleagues' compute-optimal allocation beat best-of-N by more than 4x under exactly that comparison.