Chad Research · Paper 10

Verification beats generation.

Generating a correct patch is hard. Telling whether a patch is correct is often much easier, and when it is, you can trade generation quality for sampling and selection. The catch is the verifier itself: its errors set the ceiling.

12 min read15 references

Abstract

For many tasks, checking a candidate answer is far cheaper and more reliable than producing a correct one. A test suite cannot write the fix, but it can reject the wrong ones in seconds.

That asymmetry is the basis of a large body of work: trained verifiers for math, process supervision, test-based filtering for code, and repeated sampling that turns extra inference compute into solved problems. The same work shows the limit. When the verifier is imperfect, more samples stop helping, and when the verifier is a language model judging free text, it brings biases of its own. We argue that an agent system should spend a deliberate share of its loops on verification, prefer objective checks wherever they exist, and keep human review for what no check can settle. That is how Chad is built.

The asymmetry

Computer science has a name for the intuition: many problems whose solutions are hard to find have solutions that are easy to check. Software engineering lives on a practical version of it. Writing a correct change to a large codebase requires understanding intent, constraints and side effects. Checking a candidate change can be as simple as compiling it and running the tests.

The asymmetry does not hold everywhere. Judging whether a design is sound or whether a change matches what a product team meant is not easy. But wherever it does hold, it changes the economics of generation. If a check is cheap and reliable, a generator does not need to be right on the first try. It needs to be right sometimes, and the verifier finds out when.

Verifiers as oracles

The modern line of evidence starts with math word problems.

2021

Training Verifiers to Solve Math Word Problems

Cobbe et al. introduce GSM8K, 8.5K grade-school math problems, and train a separate verifier to judge whether a candidate solution is correct. At test time they sample many solutions and keep the one the verifier ranks highest. Verification significantly improves performance and scales better with data than fine-tuning alone. [1] OpenAI reports that on the full training set a 6B verifier slightly outperforms a fine-tuned 175B model, a boost roughly equivalent to a 30x increase in model size. [2]

2023

Let's Verify Step by Step

Lightman et al. compare outcome supervision (grading the final answer) with process supervision (grading each step). Process supervision wins clearly on MATH: their process-supervised reward model solves 78% of problems from a representative subset of the test set. They release PRM800K, 800,000 step-level human labels. [3]

2022

CodeT

Chen et al. have the model generate test cases alongside candidate programs, then rank programs by agreement with the tests and with each other. On HumanEval, pass@1 reaches 65.8%, an absolute gain of 18.8 points over code-davinci-002 alone. [4]

2022

AlphaCode

Li et al. generate a very large number of candidate programs per competitive programming problem, filter them by running them on the example tests from the problem statement, cluster the survivors by behavior, and submit at most ten. The system reaches an average ranking in the top 54.3% in simulated Codeforces contests. [5]

Two ideas recur. The verifier is a separate component from the generator, trained or built to judge rather than to produce. And the best verifiers check intermediate structure, not only the final answer: steps of a proof, behavior on example inputs, agreement among independent candidates.

Verification as a multiplier

HumanEval pass@1 for code-davinci-002 alone and with CodeT's test-based ranking, as reported by Chen et al.

Source: CodeT [4]. The baseline value is derived from the paper's reported 65.8% and its stated 18.8-point absolute improvement.

Generate many, then verify

If a verifier is available, the obvious next step is to sample more. Brown et al. measure this directly. Coverage, the fraction of problems solved by at least one sample, keeps growing with the number of samples across four orders of magnitude, often log-linearly [6]. On SWE-bench Lite, DeepSeek-Coder-V2-Instruct solves 15.9% of issues with one sample and 56% with 250 samples, above the 43% single-sample state of the art at the time.

Repeated sampling on SWE-bench Lite

Share of issues solved by at least one sample, as reported by Brown et al. The single-sample state of the art is the figure the paper cites for comparison.

Source: Large Language Monkeys [6]. DeepSeek-Coder-V2-Instruct. Coverage counts a problem as solved if any sample passes, which assumes a verifier able to recognize that sample.

The important word is coverage. A problem counts as solved if any sample is correct, which is only useful if something can tell which one. In domains with automatic verification, such as unit tests or formal proofs, the authors find that coverage translates into real performance. Without one, majority voting and reward models plateau beyond several hundred samples [6].

Snell et al. go a step further and ask how to spend a fixed test-time budget. Allocating compute adaptively per prompt, between revisions and search against a verifier, improves efficiency by more than 4x over best-of-N, and in a FLOPs-matched comparison lets a smaller model outperform one 14x larger on problems where the small model has a non-trivial success rate [7].

Many samples, one verifier

Coverage is the chance that at least one of k samples is correct. What you ship is the sample the verifier picks. Illustrative model.

coverage = perfect verifierselected correct, imperfect verifiersingle sample
coverage at k…
selected correct…
ceiling as k → ∞…
one draw of k samples…
correct, acceptedwrong, acceptedrejectedselected

Illustrative model, not fitted to any benchmark. Samples are independent with success rate p; the verifier accepts every correct sample and accepts a wrong one with the false-positive rate f; one accepted sample is picked at random. Then P(selected correct) = a / (a + b) · (1 − (1 − a − b)k) with a = p and b = (1 − p) · f. With f = 0 it equals coverage, 1 − (1 − p)k. Real problems vary in difficulty, so measured coverage curves grow more slowly than this one.

P(selected correct) = a / (a + b) · (1 − (1 − a − b)k) // illustrative: a = p, b = (1 − p) · f

When the verifier is wrong

The formula above is a toy model, but it captures the result that matters. With a perfect verifier (f = 0), the chance of shipping a correct answer equals coverage and rises toward 100%. With any false-positive rate, it converges to a ceiling, a / (a + b), no matter how many samples you draw. Past a point, more samples mostly add more wrong answers that the verifier lets through.

Stroebl, Kapoor and Narayanan make this precise with real benchmarks. When a verifier can accept incorrect outputs, resampling cannot remove that error, so accuracy is capped regardless of compute [8]. On HumanEval and MBPP, where unit tests have limited coverage, they find that a model’s single-sample accuracy strongly correlates with its false-positive rate, so weaker models cannot catch up with stronger ones by resampling alone. They report that the optimal number of attempts is often under ten once the cost of false positives is counted, and that false positives can also degrade other qualities such as adherence to coding conventions.

Repeated sampling converts compute into quality only at the rate the verifier allows. The verifier, not the generator, sets the ceiling.

The limits of LLM-as-judge

Where no test exists, the natural verifier is another model. That works better than nothing, and worse than it looks.

  • Agreement, with biases. Zheng et al. find that strong judges such as GPT-4 reach over 80% agreement with human preferences, comparable to agreement between humans. They also document position bias, verbosity bias, self-enhancement bias and limited reasoning ability [9].
  • Order changes the verdict. Wang et al. show that the ranking of candidate responses can be manipulated by changing their order of appearance; with ChatGPT as evaluator, Vicuna-13B beat ChatGPT on 66 of 80 queries in one ordering [10]. They propose calibrations, including routing hard cases to human review.
  • Position bias is systematic. Across 15 judges, 22 tasks and more than 150,000 evaluation instances, Shi et al. find that position bias is not random, varies widely across judges and tasks, and is strongly affected by the quality gap between candidates [11]. The closer two answers are, the less a judge’s preference can be trusted.
  • Models favor themselves. Panickssery et al. show that models recognize their own outputs and that self-recognition correlates with self-preference [12]. A builder that reviews its own patch is the least independent judge available.
  • Self-review is not feedback. Huang et al. find that intrinsic self-correction, without external signals, generally fails to improve reasoning and can make it worse [13].

LLM judges are useful for what tests cannot express: whether a change matches the intent, whether it respects conventions, whether the explanation makes sense. They should be independent of the generator, given the acceptance criteria explicitly, and used after objective checks rather than instead of them.

Verifying the verifier

Even test suites are verifiers that can be wrong, and benchmark history shows it. SWE-bench turns 2,294 real GitHub issues from 12 Python repositories into tasks graded by the repository’s own tests [14]. When the benchmark was introduced, the best model, Claude 2, resolved 1.96% of issues.

In 2024, OpenAI had 93 professional developers screen 1,699 randomly sampled SWE-bench tasks, with three annotators per sample [15]. They flagged about 38.3% of samples for underspecified problem statements and about 61.1% for unit tests that could unfairly reject valid solutions. Overall 68.3% were filtered out, and the remaining human-validated set of 500 tasks became SWE-bench Verified. On it, GPT-4o with the best open-source scaffold resolved 33.2%, compared with 16% on the original benchmark.

How often the tests were the problem

Share of 1,699 sampled SWE-bench tasks flagged by human annotators, as reported for SWE-bench Verified.

Source: OpenAI [15]. Categories overlap; a sample could be flagged for several reasons. The authors note the filtering was likely overly strict.

The lesson is not that tests are unreliable. It is that a verifier is itself an artifact that needs validation, and that humans are the final reference when the automated checks disagree with the intent.

How Chad applies it

Chad treats verification as a first-class role, not a step the Builder performs on itself.

  • Dedicated Verifier loops. Chad spawns many small loops, each with a ~6k-token compiled context and one atomic task. The Verifier is one of these roles, alongside the Planner, Spec writer, Builder, Debugger and Improver. It starts empty, like every loop, and receives the validated intent, the acceptance criteria and the candidate change. It never sees the Builder’s reasoning, so it does not inherit the Builder’s commitment to its own answer.
  • Objective checks first. Build, type checks, tests and CI run before any model judges anything. When a Sentry error or a Prometheus alert motivated the task, its disappearance is part of the check. These are the cheap, reliable oracles the research favors.
  • AI review for what tests cannot see. The Verifier checks the change against the intent and each acceptance criterion: scope, side effects, conventions from the global best practices layer. Its verdict is explicit, with reasons, so it can be audited.
  • Human approval where it matters. Humans can trigger, correct or approve at any moment, from GitHub, Slack, Linear or any connected tool. Teams decide which changes require human sign-off. A human verdict always outranks the AI verifier’s.
  • Several candidates when the check is strong. When a task has a reliable automatic check, generating several candidates and selecting among those that pass is cheap insurance. When it does not, more candidates mostly add review load, so Chad does not pretend otherwise.
  • Only verified results become memory. A change that passes its gates is stored as a validated input → output pair, linked to its intent and to the git changes in ClickHouse. Future loops compile context from those pairs (see Paper 07).

Three gates before a patch counts

Candidate patches for one atomic task. Cheap, objective checks run first; judgment comes last. Illustrative animation with example verdicts.

candidatetestsAI reviewhumanoutcome
0generated
0stopped by tests
0stopped by AI review
0stopped by human
0merged · written to memory

Patch names and verdicts are invented examples. In Chad, the human gate applies where a team requires sign-off; elsewhere the Verifier's acceptance is the validation. Proportions are illustrative, not measured.

Limits & next steps

Verification is not free. Every gate costs compute or attention, and human review is the scarcest resource in any engineering organization. The goal is to place the cheapest reliable check first and reserve people for the decisions only they can make, not to review everything twice.

Verifiers also fail in correlated ways. An AI verifier built on the same model family as the Builder may share its blind spots, and tests written alongside a change may encode the same misunderstanding. We use independent contexts, explicit acceptance criteria and human escalation to limit this, but we do not claim to have removed it.

The research cited here reports results on public benchmarks with their own models and setups; none of it measures Chad. We have not published Chad numbers yet. We plan to report per-gate rejection rates, false-positive rates of the AI verifier against human review, and the cost of verification per merged change on real repositories.

References

  1. Cobbe, K. et al. Training Verifiers to Solve Math Word Problems. arXiv:2110.14168, 2021.
  2. OpenAI. Solving math word problems. 2021.
  3. Lightman, H. et al. Let's Verify Step by Step. ICLR, 2024.
  4. Chen, B. et al. CodeT: Code Generation with Generated Tests. ICLR, 2023.
  5. Li, Y. et al. Competition-Level Code Generation with AlphaCode. Science, 2022.
  6. Brown, B. et al. Large Language Monkeys: Scaling Inference Compute with Repeated Sampling. arXiv:2407.21787, 2024.
  7. Snell, C., Lee, J., Xu, K., Kumar, A. Scaling LLM Test-Time Compute Optimally can be More Effective than Scaling Model Parameters. arXiv:2408.03314, 2024.
  8. Stroebl, B., Kapoor, S., Narayanan, A. The Limits of Inference Scaling Through Resampling. arXiv:2411.17501, 2024.
  9. Zheng, L. et al. Judging LLM-as-a-Judge with MT-Bench and Chatbot Arena. NeurIPS Datasets and Benchmarks, 2023.
  10. Wang, P. et al. Large Language Models are not Fair Evaluators. arXiv:2305.17926, 2023.
  11. Shi, L. et al. Judging the Judges: A Systematic Study of Position Bias in LLM-as-a-Judge. AACL-IJCNLP, 2025.
  12. Panickssery, A., Bowman, S. R., Feng, S. LLM Evaluators Recognize and Favor Their Own Generations. arXiv:2404.13076, 2024.
  13. Huang, J. et al. Large Language Models Cannot Self-Correct Reasoning Yet. ICLR, 2024.
  14. Jimenez, C. E. et al. SWE-bench: Can Language Models Resolve Real-World GitHub Issues?. ICLR, 2024.
  15. OpenAI. Introducing SWE-bench Verified. August 2024.