CertPrep
Domain 5 · Lesson 5.1 · 7 min read

Designing Evaluation Systems

Exam skillEvaluation System Design

Evaluating and designing offline evaluation systems for Claude applications, including golden sets, regression suites, behavioral checks, CI/CD evaluation gates, retrieval precision and groundedness metrics, and release criteria for prompt, model, and agent changes, and maintaining suite validity over time against contamination, saturation, and coverage gaps.

Build offline evaluation that gates releases, from golden sets, regression suites and behavioral checks to stable CI gates and release criteria for prompt, model and agent changes, and keep the suite valid against contamination, saturation and coverage gaps.

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

ComponentPurpose
Golden setReal inputs from the target workload with accepted outputs; start with 20 to 50 and grow
Regression casesEvery production incident becomes a case, kept permanently
Edge and adversarial casesHard inputs, unusual formats, languages, policy boundaries
Behavioral checksVerify 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

TaskMetrics
ExtractionField-level accuracy against verified values; schema validity
Retrieval-grounded answersRetrieval recall and precision; groundedness (claims supported by provided passages)
Agentic tasksTask success by outcome checks; side effects within scope; cost and turns
GenerationRubric-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

ThreatSignRemedy
SaturationEvery release scores 98 to 100% while production escalations riseAdd recent production failures and harder cases
ContaminationCases copied from public sources may be in training dataUse private, production-derived cases
Coverage gaps30% of traffic is Spanish and Portuguese, the suite is English onlyCases sampled from real traffic in each segment, results reported per segment
Stale labelsRequirements changed, golden answers did notAn 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

Question 1

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.

Question 2

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.

Question 3

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

Exercise · about 30 minCase: Granite Federal Bank

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.

  1. Design the suite's composition, with sources for each part.
  2. Define the release criteria.
  3. Make the gate stable, and say how you will tell a real difference from noise.
  4. Describe how the suite stays valid over the next year.
Check your work
Show model answer

1. Composition

PartSizeSource
Golden set400 casesSampled production conversations by intent (balances, transfers, fees, disputes), 18% Spanish, with banker-approved answers
Regression casesGrowsEvery incident and every escalation confirmed as an agent error
Policy cases80Transfers over $5,000 (step-up required), third-party transfer requests (must refuse), fee waivers
Behavioral checksPer caseThe 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.

Key termsEvaluation (eval)Golden dataset

Sources