How to know whether an AI system actually improved
A release needs a stable evaluation surface, a declared target behavior and explicit tolerances for collateral regression.
A familiar release goes like this. A customer reports a bad answer. An engineer adjusts the prompt, tries the failing example and a handful of others, and the output looks better. The change ships. Two weeks later a different team notices that the assistant has started refusing requests it used to handle, or that answers have become longer and slower, or that a category of question nobody re-tested now fails. Nobody can say exactly when it started, because nobody can say exactly what the previous version did.
The engineer was not careless. The system gave no reliable way to answer the only question that matters at release time: did this change make the system better, and at what cost elsewhere? With language models, that question is harder than it looks. Outputs are open-ended, grading is often subjective, behavior varies run to run, and a change aimed at one behavior routinely moves others.
An improvement is a claim, and a claim needs three things before it can be tested: a declared target behavior that is supposed to change, a stable evaluation surface on which to measure it, and explicit tolerances for what is allowed to get worse. Everything else in this note is about making those three things rigorous enough to trust.
Release gate / offline to online
01 / Claim
Declare the target behavior before you look at results
“Make the assistant better” cannot be evaluated. “Increase the rate of correct policy citations on refund-eligibility questions” can. The first step of any release is to write down what is supposed to change, where, and how you will decide.
Writing it down first matters for a statistical reason as much as an organizational one. If the success metric is chosen after seeing the results, there is almost always some metric or slice that improved by chance. This is the garden of forking paths: with enough possible comparisons, noise reliably produces a story. Declaring the target, the guardrails and the decision rule in advance turns evaluation from a search for good news into a test.
Illustrative release specification
release: refund-assistant v14
hypothesis: >
Grounding the policy prompt in clause identifiers increases
correct policy citations on refund-eligibility questions.
target:
metric: policy_citation_correct
slice: refund_eligibility # 400 items, frozen v3
decision: candidate must improve; 95% CI lower bound > 0
guardrails: # non-inferiority margins
task_success@golden_v7: max_drop_points: 2.0
in_scope_refusal_rate: max_increase_points: 1.0
unsafe_output_rate: max_increase_points: 0.0
p95_latency: max_increase_pct: 10
cost_per_completed: max_increase_pct: 5
pinned:
dataset_versions: [golden_v7, refund_eligibility_v3, regressions_v22]
judge: rubric_citation_v4 @ judge-model-2026-08
samples_per_item: 3
review: every item that flips from pass to fail is read by a personThe specification has four parts. A hypothesis in plain language. One primary target metric on a named slice, with a decision rule. A set of guardrail metrics, each with a tolerance. And the pinned versions of everything that could otherwise move the measurement: datasets, graders and sampling settings.
02 / Surface
Build an evaluation surface that holds still
An evaluation surface is the fixed set of items, graders and procedures against which every candidate is compared. Its most important property is stability. If the dataset, the grader or the scoring procedure changes between two runs, a difference in scores might reflect the change in the ruler rather than the change in the system.
A single benchmark is rarely enough. A useful surface is composed of several sets with distinct jobs:
- Golden set. A representative sample of real production inputs, stratified by the segments that matter to the business: intent, customer tier, language, document type. It answers whether the system is still good at its overall job.
- Target slice. A focused set for the behavior the release is meant to change. It must be large enough to detect the improvement you are hoping for, which is usually larger than people expect.
- Regression suite. Every production incident and every bug report, converted into a test case with an expected behavior. This set only grows, and it is how a system stops repeating its mistakes.
- Adversarial and safety set. Prompt injections, policy-violating requests, out-of-scope questions and inputs designed to trigger known failure modes.
- Capability probes. Small, systematic tests in the style of CheckList: does the answer stay the same when a name or a date format changes, and does it change in the expected direction when a key fact changes?1
Version every set and freeze it for the life of a comparison. When the production distribution drifts, add a new version rather than editing the old one, and report results on both during the transition. A dataset that is silently edited is a dataset whose history means nothing.
03 / Graders
Graders are instruments, and instruments need calibration
Every score is produced by a grader, and graders have their own error. Prefer them in roughly this order of reliability, using the most reliable one that can express the behavior:
- Deterministic checks: the output parses, matches the schema, executes, cites a document that exists, contains the required field, stays under a length limit.
- Reference-based checks: the answer matches or entails a known correct answer, judged by exact match, structured comparison or a model judge given the reference.
- Reference-free model judges: a model scores the output against a rubric without a known answer.
- Human review: the most expensive and often the only valid grader for nuanced quality, best used on samples and to calibrate the others.
Model judges are indispensable at scale and systematically biased. Zheng et al. documented position bias (preferring whichever answer appears first), verbosity bias (preferring longer answers) and self-enhancement bias (preferring outputs from the same model family).2 Each of these can manufacture an improvement. A candidate that produces longer answers may win on a judge’s score while users find it worse.
- Calibrate every judge against a set of human-labeled examples and report agreement, for example with Cohen’s kappa, before trusting it.
- In pairwise comparisons, evaluate both orderings and count a win only when the judge agrees with itself.
- Prefer rubrics of specific, binary criteria over a single score from one to ten. “Cites the correct clause” is more stable than “overall quality”.
- Control for length explicitly when length is not the behavior under test.
- Pin the judge model and the rubric version. Changing either changes the ruler, and old scores are no longer comparable.
04 / Noise
Most measured improvements are inside the noise
Evaluation results are estimates from a sample. Treating them as exact is the most common way teams fool themselves, and the arithmetic is not complicated.
Suppose a system scores 80% on 200 items. The standard error of that proportion is √(0.8 × 0.2 ÷ 200) ≈ 0.028, so a 95% confidence interval spans roughly ±5.5 percentage points. A candidate scoring 83% on a separate run of the same size is not distinguishable from the baseline by comparing the two numbers. Halving the interval requires four times as many items.
There are two further sources of noise. Generation is stochastic, so the same item can pass on one run and fail on the next; sampling each item several times and averaging separates item difficulty from run-to-run variation. And items are rarely independent. Questions about the same document or from the same conversation tend to succeed or fail together, which makes naive intervals too narrow. Miller’s guidance on adding error bars to model evaluations recommends clustered standard errors for exactly this reason.3
05 / Pairing
Compare paired outcomes, not headline scores
Because baseline and candidate run on the same items, the right comparison is item by item. Most items are answered correctly or incorrectly by both versions, and those items carry no information about the difference. Only the discordant items do: the ones that flipped.
Take an illustrative run on 200 paired items. The candidate fixes 17 items the baseline got wrong and breaks 9 items the baseline got right. The net gain is 8 items, or 4 percentage points, which looks like a clear win. McNemar’s test asks whether 17 versus 9 among 26 discordant items is more lopsided than chance would produce.4 With the usual continuity correction, the statistic is (|17 − 9| − 1)² ÷ (17 + 9) = 49 ÷ 26 ≈ 1.88, which corresponds to a p-value of about 0.17. The evidence is suggestive, not conclusive. A team that ships on this result should know it is shipping on a coin that has come up heads a few more times than tails.
Pairing has a second benefit that matters more than the test statistic. The list of flipped items is the most informative artifact an evaluation produces. Reading the 9 regressions often reveals a pattern, such as a type of question the new prompt mishandles, that no aggregate metric would show.
06 / Tolerances
Collateral regression needs explicit tolerances
Almost every change to a language-model system moves several behaviors at once. A prompt that makes the assistant more careful about policy may also make it refuse more. A model that reasons more thoroughly is slower and more expensive. Without declared tolerances, these trade-offs are negotiated after the fact by whoever is most invested in shipping.
The useful framing comes from non-inferiority testing. For each guardrail, declare a margin: the largest regression you are willing to accept. The candidate passes that guardrail only if the entire confidence interval for the change stays within the margin. This reverses the burden of proof. It is not enough that a regression is not statistically significant; the data must show that any regression is small.
| Metric | Role | Baseline | Candidate | Change (95% CI) | Tolerance | Verdict |
|---|---|---|---|---|---|---|
| Policy citation correct | Target | 71.0% | 78.5% | +7.5 (+4.1, +10.9) | Must improve | Pass |
| Golden-set task success | Guardrail | 84.2% | 84.0% | −0.2 (−1.6, +1.2) | Drop ≤ 2.0 | Pass |
| In-scope refusal rate | Guardrail | 3.1% | 4.6% | +1.5 (+0.6, +2.4) | Rise ≤ 1.0 | Fail |
| Unsafe output rate | Guardrail | 0.0% | 0.0% | 0.0 | Rise = 0 | Pass |
| p95 latency | Guardrail | 2.8 s | 3.0 s | +7% | Rise ≤ 10% | Pass |
In this illustrative result, the target improved with an interval comfortably above zero, and most guardrails held. But the in-scope refusal rate rose by 1.5 points, with an interval from 0.6 to 2.4, which exceeds the declared 1.0-point margin. The decision is to hold, investigate the new refusals, and fix them before release. The team does not need a meeting to reach that conclusion, because the rule was agreed before the numbers existed.
Two refinements matter in practice. First, not all regressions are equal: a single newly unsafe output can matter more than a point of average quality, so severe failure categories deserve zero-tolerance guardrails and manual review. Second, checking many slices invites false alarms. With twenty independent slices tested at the 5% level, one is expected to look significant by chance. Declare the guardrail slices in advance and treat everything else as exploratory.
07 / Goodhart
When the measure becomes the target
Any metric that drives release decisions will eventually be optimized directly, and optimization finds the gaps between what the metric measures and what you meant. A judge that rewards citations will be satisfied by irrelevant citations. A length limit will be met by truncated reasoning. A fixed evaluation set will be memorized by the prompt that was tuned against it.
Public benchmarks add a further problem: their contents may have appeared in a model’s training data, and their tasks rarely match yours. Holistic evaluation efforts such as HELM make the case for measuring many dimensions across many scenarios rather than a single leaderboard number.5 For a production system, the stronger point is that no public benchmark is your evaluation surface. Use them to shortlist models, not to approve releases.
- Pair every optimized metric with a counter-metric that catches the obvious way to game it.
- Rotate and refresh held-out sets from recent production traffic.
- Keep regular human review of random samples, independent of any automated score.
08 / Online
Offline evaluation earns the right to an online test
An offline evaluation predicts how a change will behave in production. It does not prove it. Real users ask questions the dataset did not anticipate, react to latency and tone, and abandon tasks for reasons no grader sees.
- Shadow traffic: run the candidate on live inputs without showing its outputs, and compare against the baseline using the same graders.
- Canary: expose a small share of traffic, with automatic rollback when guardrail metrics breach their thresholds.
- Controlled experiment: randomize users or sessions between versions, and measure outcomes that matter to the business rather than proxy scores.
The discipline of online experimentation is well developed, and Kohavi, Tang and Xu’s treatment of trustworthy controlled experiments applies directly: define the overall evaluation criterion in advance, check guardrail metrics, and verify that the randomization itself is sound before believing the result.6 Useful online measures for AI systems include task completion, the rate at which users edit or redo outputs, escalation to humans, and cost per completed outcome. Explicit thumbs-up ratings are cheap to collect and heavily biased toward the users who bother to click.
Finally, measure the measurement. Track whether offline gains predicted online gains across releases. If they consistently do not, the evaluation surface is measuring the wrong thing, and fixing it is worth more than any individual release.
09 / Record
Every release leaves a decision record
When a regression is discovered weeks later, the first questions are what changed and what the evaluation said at the time. A release decision record answers both. It should capture the versions of the model, prompts, retrieval configuration, index, datasets and graders; the results with intervals; the items that flipped and the notes from reviewing them; the decision against the pre-declared rule; and who made it.
With records in place, regressions become bisectable. Without them, every investigation starts from memory.
10 / Practice
A minimal standard
A team does not need a research department to evaluate releases rigorously. It needs a small number of habits, applied every time:
- Write the target behavior, guardrails, tolerances and decision rule before running the evaluation.
- Maintain a versioned surface: golden set, target slice, an ever-growing regression suite and an adversarial set, with a held-out test set for release decisions.
- Calibrate model judges against human labels, control their known biases and pin their versions.
- Compare paired outcomes, report fixed and broken counts, and read every flipped item.
- Report intervals, sample repeatedly where outputs vary, and do not ship on differences inside the noise.
- Treat guardrails as non-inferiority tests with declared margins.
- Validate offline gains with shadow, canary or controlled online tests, and feed production failures back into the regression suite.
The goal is not statistical ceremony. It is to be able to say, with evidence, that a release made the system better at what it was supposed to do and did not make it unacceptably worse at anything else. Without that, a team is not improving an AI system. It is changing one.
References
- 1. Ribeiro, M. T., Wu, T., Guestrin, C. and Singh, S. (2020). Beyond Accuracy: Behavioral Testing of NLP Models with CheckList. ACL. arXiv:2005.04118
- 2. Zheng, L. et al. (2023). Judging LLM-as-a-Judge with MT-Bench and Chatbot Arena. arXiv:2306.05685
- 3. Miller, E. (2024). Adding Error Bars to Evals: A Statistical Approach to Language Model Evaluations. arXiv:2411.00640
- 4. McNemar, Q. (1947). Note on the sampling error of the difference between correlated proportions or percentages. Psychometrika, 12(2). doi:10.1007/BF02295996
- 5. Liang, P. et al. (2022). Holistic Evaluation of Language Models. arXiv:2211.09110
- 6. Kohavi, R., Tang, D. and Xu, Y. (2020). Trustworthy Online Controlled Experiments: A Practical Guide to A/B Testing. Cambridge University Press. doi:10.1017/9781108653985
About the author