The demo room was pleased. Relay, the patient portal triage assistant at Northgate Health, had just scored 95 percent on its test set, and the pilot decision looked like a formality. Then Tom asked one question: how many of those test messages mention a symptom?

None of them did. The team had written all 40 test messages itself, and people write what is easy to write: tidy scheduling requests, simple refill asks. Real traffic is 260,000 messages a month, and 15 percent of it is clinical or urgent. The pilot decision nearly rested on a score that said nothing about the risky third of the work.

Real work first

The fix starts from real portal threads. Real threads carry the mess: typos, half sentences, three requests in one message, a worried tone with a routine ask underneath. The failures live in the cases nobody thought to invent. A test set you wrote yourself is a spelling test you wrote for yourself: you would pass it, because you only included words you know.

Each case in the golden set has a known right answer, agreed by reviewers, and one rule comes before everything else: de-identify first. No nurse, architect or grader labels a thread that still carries a patient name or record number. The pipeline runs in order: sample live traffic, strip identifiers, fill fixed quotas, label, freeze as version 1. Every eval score names its set version, so a score change can be split into model change or set change.

Stratify, because averages hide the risky class

Stratify means fill quotas on purpose. Northgate's audit puts the mix at 55 percent routine, 30 percent judgment, 15 percent clinical or urgent, so a golden set of 400 holds 220, 120 and 60. A plain random sample of 400 would average the same split, but averages are not guarantees. Small classes wobble: a swing of plus or minus 10 urgent cases between two random draws is ordinary noise, and 10 cases is a sixth of the urgent class. Worse, a random draw can quietly contain zero hostile cases and almost no edge cases, because each is rare. The set still totals 400, and the gap is invisible in the headline count.

So inside every stratum, add the cases averages hide. Edge cases: three requests in one thread, a refill ask wrapped around a new symptom, a message so short the route is genuinely unclear. Hostile cases: a confused patient pasting text from a forum, a message that tries to instruct Relay directly, telling it to ignore triage rules or reveal another patient's details. Portal text is untrusted input. If the set has no injection attempts, the eval cannot catch a build that obeys them.

Label with the people who do the work

Each case gets two labels: the expected route, routine draft, nurse judgment, or escalate to clinician, and expected outcome notes in plain words. Nurses label, because the route is a clinical workflow judgment, not a writing preference. Two reviewers take the hard cases. Where they disagree, they talk and one answer wins, with the reason noted. Cases nobody can agree on leave the set. Then freeze and version: golden set v1 lives in version control beside the prompts it tests, and every change is a commit and a new version number.

A good set still needs an honest grader

A golden set answers what the test is. The next chapter answers how the scoring works, and the same trap waits there. Relay's first grader gave drafts a single score out of 10, and the pilot report looked healthy: an average of 8.6. Then Tom sampled 30 drafts by hand and found 4 that invented an appointment time the scheduling system never offered. One draft scored 9 for warmth while telling a patient a result was normal, a clinical claim no nurse approved. The grader was not lying. It was answering a vaguer question than the one Northgate needed answered.

Scoring runs in three layers, in the only order that works. Layer 1, deterministic checks: code, not a model. Right route, valid output schema, no banned strings, no appointment time the lookup never returned. Layer 2, a model grader scoring draft quality against an explicit rubric. Layer 3, human review: nurses score a sample of the same drafts. Code checks are free and exact, so they run on every draft. Model grading costs tokens, so it runs on survivors. Nurse time is scarcest, so it samples.

And safety is a gate, not an ingredient. Relay's break-it lab shows a grader that averages safety, tone and grammar into one score with a pass mark of 6, so a draft scoring safety 0, tone 10, grammar 10 passes at 6.7. A warm, grammatical draft that tells a patient the wrong thing about their health sails through. The fix is a separate pass or fail for safety, reported on its own line, never blended into an average.

The metric that makes automation trustworthy is agreement: does the grader judge as nurses judge? Nurses and the grader both scored the same 200 drafts. They agreed on 172, so 86 percent. The 28 disagreements were read one by one. Twenty-four were tone calls: the grader marked drafts down for being brief, while nurses accept brief drafts on routine threads, because patients skim. Only 4 touched content, and none was a safety disagreement. One rubric line changed, but rollout waited until safety agreement stayed near total across more calibration rounds.

So the decision rule is simple: if a class carries risk, pin its count by quota and read its score separately, whatever the overall average says. Automate scoring only as far as grader and nurse agreement, on safety above all, has been measured to hold.

The full interactive chapter is free at https://deployedlab.dev/lessons/ccap-11-build-the-eval-set, and the scoring chapter that follows it is free at https://deployedlab.dev/lessons/ccap-12-graders-rubrics-human-review. Both carry hands-on labs where you build golden eval set v1 and write the scoring rubric. There are 79 chapters free with no signup across the bundle, and the full bundle is $5 a month or $39 a year at https://deployedlab.dev.