Alberto Angulo

Evidence · Method

Build an Evaluation From Your Own Work

Thirty real cases, graded honestly and rerun after every change, answer "is this better for us?" better than any public ranking. How to build the file, how to read what it tells you without fooling yourself, and why ten cases this week beat thirty next quarter.

Alberto Angulo10 min read · 19 October 2026

On September 30, 2026, Anthropic told developers that a snapshot of one of its models, Sonnet 4.5, would be retired on November 30. Sixty-one days' notice, a day more than the minimum it commits to.

Picture two companies running a customer process on that model. The first spends the two months arguing. Someone tried the replacement and thinks it's worse at the tricky emails. Someone else thinks it's fine. A vendor says its own tool would solve the problem. Nobody can settle it, because nobody has anything to settle it with.

The second company opens a file of thirty real cases from its own work, each with a known good answer, runs them through the new model in the afternoon, reads the failures, and decides by Friday.

The difference between those two companies is the whole argument of this piece. The only reliable answer to "is this model, prompt or tool better for us?" is a small evaluation set: your own real cases with known good outcomes, run through the whole system after every change. Public rankings help you build a shortlist (Leaderboards Measure the Test). Vendor demos show you what a product does on inputs its team chose. Neither samples your customers, your suppliers, your phrasing or your exceptions. Your file does.

Building one is less work than most teams assume, and reading it honestly is harder. Both parts are below.

Why an evaluation is not a test suite

Engineers arrive with a good instinct: pin behavior down with tests that run on every change. They also arrive with an assumption that a language model breaks. A traditional software test is deterministic: one input, one correct output, the same result every time.

A model gives you none of that. The same input can produce different outputs on different runs. Many different outputs can be acceptable. And deciding whether an output passed often needs judgment. So the result of an evaluation is a rate with uncertainty around it, and the practice looks more like quality control in a factory than like unit testing. You sample, you count defects against a specification written in advance, and you decide whether to accept the lot.

THE EVALUATION LOOP · a file you own, rerun after every change1 · Casesreal past cases,known good outcomes2 · Runwhole harness,same config, 3 to 5 times3 · Gradecode checks first,then people, then a judge4 · Analyzeread every failure;count the causes5 · Change one thingprompt, model, toolor data; then rerun6 · Add real misseseach production errorbecomes a new casepass rates,failing casesreruncase set growsfed by production: corrections,complaints, escalationsSteps 2 to 5 repeat on every change. Step 6 never stops.
An evaluation is a loop that never closes. Cases run through the whole system several times, get graded, and their failures get read before one thing changes and everything reruns; real production misses flow back in as new cases.Conceptual illustration

The file

Take a concrete job, constructed for illustration. An accounts-payable team receives emails from suppliers saying an invoice is wrong or unpaid. Software around the model (the harness, which Same Model, Different Results explains) fetches the matching purchase order and receiving record. The model then classifies the dispute, extracts the invoice number and the amount claimed, computes the gap against the purchase order, and drafts a reply that a clerk reviews and sends. The team wants to know whether a cheaper configuration can replace the current one.

Start from closed disputes, because their outcomes are known: the right category, the right amount, a reply the clerk approved. Check those answers first. Clerks make mistakes, and a wrong "known good" answer punishes the better system.

The mix matters more than the count. A sensible thirty might be 15 normal cases, sampled at random from closed disputes; 9 hard ones, picked on purpose from disputes that took a clerk several rounds (two invoices in one email, a partly applied credit note, a supplier writing in another language); and 6 adversarial ones, such as an email containing an instruction aimed at the model, or a request to change bank details.

Why not sample everything at random? Because random samples miss exactly the cases that do damage. If 3 percent of disputes involve a tricky multi-invoice email, a random thirty contains none of them about 40 percent of the time. The price of choosing edge cases deliberately is that your pass rate is no longer your production pass rate. That's fine, as long as you report the normal, hard and adversarial groups separately instead of blending them into one number.

Have a second person label ten of the cases independently. Where two competent people disagree on the right answer, the case is ambiguous, and it waits until the policy is clarified. And keep the file yourself. OpenAI's hosted Evals product goes read-only on October 31, 2026 and shuts down a month later, which is a useful reminder that a vendor's platform is a poor place for the only copy of your cases.

Decide what "good" means before you look

Write the checks before you see any outputs. People, and models, drift toward approving whatever is in front of them.

Each check should be answerable yes or no. Is the category right? Is the amount exact, to the cent? Does the reply cite the invoice number and name the next step? Does it avoid promising a payment the policy forbids? Does it ignore the instruction hidden in the email?

Then split the checks into two kinds. Gates are failures that cost money or trust: a wrong amount, an unauthorized promise, obeying an injected instruction. Quality covers tone and completeness. Never average the two. An average lets a pleasant reply hide a wrong number, and a wrong number is the thing that matters.

Who grades

Use the cheapest grader that can actually see the property you care about, and spend human attention on what's left.

Code first. A check that the gap reconciles to the cent catches a whole class of error without anyone reading anything. Code checks are cheap, exact and repeatable, and blind to everything they weren't written for.

People second. Someone who knows the work is the best judge of stance and tone. At thirty cases the cost is modest, roughly an hour of reading at a couple of minutes per draft. It stops being modest when you run thirty cases three times on two configurations: 180 drafts, about six hours, for one comparison.

A model as judge, third, and only after calibration. Another model can grade at scale, and it has documented habits. In the original study of models as judges, from 2023, judges shown the same two answers in swapped order often changed their verdict, mostly favoring whichever came first; GPT-4 gave the same verdict both ways in only 65 percent of cases. Judges also tend to prefer longer answers, and some favor their own writing over equally good answers from others.

So treat a model judge like any instrument: calibrate it. Have a person grade 40 outputs, run the judge on the same 40, and compare. Look past the agreement rate. Suppose the person passes 31 and fails 9, and the judge agrees on 35 of 40, or 87.5 percent. That sounds good until you notice that a judge stamping "pass" on everything would agree 77.5 percent of the time. The number that matters is how many of the 9 real failures the judge caught. Here it caught 5. That makes it a decent filter and a poor gatekeeper. And give the judge the reference answer: in that same 2023 study, a judge given the correct answer was wrong on 3 of 20 math gradings, against 14 of 20 without it.

Run the whole system, more than once

Don't test the model in a playground. Test what you'll deploy: the retrieval that fetches the purchase order, the instructions, the tools, the output parser, the retry rules. A failure can come from the harness (the lookup fetched the wrong purchase order), and a model-only test would never see it.

Change one thing at a time. If the new configuration differs in both model and prompt, a change in results can't be assigned to either. Record cost and latency beside quality, because passing two more cases at four times the price is a different decision from passing two more at the same price.

Then run each case three to five times, because one run is one draw. How you summarize depends on how the output is used. If a clerk reads every draft, the question is whether a good draft usually appears. If the output goes out unreviewed, the question is whether every run succeeds, and that falls fast: a case that passes 90 percent of the time passes three runs in a row only 73 percent of the time. Pick the summary before the results arrive.

Reading the result without fooling yourself

Guess first

The current configuration passes 27 of the 30 cases and the cheaper one passes 24. The current one is 10 points ahead. How sure should you be that it is better?

Not very.

With thirty cases, each pass rate comes with a wide range of plausible true values, which statisticians call a confidence interval. Ninety percent on 27 of 30 is compatible with a true rate from about 74 to 97 percent. Eighty percent on 24 of 30 is compatible with about 63 to 91. The ranges overlap heavily.

ILLUSTRATIVE DATA · 30 cases, one run eachPass rate with 95% Wilson interval50%60%70%80%90%100%Config A27 of 3090.0% (74.4 to 96.5)Config B24 of 3080.0% (62.7 to 90.5)Difference A minus B in points, 95% interval (paired)−30−20−100+10+20+30A minus B+10.0−7.2+27.2no differenceDiscordant cases: A passed and B failed on 5; B passed and A failed on 2. Exact sign test p = 0.45.The interval contains zero: these data do not separate the two configurations.
A 10-point lead on 30 cases does not separate two configurations. Pass rates of 27/30 and 24/30 have overlapping 95% intervals, and the interval for the case-by-case difference (−7 to +27 points) includes zero; illustrative data, one run per case.ComputedSource: Illustrative data. Wilson intervals computed with z = 1.95996; paired difference interval from the per-case differences (5 A-only wins, 2 B-only wins, 23 ties); exact sign test p = 0.453. Code in the article's notes and sources.

The better check uses the fact that both configurations ran the same cases. Line them up case by case. In this illustration, 22 cases pass under both and one fails under both, so those 23 tell you nothing about which configuration is better. Only the seven cases where they disagree carry information: the current one won five and the cheaper one won two. If the two were equally good, a split at least that lopsided would happen about 45 percent of the time. Six wins to zero would be convincing. Five to two is not.

Only the cases where the two configurations disagree carry information about which is better.

That sets honest expectations. Thirty cases will catch large gaps and regressions. They won't rank near-equal options: telling a true 90 percent from a true 80 percent reliably takes about 200 cases per configuration. When the numbers don't separate the options, decide on other grounds (price, latency, the kinds of failures each one makes), and write that decision rule down before you look, so nobody can reinterpret it afterward to suit a preference.

Read the failures

The score says how many failed. The failing outputs say why, and the why is what you can act on. Print every failure beside its case and the reference answer, write one line on what went wrong, group the lines, and count.

A failure comes from one of five places, and each needs a different fix: the model (it misread a credit note), the harness (it fetched the wrong purchase order), the grader (a check rejected a correct reply worded differently), the label (the clerk's recorded answer was wrong), or the specification (two sensible people disagree about the right answer). Some of the fixes that move the score most touch no model at all. Correct a wrong label and both configurations improve; fix the purchase-order lookup and the one that tripped on it does.

There's a trap here. Once you edit the prompt to fix the failing cases, those cases stop testing it. Lock away about a third of the set: look at their scores, never use their transcripts for fixing, and refresh them with new real cases each quarter.

Keep it alive

An evaluation built for one decision goes stale the week after. What keeps it useful is a few dull habits.

The ratchet. Every failure that reaches production, whether a clerk's correction, a supplier complaint or an escalation, becomes a new case with the correct outcome before anyone fixes it. The set grows toward the failures your system actually has. This is how work starts to compound instead of repeating itself (When Work Starts to Compound).

Triggers. Rerun the set on every change to the prompt, the model, a tool, the harness or the data it reads, and monthly on an unchanged setup. Providers repoint model names and vendors change hosted tools; your configuration can change without you touching it, and only a scheduled run notices.

An owner. One named person owns the cases, the grader versions and the results log, and every result carries its date and configuration, so March can be compared with October.

Guarding the number. A pass rate that becomes a target gets optimized until it stops describing the work. Keep two or three numbers, keep adding cases, and every so often have someone read ten raw failures aloud. A team that only watches the number slowly loses sight of what it stands for.

Be honest about what the file can't tell you. It covers the cases you thought of. A failure that happens 1 percent of the time won't show up in thirty cases about three times out of four, so rare, severe risks need other controls such as permissions and review (Giving an Agent Room to Work). And a higher pass rate is not the same as faster dispute closure or lower cost per resolved dispute, which have to be measured on the business itself.

An evaluation measures what you thought to check. Everything else remains unmeasured, and the report should say so.

Start with ten

The usual objection is time, and for most teams it's real. My answer is a smaller version, built now.

Ten cases fit in an afternoon: five normal, three hard, two adversarial, pulled from last month's closed work. Code checks cover the two or three things that have exact answers. A person reads every output. One file holds the cases, and the file runs before every change. Ten out of ten proves less than it sounds (the true rate could still be as low as about 72 percent), so the small version rules out big problems and says nothing about reliability. It's also the seed: the thirty-case set grows from it, one real failure at a time.

The other objection is that an experienced person's judgment is cheaper and usually right. I agree with the premise. An experienced clerk reading outputs is an evaluation. The file is that judgment written down so someone else can rerun it on a new model without the expert in the room, compare it with last quarter, and keep it when the expert leaves.

That's the second-order reason to build it. Models change every few months, and every change is a decision. A company with a file makes those decisions in an afternoon, with evidence about its own work. A company without one makes them by argument, and keeps making them that way.

Check yourself

Why is an evaluation more like quality control than a unit test?

The same input can give different outputs, many outputs can be acceptable, and judging often needs judgment. So the result is a rate with uncertainty.

In the 27 versus 24 example, why isn't the lead convincing?

Only the cases where the two configurations disagree carry information. A five to two split would happen about 45 percent of the time if they were equally good.

Why lock away about a third of the set?

Once you edit the prompt to fix the failing cases, those cases stop testing it. Held-back cases keep the measurement honest.

Notes, sources and method

For readers who want to check the numbers behind Build an Evaluation From Your Own Work. Sources were checked on 11 October 2026. The accounts-payable scenario, Configs A and B, the strata results, the judge calibration table and the production mix are constructed to illustrate the method; they come from no real company or evaluation.

Key numbers

Number in the articleExact value and contextSource and date
Sonnet 4.5 snapshot: notice 30 Sep 2026, retirement 30 Nov 2026, 61 days; minimum 60 daysclaude-sonnet-4-5-20250929; "at least 60 days' notice before model retirement for publicly released models"Anthropic, Model deprecations [8]
OpenAI Evals read-only 31 Oct 2026, shutdown 30 Nov 2026Banner on the evals guideOpenAI developer documentation [9]
Thirty cases as a starting sizeAnthropic's engineering team recommends 20 to 50 simple tasks drawn from real failures; its developer guide prefers many automatically graded items over a few hand-graded onesAnthropic [6][7]
15 normal, 9 hard, 6 adversarialIllustrative compositionConstructed
3% case type missing from a random 30 about 40% of the time0.97^30 = 0.401Computed
Second labeler on ten casesPractice recommendationArticle judgment
About an hour for 30 drafts; 180 drafts about six hoursAssumes two minutes per draft (time your own reviewers); 30 cases × 3 runs × 2 configurations = 180Estimate
GPT-4 consistent under swapped order in 65% of cases65.0% (GPT-3.5 46.2%, Claude-v1 23.8%), mostly favoring the first answerZheng et al. 2023 [1]
Judges prefer longer answersPadded answers preferred 91.3% by Claude-v1 and GPT-3.5 (GPT-4 8.7%) on 23 answersZheng et al. [1]
Judges favor their own writingGPT-3.5, GPT-4 and Llama 2 scored own summaries above others' that humans judged equal; stronger after fine-tuning for self-recognitionPanickssery, Bowman and Feng 2024 [3]
Judge calibration: 35 of 40 agreement (87.5%), always-pass 77.5%, caught 5 of 9 failuresPrecision of failure flags 5/6 (83%); recall 5/9 (56%)Illustrative (Method)
Judge with reference: wrong on 3 of 20 vs 14 of 20Default judge 14/20, chain-of-thought judge 6/20, reference-guided 3/20 (failure = judge calls an incorrect answer correct)Zheng et al. [1]
Three to five runs per casePractice recommendationArticle; Miller [4]
90% per run → 73% for three in a row0.9^3 = 0.729 (Anthropic's example: 75% per trial, about 42% over three)Computed; Anthropic [7]
27/30 vs 24/30: about 74 to 97 and 63 to 91Wilson 95%: 74.4 to 96.5 and 62.7 to 90.5Computed (Method)
22 both pass, 1 both fail, 5 vs 2 disagreements; about 45%Exact two-sided sign test p = 0.453Computed
Six wins to zero convincingp = 0.031Computed
About 200 cases per configuration for 90% vs 80%199 (80% power, two-sided α = 0.05, independent samples)Computed
Lock away about a third10 of 30 casesArticle practice
1% failure missed by 30 cases about three times in four0.99^30 = 0.740Computed
Ten of ten: true rate could be as low as about 72%Wilson lower bound 72.2%Computed

The figures a52-grader-hierarchy (code checks, human review and model judges compared on reliability and cost) and a52-case-mix (the 15/9/6 composition against an assumed production mix) were dropped from the article in the 19 Oct 2026 rewrite. The SVG files remain.

Method and assumptions

The configuration under test is model, prompt, tools, settings and the harness code that ties them together. Pin and record each: exact model identifier, prompt text, tool definitions, settings, harness commit and grader versions.

Checks used in the example.

CheckPasses whenGraded by
CategoryMatches the labeled categoryCode
Invoice numberMatches after normalizing spaces and caseCode
Amount and currencyExact matchCode
GapEquals claimed amount minus purchase-order amount, to the centCode
Reply anchorsCites the invoice number and names the next stepCode (string checks)
No unauthorized promiseNo payment commitment or concession policy forbidsCode (phrase list), then a person on flagged cases
Right stanceAnswers the supplier's actual question and takes the position policy requiresPerson against a rubric
Injection resistanceIgnores embedded instructions; no bank-detail changeCode on output and tool log

Prefer pass or fail with a one-line reason over a 1-to-5 scale (Husain [10][11]). Write a reference reply for each case, so a rubric and a model judge have something concrete to compare against.

Wilson score interval. For k successes in n trials with p̂ = k/n and z = 1.95996: center = (p̂ + z²/2n) / (1 + z²/n); half-width = z · √(p̂(1 − p̂)/n + z²/4n²) / (1 + z²/n). For 27 of 30: center 0.85459, half-width 0.11081, interval 0.7438 to 0.9654. For 24 of 30: center 0.76595, half-width 0.13900, interval 0.627 to 0.905. The familiar Wald interval gives 79.3 to 100.7 percent for 27 of 30, above certainty; Brown, Cai and DasGupta (2001) showed its coverage is erratic at small n and recommended Wilson or Jeffreys intervals [5].

Paired comparison. Outcomes: 22 both pass, 5 A only, 2 B only, 1 both fail. A − B = +0.10. Exact two-sided sign test on 7 discordant cases: 2 × (1 + 7 + 21)/128 = 0.4531. Per-case differences d_i (+1 five times, −1 twice, 0 otherwise): mean 0.1, sample variance 6.70/29 = 0.2310, SE = √(0.2310/30) = 0.0878, interval −0.072 to +0.272 (Miller's paired formula [4]). Unpaired difference: −0.079 to +0.279. The normal approximation is rough at seven discordant cases; trust the exact test more. With several runs per case, score each case by its share of passing runs and apply the paired interval to those shares; the sample is still 30 cases, not 90 answers.

Strata and reweighting (dropped from the body). Illustrative results: A passes 14/15 normal, 7/9 hard, 6/6 adversarial; B passes 14/15, 5/9, 5/6. At an assumed production mix of 88% normal, 11% hard and 1% adversarial: A = 0.88 × 14/15 + 0.11 × 7/9 + 0.01 × 6/6 = 0.9169; B = 0.88 × 14/15 + 0.11 × 5/9 + 0.01 × 5/6 = 0.8908. The 10-point gap on the set becomes an estimated 2.6 points at that mix, because the set deliberately overrepresents hard cases. Reweighting adds no evidence, since each stratum rests on 6 to 15 cases.

Failure illustration. A fails three cases and B six. Suppose the one case both fail has a wrong label, one of B's other failures comes from the harness fetching the wrong purchase order, and two more of B's are drafts that promise a credit the policy forbids. Correcting the label lifts both scores and fixing the harness lifts B's.

Other figures. pass@k (at least one of k attempts succeeds) versus pass^k (every attempt succeeds). Sample size for 90 versus 60 percent: 32 per configuration. Wilson bounds: 30 of 30 has lower bound 88.6 percent.

from math import sqrt, comb

Z = 1.959963984540054

def wilson(k, n, z=Z):
    p = k / n
    d = 1 + z * z / n
    center = (p + z * z / (2 * n)) / d
    half = z * sqrt(p * (1 - p) / n + z * z / (4 * n * n)) / d
    return center - half, center + half

def sign_test_two_sided(a_only, b_only):
    m, k = a_only + b_only, min(a_only, b_only)
    return min(1.0, 2 * sum(comb(m, i) for i in range(k + 1)) / 2 ** m)

print(wilson(27, 30))              # (0.7438, 0.9654)
print(wilson(24, 30))              # (0.6269, 0.9049)
print(sign_test_two_sided(5, 2))   # 0.4531

Caveats and open questions

  • Judge biases on current models. The position, verbosity and self-preference results come from 2023 and 2024 models (self-preference was measured on summarization). Their size on today's models and on your task is unknown; calibrate your own judge. Wang et al. (2023) reported that changing only the order let Vicuna-13B "beat" ChatGPT on 66 of 80 queries when ChatGPT was the judge. GPT-4 agreed with human experts on 85 percent of non-tied votes against 81 percent between humans, on a general-chat benchmark. In Husain's Honeycomb example, agreement with a human grader rose from 68 to 82.6 to 94 percent over three versions of the judge prompt, on data balanced enough that agreement was a fair measure.
  • Grader ordering. Anthropic's guide calls human grading slow and expensive and says to avoid it when possible; OpenAI's best-practices page agrees on the cost and adds that it gives the highest quality. Both describe scale. The article orders graders by reliability for a small set, where scale is not the constraint.
  • Repeated runs reduce only one source of noise. Miller separates variance from which cases you picked from variance in the model's answers to a fixed case; rerunning reduces only the second. In his uniform-difficulty example, four runs capture three quarters of the reduction rerunning can deliver, and no number of runs cuts total variance by more than two thirds. His Table 4 shows clustered standard errors 1.1 to 3.05 times the naive ones.
  • Sampling settings. As of October 2026, Anthropic's documentation says a non-default temperature, top_p or top_k returns an error on its models from Claude 4.7 onward, so pinning temperature at zero is no longer possible there; it never guaranteed identical outputs anyway. Measure variation by rerunning.
  • Vendor products. Send the vendor the inputs, withhold the answers, grade what comes back yourself, and keep a private subset the vendor never sees.
  • Error analysis. Husain calls it the most valuable activity in AI development; in his NurtureBoss example three categories made up over 60 percent of problems. Anthropic recommends reading transcripts before trusting scores, because a failure may be a grader rejecting a valid solution.
  • What the set cannot conclude. Generalization beyond the cases you thought of; rare events; the graders' own errors; satisfaction; business value (dispute closure time, escalations, cost per resolved dispute); security against an attacker with more than six ideas; tomorrow.
  • Retirement of cases. Labels go stale (a payment-terms change turns a correct answer into a wrong one). Date every label, review the set each quarter, retire cases the policy has overtaken.
  • What would change the conclusion. If the set's ranking of configurations repeatedly disagrees with what happens in production, it is measuring the wrong thing; rebuild the cases, labels or graders.
  • Volatile documentation. Anthropic and OpenAI pages change; dates are as of October 2026. OpenAI's deprecations page itself was not fetched; the evals guide banner is primary.
  • No first-hand case. The article invents no experience for Alberto; a real eval he built or inherited, or a failure that became a case, would strengthen it.

Sources

  1. Zheng, L., Chiang, W.-L., Sheng, Y., et al. Judging LLM-as-a-Judge with MT-Bench and Chatbot Arena. arXiv:2306.05685, June 2023 (v4 December 2023). https://arxiv.org/abs/2306.05685
  2. Wang, P., Li, L., Chen, L., et al. Large Language Models are not Fair Evaluators. arXiv:2305.17926, May 2023 (v2 August 2023). https://arxiv.org/abs/2305.17926
  3. Panickssery, A., Bowman, S. R., Feng, S. LLM Evaluators Recognize and Favor Their Own Generations. arXiv:2404.13076, April 2024; NeurIPS 2024. https://arxiv.org/abs/2404.13076
  4. Miller, E. Adding Error Bars to Evals: A Statistical Approach to Language Model Evaluations. arXiv:2411.00640, November 2024. https://arxiv.org/abs/2411.00640
  5. Brown, L. D., Cai, T. T., DasGupta, A. Interval Estimation for a Binomial Proportion. Statistical Science 16(2), 2001, pp. 101-133. https://projecteuclid.org/euclid.ss/1009213286
  6. Anthropic. Define success criteria and build evaluations. Claude developer documentation, accessed 11 Oct 2026. https://platform.claude.com/docs/en/docs/test-and-evaluate/develop-tests
  7. Anthropic Engineering. Demystifying evals for AI agents. 9 Jan 2026. https://www.anthropic.com/engineering/demystifying-evals-for-ai-agents
  8. Anthropic. Model deprecations. Claude developer documentation, accessed 11 Oct 2026. https://platform.claude.com/docs/en/about-claude/model-deprecations
  9. OpenAI. Evaluation best practices and Working with evals. OpenAI developer documentation, accessed 11 Oct 2026. https://developers.openai.com/api/docs/guides/evaluation-best-practices and https://developers.openai.com/api/docs/guides/evals; deprecation schedule at https://developers.openai.com/docs/deprecations
  10. Husain, H. Your AI Product Needs Evals. 29 Mar 2024. https://hamel.dev/blog/posts/evals/
  11. Husain, H. A Field Guide to Rapidly Improving AI Products. 24 Mar 2025. https://hamel.dev/blog/posts/field-guide/

All writing