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
| Piece | What it is | Watch for |
|---|---|---|
| Golden set | Fixed, representative inputs with trusted expected outputs | Include hard and edge cases and every important segment (language, document type); keep it stable so runs compare |
| Regression test | The golden set rerun on every prompt, model or code change | Add every bug you fix as a case |
| Behavioral check | A test for one required or forbidden behavior ("never promise a refund", "say not found") | Run on enough cases to estimate a rate |
| Code-based grader | Exact match, schema validation, compile and run tests, final state of a system | Cheapest and most reliable; use wherever it applies |
| LLM judge | A model scoring against a rubric | Must be calibrated before you trust it |
Calibrating an LLM judge
- Write a specific rubric (criteria, scale, examples). "Is this good?" gives flat, useless scores.
- Get human labels on a sample; check two people agree first. If they disagree, fix the rubric.
- Tune the judge on part of the labels; measure it on held-out labels.
- Check agreement per class, not just overall. A judge with 92% agreement that catches only 40% of bad answers is unfit to catch failures.
- 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
A judge has never been compared with people. What first?
Show answer
Answer: B. Calibration shows whether its scores can be trusted.
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.
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
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.
- Define the quality goals as measurable statements.
- Design the golden set, including its size and case types.
- Choose graders for each goal, and calibrate any judge.
- Set release thresholds.
Done when: each goal has cases, a grader and a threshold.
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.