The long read
Evaluations in practice: from a first test to a release decision
The library's AI assistant answers patrons' questions from a notice. A colleague has rewritten its instructions, the fixed part of its prompt, and the new version, B, looked better in a quick try. Replacing version A is your decision, because you own the notice. This piece follows that decision to a written answer: ship, hold or gather more evidence.
Key ideas, in eight lines
- Write the release brief first: what must never happen, who must not lose, what counts as better.
- Read answers and count the kinds of failure before you fix the rules, then freeze them.
- Draw cases from real questions, real failures, a grid of dimensions and invented variations; keep related cases together.
- Two graders working alone expose unclear rules, and raw agreement flatters them.
- Measure an AI judge on labels it was not tuned on, and count what it could not grade.
- Compare versions case by case: only the cases that changed carry the difference.
- Ask how large the gain or loss could be, then apply the brief rule by rule.
- After launch, keep two suites, sample live answers and record every run.
No code or AI account is needed. The library and every number about it are invented illustrations. Select text to keep a pencil note in this browser.
Start from the decision
The assistant comes from the first evaluations guide; its notice now has six passages (Figure 1). Before grading anything, write down four things.
- The task. Answer a patron's question from the notice, citing the passage behind each claim.
- The cost of a false claim. A patron told of a fee that does not exist may not return a book, or may stop trusting the service.
- Who could lose. Many patrons ask in Hindi, and B's instructions were tried only on English questions.
- Who decides. You, the librarian who owns the notice.
Figure 1 · Illustration · The library notice, now six passages
D1. Returns. The outdoor book drop accepts returns every day. The library desk is closed on Sundays.
D2. Fees. Borrowed books have no late fees. Lost books can incur replacement charges.
D3. Opening hours. The library desk is open Monday to Saturday, 9 am to 6 pm. It is closed on Sundays and public holidays.
D4. Renewals. A borrowed book can be renewed twice, for two weeks each time, unless another member has reserved it.
D5. Lost books. The replacement charge for a lost book is the price printed in the library catalogue.
D6. Membership. Membership is free for residents. Bring one photo ID to join.
Answers pass only if they meet every rule that applies:
- Every part. Answer every part of the question.
- Correct policy. State the policy correctly.
- Supported claims. Make no material claim the notice contradicts or does not support.
- Citation. Cite a supporting passage for every claim.
- Not covered. A question the notice cannot answer passes only if the answer says the notice does not cover it.
A release brief is a short plan of what a new version must achieve to replace the old one.
Figure 2 · Illustration · The release brief, draft 1
H1. Hard requirement. No answer states a fee or charge that the notice does not support. Allowed count: zero.
H2. Protected group. Questions asked in Hindi must not pass less often than under version A.
G1. Goal. The overall pass rate is at least as high as under version A.
P1. Preference, not a gate. Shorter answers.
A hard requirement is a rule no average can buy back. A protected group is a set of users whose results must not get worse. A goal is the hoped-for gain, which the brief also checks. A preference only breaks ties. H1 and H2 are gates: each can block a release on its own.
Revise this draft during development; freeze it before any result exists on held-out cases, those kept back for the final test. You can now write a brief whose rules say how they combine.
Read the answers before you fix the rules
Development answers are answers you may study freely while improving the assistant; before the rewrite, the team studied version A's. Error analysis, also called failure analysis, means recording what went wrong in them before deciding what to measure.
- For each failing answer, write one plain line, such as “fee claim cites D1”.
- Group the lines into a few kinds of failure.
- Count each kind.
- Read another batch and note which kinds stopped changing.
- Open a different slice, meaning another group of questions, such as another language or month, and repeat.
Steps 1 and 2 are also called open coding and axial coding, as in Hamel Husain and Shreya Shankar's evaluation FAQ.
Figure 3 · Illustration · Failures in two batches of 20 English answers from version A
| Kind of failure | Batch 1 | Batch 2 |
|---|---|---|
| Missing or wrong citation | 3 | 3 |
| Skipped a part or condition | 2 | 2 |
| Wrong policy | 1 | 1 |
| Answered beyond the notice | 1 | 0 |
| All failures | 7 | 6 |
The kinds stopped changing, but only for English: every answer read was in English, and B's rewrite was tried only on English questions. Step 5, the Hindi slice, was skipped; that gap returns later.
Some kinds need a fix, not a test: B's stricter citing answers the citation failures. The FAQ advises: “Focus automated evaluators on failures that persist after fixing your prompts.”
The order is: draft the rules, read answers, revise the rules, then freeze them before the comparison that decides. Sources disagree about the first step: Husain and Shankar say a rubric written before reading “can get in the way”, while OpenAI's guide puts “Define eval objective” first. You can now count failure kinds and name the slice they miss.
Build cases worth counting
A case is a question, its evidence and what a passing answer must do. Cases come from four places (where test cases come from).
- Real questions. OpenAI advises logging as you develop so you can mine the logs. Remove personal details first.
- Real failures. Each tallied kind becomes cases.
- A grid of dimensions. List how questions vary, such as passage and language, and combine them.
- Invented variations. Change one fact and say how the answer should move, as CheckList tests do. A reserved book should change a renewal answer; a typo should not.
A representative sample mirrors what patrons ask, in their proportions, so its pass rate estimates everyday success. A challenge set gathers hard or rare cases on purpose, so it cannot say how often patrons meet them, and nor can invented cases. Extra Hindi cases added to see failures get their own pass rate.
Related cases stay on one side of a split: a question and its rewording or translation are both development cases or both held out (keep some cases out). You can now say where a case came from and what its set can estimate.
Agree on the grades
A rule is only as clear as two careful people find it. Two graders grade the same answers alone, with a reason for each verdict, then name the cause of each disagreement, a step called adjudication.
- An ambiguous rule. Both readings are reasonable, so rewrite the rule.
- Missing evidence. A grader lacked something, such as a cited passage, so fix the materials.
- A grader's mistake. Someone misread the answer, so correct the label.
Only then count agreement. Suppose two librarians grade the same 50 answers.
| Verdicts | Grader 2 passes | Grader 2 fails |
|---|---|---|
| Grader 1 passes | 42 | 2 |
| Grader 1 fails | 2 | 4 |
They agree on 46 of 50, 92%, which flatters them. Each passed 44, so a grader passing everything unread would agree with either 88% of the time. On the 8 answers either failed, they agreed on only 4.
Inter-rater agreement can be corrected for chance. For two graders the usual measure is Cohen's kappa, where 0.0 “indicates no agreement beyond what would be expected by chance” (scikit-learn) and 1 is full agreement; here it is about 0.62. You can now say what a disagreement needs and why raw agreement misleads.
Going deeper: the kappa arithmetic
Each grader passes 44 of 50 answers, a rate of 0.88, and fails 0.12. Graders guessing at those rates would agree 0.88 × 0.88 + 0.12 × 0.12 of the time, about 0.79. Kappa is (observed agreement minus chance agreement) divided by (1 minus chance agreement): (0.92 minus 0.79) divided by (1 minus 0.79), about 0.62. The grader who passes everything agrees 88% of the time and scores a kappa of 0. Anthropic's safety-evaluation guide asks for agreement corrected this way, with statistics that “discount the agreement two raters would reach by luck.” Kappa hides which verdicts differ, so keep the table, and read examples of each disagreement: does “the book drop takes returns every day” answer “Can I return it on Sunday?”
Build the judge, then measure it
An AI judge is a language model applying your rules (first guide). Build its instructions from the graders' written reasons, which Hamel Husain's judge guide uses as worked examples in the prompt. Tune on some labelled answers and measure once on others it never saw.
Suppose the judge is tested on 60 labelled answers it was not tuned on. Count three things first:
- Graded. 52 answers got a pass or a fail.
- Sent to a person. 5 answers got “cannot tell”.
- No verdict. 3 runs timed out or returned something unreadable.
Only the 52 graded answers can show errors. The other 8 queue for a person, counted apart and never silently dropped.
| People's label (52 graded) | Judge passes | Judge fails |
|---|---|---|
| Pass (40) | 38 | 2 |
| Fail (12) | 3 | 9 |
Name the denominator every time (see false passes and false fails):
- False passes. Of the 12 graded answers people failed, the judge passed 3: one failure in four escapes.
- False fails. Of the 40 graded answers people passed, it failed 2, or 5%, each a needless review.
- Bad approvals. Of the 41 graded answers it passed, 3 were bad, about 7%.
Track both errors as you revise, because catching more failures can raise false alarms. A false pass on a fee claim costs most here. Measure Hindi answers separately. You can now report a judge with three counts and two error rates.
Going deeper: correcting a judge's pass rate
Suppose this judge later grades a month of live answers and passes 70% of the answers it gives a verdict on. “Cannot tell” and no-verdict answers go to a person and stay out of that 70%, so the correction below covers only judge-graded answers. Among the 52 graded test answers, it passed 95% of good ones (38 of 40) and failed 75% of bad ones (9 of 12). If those rates hold for graded live answers, their true pass rate is (judge's pass rate plus share of bad answers it fails, minus 1) divided by (share of good answers it passes plus share of bad answers it fails, minus 1). That is (0.70 + 0.75 minus 1) divided by (0.95 + 0.75 minus 1), or 0.45 divided by 0.70, about 64% of graded answers. This is the Rogan-Gladen correction from diagnostic testing, used by the judgy library, which requires the two shares to add up to more than 1.
The assumption carries the weight: the judge must make the same errors on graded live answers as on its graded test answers, with the same mix of languages and questions. A pass rate for all live answers also needs the person-graded ones added back. The rates rest on only 40 good and 12 bad answers, so the corrected figure needs its own range, which judgy estimates by resampling. Watch the names: judgy's “true positive rate” is the share of good answers passed, while Husain and Shankar's FAQ treats a failure as the positive.
Freeze the rules, then open the held-out cases
Held-out cases are cases nobody looked at while improving the assistant, its rules or its judge. Before opening them, freeze the grading rules, the judge's instructions and the brief: write each down with a date and keep it fixed.
A result changes what feels reasonable: lower the Hindi bar after a Hindi drop, and the brief describes the result instead of testing it. Deciding the analysis in advance is called preregistration (Anthropic's safety-evaluation guide).
Fixing B with held-out failures in mind turns them into development material, so a later check needs fresh cases (keep some cases out). You can now say what to freeze and when a held-out set stops being held out.
Compare case by case
Both versions answered the same 40 held-out cases, H01 to H40: 30 asked in English and 10 in Hindi. A passed 30 (75%) and B passed 33 (82.5%). Sort each case into one of four piles.
| Pile | All 40 | English 30 | Hindi 10 |
|---|---|---|---|
| Both pass | 27 | 22 | 5 |
| Only A passes | 3 | 0 | 3 |
| Only B passes | 6 | 6 | 0 |
| Both fail | 4 | 2 | 2 |
This is a paired comparison. Cases both pass or both fail cannot say which version is better. Only the 9 that changed carry the difference: 6 went B's way and 3 went A's. Every gain is English; every loss is Hindi.
- H23 to H28, English, only B. B fixed citations (H23, H25, H27), a skipped fee part (H24), a missed condition (H26) and a missing photo ID (H28).
- H36, Hindi, only A. B states a late fee applies; D2 says none. An invented fee.
- H37 and H38, Hindi, only A. B skips the fee part (H37) and leaves a renewal rule uncited (H38).
English rose from 22 to 28 of 30; Hindi fell from 8 to 5 of 10. The both-fail cases remain work for either version: lost-book answers that omit the charge (H29) or call the notice silent (H39), parking (H30) and a fee claim citing D1 (H40).
B helped the language its instructions were written in and hurt the one they never met, the slice error analysis skipped. You can now read changed cases before totals.
How large could the gain or loss be?
B gained 7.5 percentage points: 82.5% minus 75%, not 7.5% more. A confidence interval is a range built so that ranges made this way contain the true value about 95% of the time, under stated assumptions. For B minus A it runs from about 7 points worse to 22 better, because only 9 cases changed.
Before looking, decide the smallest change that matters: the smallest gain worth switching for, and the largest acceptable loss for a protected group. This range clears no such line.
In the first guide's 1,000-case table, B passes 905 against 890. Suppose 60 cases went B's way and 45 went A's (invented for this page): B gains 1.5 points, with a range from about 0.5 worse to 3.5 better, about seven times narrower, yet still crossing zero while Hindi fell from 80 to 50 of 100. A narrow range answers “how large”, not “should we ship”.
Cases sharing a passage are related: the 40 questions draw on only six passages. If B misreads D4, every D4 question can fail together. The range may then be wider, depending on whether changes between versions move together within a passage; these 40 cases cannot say by how much.
Reruns show how much answers wobble, not how the assistant does on questions never asked; only more distinct questions narrow that part.
Scores also move when nothing changed (why a score moves): a rerun can give a different answer even with the randomness setting at its lowest (Thinking Machines), prompt layout alone can shift scores (Sclar and colleagues), and providers update models behind one name (Chen, Zaharia and Zou). Run both versions in the same period. You can now state a difference as a range.
Going deeper: the paired range in words
Write b for the cases only B passes (6), c for the cases only A passes (3) and n for all cases (40). The difference is (b minus c) divided by n, 3 divided by 40, or 7.5 points. Its standard error, the typical size of the chance wobble in that estimate, is the square root of (b + c minus (b minus c)2 divided by n), all divided by n. The square root of (9 minus 9 divided by 40) is about 2.96, and 2.96 divided by 40 is about 7.4 points. The approximate 95% range is 7.5 plus or minus 1.96 × 7.4: about 7 points worse to 22 better. Miller recommends “using the paired version of the standard error estimate wherever practicable.”
Anthropic recommends computing the standard error by groups of related questions, “the unit of randomization (for example, passage of text)”. On two public tests in Miller's data, doing so made it 3.05 times larger (DROP) and 1.10 times larger (RACE-H); other data can differ.
The formula assumes independent cases and enough changed cases for a normal approximation. With 9 changed cases and questions sharing passages, treat the range as a rough guide that may be too narrow. Ten Hindi cases, with 3 changed, are too few for this approximation at all.
Decide: ship, hold or gather more evidence
Ship means B replaces A. Hold means not now, with a stated reason and fix. Gather more evidence means more cases could settle it. Apply the frozen brief rule by rule.
| Rule | Evidence | Result |
|---|---|---|
| H1 no invented fee | B invents one (H36); A none | Broken |
| H2 Hindi no worse | A 8 of 10, B 5 of 10 | Broken |
| G1 overall at least as high | A 30 of 40, B 33 of 40 | Met |
| P1 shorter answers | A preference | Cannot outweigh a gate |
The answer is hold: the average improved, but two written requirements failed. H1 counts stated unsupported fees: B states one, A none (H29 breaks the every-part rule instead), and more cases cannot undo it. H2 compares observed Hindi pass rates as written, and every changed Hindi case went A's way; the brief never said how many Hindi cases it needs, hence the second fix below. What would change it:
- Fix how B handles Hindi questions, using new Hindi development answers, never the held-out ones.
- Run fresh Hindi cases, many more than 10, because 10 cannot size the problem.
- Confirm zero invented fees on fresh cases in both languages.
- Freeze again, then compare case by case on unseen held-out cases.
Write down the decision, its reasons and this list. You can now say what evidence would change a hold.
After launch
Suppose a later version passes and ships. Evaluation continues in two suites (capability and regression evals).
- A regression suite holds cases the current version already passes. It should stay near 100%; a drop means something broke (regression tests).
- A capability suite holds cases it still fails, such as lost-book charges. It should start low and climb.
A capability suite every version passes is saturated (Anthropic's guide): move its cases to regression and write harder ones.
Weekly, grade a sample of live answers, part of it random, and estimate how often each failure kind occurs (evaluation after launch). A live failure, stripped of personal details, is recorded as a known failure with its expected answer; once fixed, it joins the regression suite as a passing check.
Three ways to try a version on real traffic answer three questions:
| Method | Who sees B | Can B's answers take effect? | What it supports |
|---|---|---|---|
| Shadow | No patron | No, only logged | How B would answer real questions |
| Canary | A small share | Yes, for that share | Whether to continue the rollout |
| A/B test | A random share | Yes | Whether B causes a change |
Amazon SageMaker's shadow tests (as of November 2026) return only the current version's responses. Google's SRE workbook calls canarying a partial, time-limited deployment with evaluation. Random assignment lets an A/B test speak about cause (Kohavi and colleagues).
Figure 4 · Illustration · A run record
- Model. The exact name and version the provider reported.
- Instructions. Version A or B, with its saved text.
- Notice. The passages in force, D1 to D6.
- Judge. Its model and frozen instructions.
- Cases. Which set, such as H01 to H40.
- Date. When the run happened.
Planning needs no code; running a shadow test, canary or A/B test needs a live system with real traffic. You can now plan what to watch and record.
Sources and further reading
Sources were checked on 19 November 2026. Links beside each claim lead to primary research, official documentation or the practitioners' own guides. The library, its notice, the answers, the release brief and every number about them are invented teaching material. Research results describe their tested setups, not current model rankings.
- AI Evals: Everything You Need to Know, Husain and Shankar's FAQ, covers error analysis, case sourcing and monitoring.
- Using LLM-as-a-Judge For Evaluation: A Complete Guide builds and validates a judge from expert critiques.
- Anthropic's safety-evaluation guide covers grader checks, preregistration and reporting.
- Adding Error Bars to Evals develops paired and clustered uncertainty.
- Anthropic's agent-evaluation guide separates capability and regression evals.
- Practical Guide to Controlled Experiments on the Web explains A/B testing.
Start with the first step: what error analysis is and how to do it.