What you need to know
An evaluation suite is the release gate for everything that changes a Claude system's behavior: prompts, models, tools, retrieval, and agent configuration such as CLAUDE.md, Skills and hooks. A gate is only useful if it detects real regressions, ignores noise, and stays representative of production as both the system and the traffic change.
What goes in the suite
| Component | Purpose |
|---|---|
| Golden set | Real inputs from the target workload with accepted outputs; start with 20 to 50 and grow |
| Regression cases | Every production incident becomes a case, kept permanently |
| Edge and adversarial cases | Hard inputs, unusual formats, languages, policy boundaries |
| Behavioral checks | Verify outcomes and side effects: the query returns the right data, the agent did not modify a read-only table, no sensitive field reached the logs |
Behavioral checks test what the output does, not how it is worded. Keyword checks and exact string matches are weak proxies that fail correct answers and pass wrong ones.
Metrics by task type
| Task | Metrics |
|---|---|
| Extraction | Field-level accuracy against verified values; schema validity |
| Retrieval-grounded answers | Retrieval recall and precision; groundedness (claims supported by provided passages) |
| Agentic tasks | Task success by outcome checks; side effects within scope; cost and turns |
| Generation | Rubric-based scores from calibrated judges (lesson 5.2) |
Fluency can rise while groundedness falls, so a fluency score cannot stand in for grounding.
Gates that are stable and sensitive
- Repeated trials: agent outputs vary between runs. Run each case several times and gate on pass rates; when a gate's verdict changes on rerun, it is measuring noise. Engineers rerunning until green is a sign the gate needs trials, not removal.
- Per-category results: gate on each category's floor, not only the overall score, so a regression in refunds cannot hide behind an improvement elsewhere.
- Paired comparison: compare versions on the same cases with repeated trials and check whether the difference exceeds the observed variance before calling 89% better than 87%.
- Isolation of the checks: an agent under evaluation must not be able to change what grades it. Run checks from a copy made before the agent runs, and fail any run that changes files outside its allowed paths.
Release criteria
For a model or prompt change: no category below its quality floor, and cost and latency within stated budgets. An overall gain can hide a category regression; a cheaper price per token can still cost more if outputs grow.
Run the suite on every change to anything that steers the agent, including CLAUDE.md, Skills and hooks, not only code. A trimmed CLAUDE.md that drops a logging rule can pass code review and fail a behavioral check.
Keeping the suite valid
| Threat | Sign | Remedy |
|---|---|---|
| Saturation | Every release scores 98 to 100% while production escalations rise | Add recent production failures and harder cases |
| Contamination | Cases copied from public sources may be in training data | Use private, production-derived cases |
| Coverage gaps | 30% of traffic is Spanish and Portuguese, the suite is English only | Cases sampled from real traffic in each segment, results reported per segment |
| Stale labels | Requirements changed, golden answers did not | An owner per golden set, reviews on requirement changes, versioned sets |
In the exam
Evaluation-design items describe a suite or gate and a symptom: flaky verdicts, a regression that passed, saturated scores, a suite that misses a language, an agent that gamed its checks. Choose the change that makes the gate measure the real property reliably. Distractors raise thresholds on saturated suites, remove gates, allow unlimited reruns, check keywords, or let the model write its own labels.
Check your understanding
A 400-case suite has scored 98 to 100% for six months while production escalations doubled. What is the problem?
Show answer
Answer: B. A suite every release passes cannot detect what users experience. Refresh it from production.
Engineers rerun a failed evaluation job until it passes. What should the team change?
Show answer
Answer: D. Repeated trials make the verdict stable; rerunning until green turns the gate into a formality.
An agent passed its evaluation by editing the check script. Which change protects the suite?
Show answer
Answer: A. The agent must not be able to change what grades it; obscurity and prompts are not controls.
Apply it: Build Granite's release gate
Model Risk Management requires documented evaluation before any model or prompt change to Granite's customer assistant. Today the team runs 60 hand-picked English questions once and eyeballs the answers. 18% of customers use Spanish. The last snapshot upgrade raised cost per conversation by a quarter without anyone noticing.
- Design the suite's composition, with sources for each part.
- Define the release criteria.
- Make the gate stable, and say how you will tell a real difference from noise.
- Describe how the suite stays valid over the next year.
Show model answer
1. Composition
| Part | Size | Source |
|---|---|---|
| Golden set | 400 cases | Sampled production conversations by intent (balances, transfers, fees, disputes), 18% Spanish, with banker-approved answers |
| Regression cases | Grows | Every incident and every escalation confirmed as an agent error |
| Policy cases | 80 | Transfers over $5,000 (step-up required), third-party transfer requests (must refuse), fee waivers |
| Behavioral checks | Per case | The transfer tool was called with the right accounts; no third-party transfer attempted; no account number in the reply text |
2. Release criteria. Each intent and each language meets its floor (for example, 95% on transfers, 97% on policy cases); no policy case regresses; cost per conversation and p95 time to first token within 10% of the current release.
3. Stability. Five trials per case; gate on pass rates. New and current versions run on the same cases in the same run; a difference counts only if it exceeds the spread seen when the current version is run against itself.
4. Validity. Monthly refresh with new production cases and failures; owners for each intent set who review when products or fees change; versioned sets recorded with each result; cases from public sources excluded.