An evaluation metric is a decision in disguise. Before you write a single test case you are deciding what “working” means, how you will observe it, and what number is good enough to ship. At the Professional level the question is not what accuracy is, but whether you can name the dimensions that matter for a use case, pick a measurement method for each, and defend a threshold a stakeholder could sign off on. Lesson 3.2 covers the datasets these metrics run on and Lesson 3.3 covers using them to compare versions.
Anthropic’s guidance starts from success criteria, not from tooling. Good criteria are specific (“accurate sentiment classification” rather than “good performance”), measurable (quantitative metrics or well-defined qualitative scales), achievable (grounded in prior experiments and not beyond what current frontier models can do) and relevant to the application’s purpose. The same docs stress that most use cases need multidimensional evaluation: a single number will hide the trade-offs you actually have to manage.
The five metric families
Treat the five families as rows in a metric specification; each needs its own method and threshold.
- Accuracy (task fidelity). How well the output does the job, including rare inputs. Anthropic’s docs distinguish task-specific metrics (F1, ROUGE-L) from generic ones (accuracy, precision, recall). Pick the metric whose failure mode matches the business failure mode: a triage classifier that must never miss a fraud report cares about recall on that class, not overall accuracy.
- Latency. Distinguish time to first token (what a streaming user feels) from total response time (what a pipeline feels). Report percentiles, not means; the docs’ own example criterion is a percentile (95% of responses under a stated time).
- Cost. Measure cost per completed task, built from the token counts in each response’s
usageobject plus retries and escalations. Cost per token rewards a cheap configuration that fails often. - Safety. Harmful or policy-violating output, and also the opposite failure of refusing legitimate requests. Even “hazy” goals can be quantified, for example a maximum share of outputs flagged for toxicity across a stated number of trials.
- Security. Resistance to jailbreaks and to direct and indirect prompt injection, and whether a successful injection can reach sensitive data or actions. Anthropic recommends red-teaming your own workflow with documents, emails and tool outputs that deliberately contain injection attempts, which yields a measurable attack success rate. Guardrail design is Lesson 4.1.
Key concept: a metric is four things, not one
A usable metric specifies what is measured (a behaviour tied to a success criterion), how it is graded (code, model or human), a threshold (what counts as good enough) and a consequence (block the release, page someone, or just track it). If any of the four is missing, the metric will be argued about after the fact instead of deciding anything.
Choosing the grader: code, model or human
Anthropic’s eval guidance is to automate wherever you can and to structure the task so automated grading is possible, and that volume beats hand-graded quality: more questions with slightly noisier automated grading are better than a few beautifully hand-graded ones. Its agent-evals write-up frames the three grader types by their trade-offs.
| Grader | Strengths | Weaknesses | Use for |
|---|---|---|---|
| Code-graded (exact match, regex, schema or state checks) | Fast, cheap, objective, reproducible, easy to debug | Brittle to valid variation; no nuance | Labels, extracted fields, format validity, latency, cost, final state |
| Model-graded (LLM-as-judge, Likert, binary or ordinal rubric) | Flexible, scales, handles open-ended output | Non-deterministic, costs tokens, needs calibration | Tone, empathy, faithfulness to a source, whether instructions were followed |
| Human | Gold-standard judgement | Slow, expensive, needs expert access | Calibrating the judge, new failure modes, high-stakes samples |
The docs list concrete methods: exact match for categorical answers, embedding cosine similarity for consistency across paraphrased inputs, ROUGE-L for overlap with a reference summary, and LLM-based Likert, binary and ordinal scales for qualities such as empathy or context use. Three practices make model grading trustworthy: use a different model as judge than the one that produced the output; write a structured rubric and grade each dimension with its own isolated judge call; and give the judge a way out (return “unknown” when evidence is insufficient), then calibrate against human graders on a sample.
Also grade what the system produced, not the path it took: agents find valid routes the eval author did not anticipate, so rigid step checks penalise correct behaviour. Where an outcome is partly right, build in partial credit.
Common exam distractor
Two answers look sophisticated and are wrong. The first is a public benchmark score or a single headline accuracy figure offered as evidence that your system is fit for your task; generic benchmarks do not mirror your task distribution or your edge cases. The second is an LLM judge from the same model family as the generator, with no fixed rubric and no human calibration. The correct direction is task-specific evals, a fixed rubric, a different judge model, and a human-labelled sample to check the judge.
Thresholds tied to success criteria
A threshold is legitimate only if it traces to something a stakeholder cares about. Anthropic’s docs model this with a multidimensional criterion for a sentiment classifier: an F1 floor on a held-out set, a minimum share of non-toxic outputs, a share of errors that must be low-severity, and a percentile latency bound. Treat the figures as an illustration of the shape of a criterion, not as targets. Note the third item: it weights errors by severity, and admits that “inconvenience” and “egregious” must be defined. A 95% score is meaningless if the failing 5% are the ones that trigger a refund or a compliance report.
- Separate gate metrics (must pass to release), guardrail metrics (must not regress while you optimise something else, Lesson 3.3) and diagnostic metrics (debugging aids that never block).
- Set thresholds from consequences: what does one false negative cost compared with one false positive?
- For agents, distinguish pass@k (succeeds at least once in k tries) from pass^k (succeeds on every try). An agent that must behave reliably on every conversation should be held to the stricter second reading.
- Validate the metric itself: read transcripts to confirm low scores reflect real failures, since ambiguous task specs or grader bugs can depress scores for reasons unrelated to model capability.
- Tie cost and latency to the SLO you promised (Lessons 1.3 and 2.6).
Worked example: a contract-clause extraction assistant
Claude extracts termination dates and liability caps from vendor contracts and drafts a two-sentence risk note. Accuracy: code-graded exact match on normalised dates and amounts against attorney labels, per field, with recall on liability caps as the gate because a missed cap is costly. Faithfulness of the note: model-graded binary rubric (every claim supported by the clause text, “unknown” allowed), calibrated on a human-reviewed sample. Latency: a percentile of end-to-end time. Cost: tokens per contract including retries. Security: the rate at which an instruction injected into a contract PDF changes the output. Each metric maps to a stated criterion and states the consequence of a miss.