CertPrep
Domain 4 · Lesson 4.1 · 5 min read

Designing Evaluations That Measure the Goal

Exam skillEvaluation Design

Constructing an evaluation that measures a stated quality goal for a Claude application or component, including LLM-as-judge harnesses calibrated against human-labeled data, golden sets, regression tests, and behavioral checks, and selecting defensible metrics.

Build evaluations that measure the stated quality goal: a representative golden set with trusted expected outputs, code-based graders wherever correctness can be checked, LLM judges with specific rubrics calibrated against human labels, behavioral checks for required and forbidden behavior, and metrics that match the cost of each kind of error.

What you need to know

An evaluation turns "it seems better" into a number you can trust. Start from the quality goal, then choose cases, graders and metrics that measure it.

The pieces

PieceWhat it isWatch for
Golden setFixed, representative inputs with trusted expected outputsInclude hard and edge cases and every important segment (language, document type); keep it stable so runs compare
Regression testThe golden set rerun on every prompt, model or code changeAdd every bug you fix as a case
Behavioral checkA test for one required or forbidden behavior ("never promise a refund", "say not found")Run on enough cases to estimate a rate
Code-based graderExact match, schema validation, compile and run tests, final state of a systemCheapest and most reliable; use wherever it applies
LLM judgeA model scoring against a rubricMust be calibrated before you trust it

Calibrating an LLM judge

  1. Write a specific rubric (criteria, scale, examples). "Is this good?" gives flat, useless scores.
  2. Get human labels on a sample; check two people agree first. If they disagree, fix the rubric.
  3. Tune the judge on part of the labels; measure it on held-out labels.
  4. Check agreement per class, not just overall. A judge with 92% agreement that catches only 40% of bad answers is unfit to catch failures.
  5. Control biases: run pairwise comparisons in both orders; never let a model grade its own outputs as the only check.

Defensible metrics

  • One correct label: accuracy against labels, broken down by class.
  • Rare, costly misses (fraud, safety): recall, with precision for alert load; overall accuracy hides misses.
  • Refusals: test both harmful and similar legitimate requests, so over- and under-refusal are both visible.
  • Grounded answers: correctness, citation support, and "not found" on uncovered questions.

In the exam

Items state a quality goal and an evaluation plan, and ask what is missing or which metric is defensible. Look for representative coverage, code graders where possible, calibrated judges, per-class or per-segment reporting, and repeatability. Distractors eyeball three examples, trust an uncalibrated judge, ask the model which version it prefers, or report only overall accuracy.

Check your understanding

Question 1

A judge has never been compared with people. What first?

Show answer

Answer: B. Calibration shows whether its scores can be trusted.

Question 2

Fraud is 2% of transactions and missing it is costly. Which metric leads?

Show answer

Answer: D. With rare, costly positives, accuracy looks high even if every fraud is missed.

Question 3

Generated code rated "excellent" by a judge fails to compile. Which grader first?

Show answer

Answer: A. Use deterministic checks wherever correctness can be checked in code.

Apply it: Evaluate Larkspur's policy assistant

Exercise · about 25 minCase: Larkspur Pharmacy

Pharmacists found that 9% of the policy assistant's answers cite a policy that does not support the claim, and 4% answer questions the policies do not cover. The team wants an evaluation that gates every prompt and model change.

  1. Define the quality goals as measurable statements.
  2. Design the golden set, including its size and case types.
  3. Choose graders for each goal, and calibrate any judge.
  4. Set release thresholds.
    Done when: each goal has cases, a grader and a threshold.
Check your work
Show model answer

1. (a) Answers are correct; (b) every claim cites a passage that supports it; (c) uncovered questions get "not found."

2. About 300 questions from real pharmacist traffic: 220 answered by the policies (with the expected policy and passage), 60 not covered, 20 tricky ones with near-miss policies. Include questions on recently changed policies.

3. (b) A code check that each citation points into a supplied document, plus an LLM judge that checks the cited passage supports the claim; calibrate the judge on 120 pharmacist-labeled answers (two pharmacists label 40 first to check agreement; hold out 40 for testing). (c) Exact check for the "not found" response. (a) The judge with a rubric, calibrated the same way.

4. Unsupported citations under 2%, uncovered-question abstention at least 95%, correctness at least 92%, each measured with the judge's held-out agreement above 90%; any regression of more than 2 points blocks release.

Key termsBiasConfidence calibrationGolden datasetHuman in the loop (HITL)LLM as a judgePrecision and recallRegression testing

Sources