Home › Study guides › CCDV-F › Domain 4 › Lesson 4.1
CCDV-F · Domain 4 · 10% of the exam · Lesson 4.1 · 20 min read Updated for the December 7, 2026 exam guide (v1.1)
Evaluation design: golden sets, behavioral checks and a calibrated judge
Build an eval for a stated quality goal: defensible metrics, a golden set, code-graded checks, an LLM judge calibrated on human labels, and regression runs.
Written against skill 4.1 of the official CCDV-F exam guide (Version 1.1, effective December 7, 2026). An independent resource, not affiliated with Anthropic; the practice questions are written from scratch.
4.1.1 Why "it looked fine when I tried it" is not a quality bar
Tenants of Brackenridge Homes, which manages about 4,000 rented flats, send roughly 600 maintenance messages a week. Malik, the company's only developer, built an assistant that reads each message, sets a category (plumbing, heating, electrical, appliance, pest or other) and an urgency (emergency, urgent or routine), and drafts a reply that a property manager reviews and sends. He tried fifteen messages by hand, liked every answer, and launched.
Three months later the managers asked for shorter replies. Malik trimmed the prompt from 900 words to 400, read a handful of drafts, and shipped it. Nine days later a tenant wrote that her hallway smelled of gas. The assistant marked the message routine and drafted a polite reply saying an engineer would be booked. The trimmed prompt had lost the paragraph that told it which messages are emergencies. Nothing failed loudly. No error, no crash, and the drafts read better than ever.
The trim was not the real problem; prompts, models and code always change. The problem was that Malik could not see, before shipping, that a change had broken the one thing that must never go wrong. Reading a few outputs by eye checks whatever you happen to read.
The fix is an evaluation, or eval: a fixed set of test cases with known correct answers, run through the application and scored by graders, so that every version produces comparable numbers against a quality goal you stated in advance.
4.1.2 Start from the quality goal, not the grader
Most first evals start with a scoring tool ("let's have a model rate each reply from 1 to 10") and only later ask what the score means. Work the other way round. Start from what the business needs, write it as success criteria, and only then choose a metric and a grader for each one.
Anthropic's guide to building evals gives four tests for a criterion. It is specific ("every gas, water-leak or no-heat-in-winter message is flagged as an emergency", not "handles urgency well"). It is measurable, as a number or a well-defined scale. It is achievable, set from evidence such as earlier experiments rather than hope. And it is relevant to what users need. Most applications need several criteria at once: a release that is more accurate and three times slower can still fail.
Malik and Odalys, the senior property manager, write down what "good" means for Brackenridge. Each goal becomes one number with a target, and each number has a grader that produces it the same way on every run.
| Quality goal | Metric (target set before measuring) | Grader |
|---|---|---|
| Every emergency reaches the emergency line | Emergency recall: share of true emergencies marked emergency (100%) |
Code: compare with the label |
| Messages go to the right trade | Category accuracy on the golden set (at least 95%) | Code: exact match |
| Replies never promise a date or a cost | Violations per run (zero) | Code: pattern check |
| A manager can send the reply without editing it | Judge pass rate (at least 85%), from a calibrated judge | LLM judge |
| Fast and affordable enough for 600 a week | p95 latency (the time 95% of requests beat) and cost per message | Code: from timings and token usage |
The exam guide asks for defensible metrics. A defensible metric measures the goal it claims to measure, is computed the same way on every run, and still means something when the cases are unbalanced. Urgency shows why the last part matters. Only about 2% of real messages are emergencies, so an assistant that never says "emergency" scores 98% urgency accuracy. Recall on the emergency class (of the messages that ARE emergencies, how many did it flag?) is the defensible choice, because it drops to zero for exactly that assistant. Pair it with a check on false alarms, so an assistant that flags everything cannot pass either.
4.1.3 Build the golden set
A golden set is a fixed, versioned collection of realistic inputs, each with the correct answer labelled by people who know the domain. Think of a standard exam paper with a marking scheme: every version sits the same paper, so a version that scores lower has visibly got worse.
What goes into the paper decides what the score means. Anthropic's guidance is to mirror the real distribution of your task, edge cases included: missing, overly long or hostile input, and ambiguous cases where humans would disagree. Its agent-evals guidance adds two habits. Start early with 20 to 50 cases drawn from real failures. And build balanced sets that test both when a behaviour should happen and when it should not, since a one-sided set rewards doing it all the time.
What goes into Brackenridge's 200-case golden set
Typical mix
Edge cases
Must trigger
Must not trigger
Labels come from people, not from the model. Odalys and Femi, another senior manager, label every case with its category and urgency, and they write one sentence on what a good reply must contain. Where they disagree, the case is clarified or marked ambiguous: the agent-evals guidance asks that two domain experts reach the same verdict on their own.
Three habits keep the golden set honest. Keep it out of the prompt: a case pasted in as a worked example no longer tells you how the assistant handles messages it has not seen. Version it like code, so every score names the set it came from. And feed it: every real failure becomes a new case, which is why the gas-smell message, with personal details removed, is now case 201.
4.1.4 Behavioral checks: let code grade what a rule can decide
Each output now needs grading, and Anthropic's guide says to choose the fastest, most reliable and most scalable method. Code-based grading comes first: exact match, string match, a parsed field compared with its label. LLM-based grading handles judgments code cannot make, and human grading is kept for where you must, because it is slow and expensive.
A behavioral check is a code-graded test of one required behaviour, whatever the wording of the reply. Some of Brackenridge's are simple comparisons: the urgency matches the label. Others check the reply itself: an emergency reply contains the emergency line, and no reply promises a date. Look at the lines marked MUST and NEVER: they encode the rules the gas-smell incident broke.
import json, re
EMERGENCY_LINE = "24-hour emergency line" # wording every emergency reply must include
DATE_PROMISE = re.compile(r"\b(within \d+ (hours|days|working days)|by (tomorrow|monday|tuesday|wednesday|thursday|friday))\b", re.I)
def behavioral_checks(case: dict, raw_output: str) -> list[str]:
try:
out = json.loads(raw_output)
except json.JSONDecodeError:
return ["output is not valid JSON"]
failures = []
if out.get("category") != case["category"]:
failures.append("wrong category")
if case["urgency"] == "emergency" and out.get("urgency") != "emergency":
failures.append("missed emergency") # MUST trigger
if out.get("urgency") == "emergency" and EMERGENCY_LINE not in out.get("reply", ""):
failures.append("emergency reply without the line") # MUST include
if DATE_PROMISE.search(out.get("reply", "")):
failures.append("reply promises a date") # NEVER
return failures
Two cautions keep checks fair. Grade the outcome, not the exact phrasing, or good replies worded differently will fail. And one run proves little: outputs vary from run to run, so Malik runs each emergency case three times and counts it as passed only when all three runs pass. The agent-evals guidance calls this pass^k, the chance that all k trials succeed, and it suits behaviour customers rely on every time.
4.1.5 An LLM judge, calibrated against human labels
One goal is left that no regular expression can grade: would a manager send this reply without editing it? For this you use an LLM-as-judge: a separate model call that reads the tenant's message and the draft, applies a rubric, and returns a verdict.
Malik's first judge prompt was one line, "Rate this reply from 1 to 10", with 7 or more counted as a pass. Anthropic's tips for LLM-based grading ask for a detailed, clear rubric, a specific output (pass or fail, or a short scale), and reasoning before the score, which the guide gets by running the grader with thinking on. Its example graders add a note: it is generally best practice to grade with a different model from the one that wrote the output. The agent-evals guidance adds an "Unknown" option, so the judge is not forced to guess, and one judge per dimension rather than one judge grading everything. In Malik's rewrite, each FAIL condition names something a manager could point to:
You grade a draft reply to a tenant's maintenance message. Read the message, then the draft. Reason inside <reasoning> tags, then give <verdict>PASS</verdict>, <verdict>FAIL</verdict> or <verdict>UNKNOWN</verdict>.
FAIL if any of these is true: the draft does not address the problem the tenant described; it ignores a second problem in the same message; it needs information it does not ask for (location, photo, access times); it blames the tenant; it states anything about the flat that the message does not support.
UNKNOWN if the message is empty, unreadable or not about the property.
Length and politeness alone are not reasons to pass. Judge only whether a property manager could send it unedited.
A rubric is not enough: a judge is a measuring instrument, and calibration checks it against a reference: people grade a set of outputs with the same rubric, the judge grades the same outputs, and you compare them case by case.
Calibrating the judge before it counts
Odalys and Femi graded 150 drafts independently and agreed on 94% of them; that is the ceiling, because no judge can be expected to agree with the managers more than they agree with each other. Their settled verdicts marked 120 drafts sendable and 30 not. Here is the one-line judge against those labels.
| Judge verdict | Managers: sendable (120) | Managers: not sendable (30) |
|---|---|---|
| PASS | 119 | 22 |
| FAIL | 1 | 8 |
The judge agrees with the managers on 127 of 150 drafts, about 85%. That sounds fine until you notice that a judge passing everything would score 80% here. The number that matters is the catch rate on the failing class: 8 of 30 bad drafts, 27%. With the rubric above, a different model and reasoning first, the judge caught 26 of 30 and agreed on 93% of drafts. Any later change to the judge's model, prompt or rubric sends it back through the same comparison.
In code, the judge is an ordinary Messages API call. Claude Sonnet 5.5 thinks by default, and thinking tokens count toward max_tokens, so the cap leaves room for reasoning plus the verdict. Note the model id, which differs from the drafting model's, and the last line, which never guesses.
import anthropic
client = anthropic.Anthropic()
JUDGE_MODEL = "claude-sonnet-5-5" # DIFFERENT from the model that drafts replies
def judge_sendable(message: str, draft: str) -> str:
response = client.messages.create(
model=JUDGE_MODEL,
max_tokens=16000, # thinking (on by default) counts toward this cap
system=SENDABLE_RUBRIC, # the rubric above
messages=[{"role": "user", "content":
f"<tenant_message>{message}</tenant_message>\n<draft>{draft}</draft>"}],
)
text = next((b.text for b in response.content if b.type == "text"), "")
verdict = text.split("<verdict>")[-1].split("</verdict>")[0].strip().upper()
return verdict if verdict in {"PASS", "FAIL", "UNKNOWN"} else "UNKNOWN" # never guess
4.1.6 Regression tests: the same paper on every change
Malik can now answer the question the trim raised: is this version worse than the last one? A regression test re-runs the eval on every change (to the prompt, the model, the tools or the code around them) and compares the result with the baseline, the scores of the version now in production.
The agent-evals guidance separates two kinds of eval. A capability eval asks what the application cannot yet do well, so it starts with a low pass rate and gives you a hill to climb. A regression eval asks whether it still does what it used to, so it should pass at or near 100%, and any drop means something broke. A capability case that passes reliably moves into the regression suite, as the gas-smell case now has.
The regression gate on every change
Malik later ran the trimmed prompt through the gate as an experiment. The judge's pass rate rose from 86% to 91%, because managers do prefer short replies. Category accuracy held at 96%. But emergency recall fell from 15 of 15 to 12 of 15, and one of the misses was a gas smell mentioned halfway through a long complaint about a neighbour. Averaged together the new version looked better. With a floor per metric it fails, and the report names the three cases that broke.
Two rules make a gate like this trustworthy. Set a floor per metric, and per slice where it matters, so a gain in one place cannot hide a loss in another; for emergencies the floor is every case, every trial. And allow a small, stated margin on the softer metrics, because judge scores move a little between runs even when nothing changed. Run the suite in your CI pipeline, like unit tests.
4.1.7 The exam traps
Each trap produces a number that looks like evidence but measures something other than the goal.
- ✗ Reporting overall accuracy for a rare, critical class. ✓ Report recall on that class, paired with a false-alarm check, because a model that never flags the rare case still scores high accuracy.
- ✗ Trusting an LLM judge because its verdicts look sensible or its raw agreement is high. ✓ Calibrate it against human labels on the same rubric and check its catch rate on the failing class before it counts.
- ✗ Asking a judge to "rate quality from 1 to 10" with the same model that wrote the output. ✓ Use a specific rubric, a pass, fail or unknown verdict, reasoning first, and a different model.
- ✗ Using an LLM judge for something a rule can check. ✓ Grade with code wherever it can decide: it is faster, cheaper and identical on every run.
- ✗ Building the golden set from easy, happy-path cases, or pasting its cases into the prompt as examples. ✓ Mirror real traffic, add edge cases and must-not-trigger cases, and keep the set out of the prompt.
- ✗ Shipping because the average score went up. ✓ Gate on a floor per metric, so a drop in a critical behaviour blocks the release whatever the average does.
4.1.8 Put it together: build an eval that would have caught the gas leak
The exercise builds a small version of Brackenridge's eval, breaks the assistant the way Malik's trim did, and watches the gate catch it.
Failure-mode diagnosis (4.2) starts where a failing case leaves off and finds its cause in the trace. Model tier selection and release planning (5.2) runs the same regression suite before moving to a new model, and prompt revision (6.2) uses it to close a gap the eval exposed.
Key takeaways
- ✓ An eval starts from a stated quality goal, written as specific, measurable, achievable and relevant criteria, each with a metric, a target and a grader.
- ✓ A defensible metric measures the stated goal the same way on every run; for a rare, critical class, use recall plus a false-alarm check, not overall accuracy.
- ✓ A golden set is a fixed, versioned set of realistic, expert-labelled cases with edge cases and balanced must-trigger and must-not-trigger cases, kept out of the prompt.
- ✓ Behavioral checks grade required behaviour with code wherever a rule can decide, and critical cases run several trials because outputs vary between runs.
- ✓ An LLM judge needs a specific rubric, reasoning before its verdict, an unknown option and a different model, and it counts only after calibration against human labels on its catch rate.
- ✓ A regression test re-runs the same eval on every change and gates on a floor per metric, so a better average cannot hide a broken critical behaviour.
Check your understanding
4 questions written for this lesson. Every answer option is explained, including the ones you did not pick. Nothing is stored.
CCDV-F practice questions are being rewritten
The 159 CCDV-F practice questions here were written for the previous exam guide and are tagged to its domains. New questions for the December 7, 2026 guide (v1.1) are being written. Until they are ready, the practice for the new guide is the questions at the end of every lesson, with every answer option explained. The old bank stays open for general practice.