Continuous Evaluation, Statistics and Scorecards
Run the evidence machine on every change, keep watching in production and be honest about how much a number can tell you.
Run fast checks on every change and larger suites before release, then sample production and turn failures into new cases. Report pass rates with confidence intervals, compare versions on the same tasks with a paired method, plan sample size before testing and publish a short scorecard that leads to a decision.
What you will learn: an evaluation cadence, production feedback, intervals and significance, sample size, multiple comparisons, scorecards, cost control and how to compare tools.
Prerequisites: Agent Evaluation Framework, Golden Datasets, Synthetic Data and Simulation and Task, Tool and Planning Metrics.
The example runs in November 2026 with Python 3.13 and only the standard library. The pass and fail results are invented. Product notices cited here were checked in November 2026.
The continuous loop
| Trigger | Suite | Time budget |
|---|---|---|
| Each commit | Code tests, invariants, a small smoke set | Minutes |
| Prompt, model or tool change | Regression set with repeated trials | Tens of minutes |
| Release candidate | Full and held-out sets, safety and recovery | Hours |
| Nightly or weekly | Same version rerun to detect outside change | Off-peak |
| Continuously | Sampled production runs | Ongoing |
The scheduled rerun matters because behavior can change when you changed nothing: a hosted model is updated, a source index is rebuilt or a downstream API alters a response.
Production feedback and online evaluation
| Signal | Value | Limit |
|---|---|---|
| Verified outcomes | Strongest evidence, such as a reopened ticket | Often delayed |
| Human review of samples | Quality and safety judgment | Costly |
| Model grading of samples | Broad coverage | Needs calibration |
| User ratings | Direct reaction | Few users respond, and not randomly |
| Behavior | Retries, edits, abandonment | Ambiguous causes |
| Escalations and complaints | Points at serious failures | Biased toward the visible |
Combine a random sample, which estimates quality, with a targeted sample, which finds problems. Handle production data under your privacy rules, and remove personal details before a run becomes a test case (Safe Logging, Sampling and Retention). Where it is acceptable and safe, an A/B test or shadow run compares versions on real traffic.
Confidence intervals for pass rates
If 17 of 20 cases pass, the observed rate is 85 percent, but a different 20 similar cases could easily give 75 or 95. A confidence interval expresses that uncertainty. The Wilson interval is a good simple choice for a proportion, and behaves better than the plain "rate plus or minus" formula near 0 or 100 percent and with small counts.
| Independent trials | Approximate 95% margin at an 80% pass rate |
|---|---|
| 25 | About 15 points either way |
| 100 | About 8 points |
| 400 | About 4 points |
| 1,600 | About 2 points |
Halving the margin takes about four times as many trials. These figures assume independent trials. Repeating the same ten tasks forty times gives 400 runs but not 400 independent examples of your work, so the uncertainty about other tasks stays large. Treat tasks as the main unit, and use methods that account for grouping when it matters.
NIST AI 800-3 (February 2026) makes a related distinction between accuracy on a fixed set of questions and generalized accuracy across similar questions, and discusses mixed models for estimating the second.
Compare two versions on the same tasks
Run both versions on identical tasks, then look at where they disagree. The exact McNemar test asks whether the split between "newly fixed" and "newly broken" tasks is plausible if neither version were better.
"""Compare two agent versions on the same tasks (invented results)."""
from math import comb, sqrt
# 1 = pass, one entry per task, same task order for both versions
OLD = [1] * 31 + [1] * 3 + [0] * 12 + [0] * 4
NEW = [1] * 31 + [0] * 3 + [1] * 12 + [0] * 4
def wilson(successes, n, z=1.96):
"""95% confidence interval for a pass rate."""
p = successes / n
denom = 1 + z * z / n
center = (p + z * z / (2 * n)) / denom
half = z * sqrt(p * (1 - p) / n + z * z / (4 * n * n)) / denom
return center - half, center + half
def mcnemar_exact(only_old, only_new):
"""Two-sided exact test on the tasks where the versions disagree."""
n = only_old + only_new
if n == 0:
return 1.0
tail = sum(comb(n, i) for i in range(min(only_old, only_new) + 1)) / 2 ** n
return min(1.0, 2 * tail)
def main():
n = len(OLD)
for name, results in (("old", OLD), ("new", NEW)):
low, high = wilson(sum(results), n)
print(f"{name}: {sum(results)}/{n} = {sum(results) / n:.0%} "
f"95% interval {low:.0%} to {high:.0%}")
only_old = sum(a and not b for a, b in zip(OLD, NEW))
only_new = sum(b and not a for a, b in zip(OLD, NEW))
p = mcnemar_exact(only_old, only_new)
print(f"fixed by new: {only_new} broken by new: {only_old} p = {p:.3f}")
print()
gate = [("improvement unlikely to be chance (p < 0.05)", p < 0.05),
("no broken tasks", only_old == 0)]
for text, ok in gate:
print(f"[{'x' if ok else ' '}] {text}")
print("decision:", "ship" if all(ok for _, ok in gate)
else "hold and read the broken tasks")
if __name__ == "__main__":
main()
Output:
old: 34/50 = 68% 95% interval 54% to 79%
new: 43/50 = 86% 95% interval 74% to 93%
fixed by new: 12 broken by new: 3 p = 0.035
[x] improvement unlikely to be chance (p < 0.05)
[ ] no broken tasks
decision: hold and read the broken tasks
Two lessons appear. The separate intervals overlap, yet the paired test uses the task-by-task information and finds the 12 to 3 split unlikely under no difference. Even so, the release is held, because three tasks that used to work now fail. Statistics answer whether a difference may be chance; they do not say whether a broken task is acceptable. Read those three.
It is not the probability that the new version is better, and it says nothing about how large or important the difference is. Report the size of the change and its uncertainty too.
When the question is "not worse"
Switching to a cheaper or faster model rarely needs proof of improvement. It needs evidence that quality has not fallen by more than you can accept. State a margin in advance, for example two points on routine tasks, estimate the difference on paired tasks and accept only if the lower end of the interval for new minus old stays above minus that margin. "No significant difference" is not enough: a tiny test finds no difference between almost anything.
Handle unstable cases
| Cause of instability | How to tell | Response |
|---|---|---|
| Real variation in the agent | Transcripts differ in decisions | Run repeated trials and track the rate |
| Ambiguous task | Reviewers disagree on the right result | Clarify the task or accept several outcomes |
| Brittle grader | Correct answers marked wrong | Fix and regrade stored outputs |
| Environment | Timeouts, leftover state, rate limits | Reset state; classify as infrastructure error |
Quarantining a flaky case can keep a pipeline usable, but give it an owner and a deadline. A quarantine list that only grows is a way of deleting tests quietly.
Plan the sample before you test
- Choose the smallest difference that would change your decision.
- Estimate the current pass rate and how often versions disagree.
- Pick acceptable chances of a false alarm and of missing a real change.
- Calculate or simulate the number of tasks and trials needed.
- If that is unaffordable, say what the smaller test can and cannot detect.
Small test sets can detect large regressions and will often miss small ones. For rare serious failures, zero events in n independent trials suggests, as a rough 95 percent upper bound, a rate below about 3 divided by n. Reliance on testing alone is therefore weak for rare harms; add controls that prevent the effect.
Worked sample sizes
The table gives approximate numbers of independent tasks per version for an unpaired comparison, using a two-sided 5 percent false alarm rate and an 80 percent chance of detecting the stated change. It is a normal-approximation estimate for planning.
| Change to detect | Tasks per version |
|---|---|
| 80% to 90% | About 200 |
| 90% to 95% | About 440 |
| 80% to 85% | About 910 |
| 80% to 82% | About 6,000 |
Pairing the same tasks often needs fewer, because it removes variation between tasks, with the saving depending on how often the two versions disagree. Either way, a 50-case set cannot reliably confirm a two-point gain.
Statistical traps
| Trap | Remedy |
|---|---|
| Testing many variants and announcing the best | Confirm the winner on fresh held-out cases |
| Checking many slices until one looks significant | Name primary measures first; correct or confirm the rest |
| Stopping as soon as the result looks good | Fix the sample size or use a method designed for early stopping |
| Comparing runs from different days and graders | Run both versions together with one grader |
| Treating repeated runs as new tasks | Summarize by task, or model the grouping |
| Dropping errors | Fix the treatment of failures beforehand |
Detect drift in production
Online scores move for dull reasons, so alert on changes that are both large enough to matter and unlikely to be noise.
- Choose a window that contains enough graded items; hourly figures from ten samples will swing wildly.
- Set a minimum count below which no quality alert fires.
- Compare with a stable reference period, by slice, so that a change in traffic mix is visible.
- Require the shift to persist across windows for slow signals, but page at once for safety violations.
- Mark releases and provider changes on every chart.
- Keep a fixed canary set running on a schedule to separate changes in the agent from changes in users.
If the canary set holds steady while production scores fall, look at the incoming requests and data. If both fall, look at the model, prompts, tools and dependencies (Promotion, Feature Flags, Rollback and Drift).
Scorecards and reporting
A scorecard is one page that a busy owner can use to decide. Keep the layout stable so that readers learn where to look.
| Section | Contents |
|---|---|
| Decision | Ship, hold or reject, with the reason and approver |
| What changed | Versions of agent, model, prompts, tools, data and graders |
| Outcomes | Success by slice with counts and intervals |
| Safety | Violations, refusals and open findings |
| Comparison | Fixed and broken tasks against the current release |
| Efficiency | Latency percentiles and cost per success |
| Limits | What was not tested and known weaknesses |
| Next | Actions, owners and dates |
Show trends over releases, and mark where the dataset or grader changed so that a step in the line is not mistaken for progress.
Decision: hold release candidate 14.
Why: overall success rose from 34 to 43 of 50 on paired tasks, but three previously passing tasks failed, one involving a refund limit.
Safety: no completed forbidden actions in the tested set.
Not tested: languages other than English; peak load.
Next: owner reviews the three transcripts, fixes, and reruns the full set and fresh held-out cases.
Evaluation tools compared
Tools differ in where tests live, who can read them and how they connect to traces. Compare by need rather than popularity.
| Approach | Examples | Suits |
|---|---|---|
| Code-first framework | Inspect, from the UK AI Security Institute | Reproducible research-style and agent evaluations |
| Configuration and command line | Promptfoo | Prompt and agent checks in build pipelines |
| Tracing platform with datasets | Hosted or self-hosted observability products | Linking production traces to cases and scores |
| Cloud or data platform service | Evaluation features of your provider | Teams already building there |
| Your own scripts | Test runner plus graders | Small suites and special environments |
OpenAI announced on June 3, 2026 that its Evals platform is being deprecated: existing evaluations became read-only on October 31, 2026, and the dashboard and API are scheduled to shut down on November 30, 2026. Keep cases, graders and results exportable.
- Can you export datasets, graders and raw results in open formats?
- Can it run in your pipeline and in an isolated environment?
- Does it record versions of everything that affects a score?
- Where is data sent and stored, and for how long?
- Can it grade state and actions, not only text?
Keep a portable record
Whatever tool you choose, store each result with enough detail to reread it elsewhere: case identifier and version, agent and model versions, the output and final state, each grader's verdict with its version, time, cost and run identifier. A plain structured file or database table is enough. With that record you can move tools, regrade old outputs with a better grader and answer an auditor's question about why a release was approved.
Control cost and time
Order checks from cheap to expensive and stop early on hard failures. Cache results only when every input, including model and grader versions, is identical, and never cache when the aim is to measure variation. Run cases in parallel within rate limits, keep an evaluation budget per release and track which suites actually find problems.
Ownership and routine
| Cadence | Activity |
|---|---|
| Daily | Check gate failures and production alerts |
| Weekly | Review sampled failures and add cases |
| Monthly | Compare human checks with automated grades |
| Quarterly | Revisit thresholds, slices, held-out cases and cost |
Common mistakes
| Mistake | Better approach |
|---|---|
| Reporting a percentage without a count | Show counts and an interval |
| Declaring a two-point gain on 50 cases | Check detectable difference first |
| Evaluating only before launch | Sample production and rerun on schedule |
| Ignoring newly broken tasks when the average rises | Review every critical regression |
| Thresholds nobody owns | Name an owner and the action on failure |
| Locking test data inside one product | Keep portable copies |
Continuous evaluation checklist
- Each trigger has a defined suite, budget and owner.
- Unchanged releases are rerun to detect outside changes.
- Random and targeted production samples are reviewed separately.
- Pass rates carry counts and intervals.
- Version comparisons use the same tasks and graders.
- Sample size and primary measures are chosen in advance.
- A one-page scorecard records the decision and limits.
- Datasets, graders and results can be exported.
Frequently asked questions
Is a p-value below 0.05 enough to ship?
No; also check the size of the change, critical regressions, safety results, cost and whether the test reflects real use.
Should tests call a live model in the pipeline?
Use recorded replies for logic tests and a controlled set of live trials where model behavior is what you are checking.
How much production traffic should be reviewed?
Enough random items to estimate quality at the precision you need, plus the risky and flagged cases your team can handle.
Why did scores change when nothing changed?
Sampling variation, a hosted model update, new data, a dependency change or a grader change can each cause it.
References and further reading
- NIST AI 800-3: statistical models and uncertainty in AI evaluation.
- NIST/SEMATECH Handbook: confidence intervals for proportions: the Wilson method.
- OpenAI deprecations: current dates for retired features.
- Anthropic: demystifying evals for AI agents: suites that grow with the product.
Next steps
What to Measure: Metrics, Dashboards and SLOs
Watch quality and cost in production.
Versioning, Registries and Evaluation-Driven Development
Tie evaluation evidence to versions.
Fix Latency, Cost, Deployment and Score Regressions
Diagnose a sudden score drop.