CCAR-P Learning Guide
Domain 4 · Lesson 4.1 · 6 min read

Defining Evaluation Metrics

Exam taskDefine evaluation metrics (accuracy, latency, cost, safety, security)

Turn "it should work well" into measurable success criteria across accuracy, latency, cost, safety and security, define them before building, and read results by category rather than by a single average.

What you need to know

An evaluation can only be as good as the definition of success behind it. "Good summaries" and "fast enough" cannot be tested. The exam expects you to write criteria that are specific, measurable, achievable and relevant, and to write them before building, so they shape the design rather than excuse it.

Five families of metrics

FamilyExample metricsTypical measurement
Accuracy and qualityField-level exact match, classification accuracy, faithfulness to source, completeness against a checklistCode checks against labels; rubric graded by a model; human review samples
Latency95th-percentile total time, time to first tokenMeasured under realistic load
CostCost per request, per successful task, per resolved caseToken usage multiplied by price, per route
SafetyCount of prohibited actions or content, harmful-output rate, correct refusalsCode checks where binary; graded review where judgment is needed
SecurityData leakage across users, injection success rate, unauthorized tool callsAdversarial test cases with code checks

Writing a good criterion

A usable criterion names the metric, the target, the population and the measurement method:

  • Weak: "The assistant should be accurate."
  • Strong: "At least 95% of extracted claim amounts exactly match the source document, measured on the 400-claim test set, with no category below 90%."

Some criteria are thresholds (must be met to ship), some are guardrails (must not get worse), and some are zero-tolerance (any occurrence fails): "no claim is ever denied automatically", "no customer ever sees another customer's data". Zero-tolerance criteria are usually checked with code, not with judgment.

Read results by slice

Averages hide regressions. Report results for each category of input (normal, edge cases, adversarial, each product line or language) as well as overall. A change that lifts common cases a little and breaks a rare but important case badly can still raise the average.

SliceBeforeAfter
Routine requests (80% of traffic)92%95%
Requests mentioning a legal dispute (5%)88%61%
Overall91%91%

The overall number is unchanged; the change is a regression on the slice that matters most.

Connect technical metrics to business ones

Every technical metric should map to something the business recognizes: task success to resolved cases, 95th-percentile latency to customer waiting time, override rate to staff workload, cost per success to operating cost. Reporting only token savings, without the business effect, invites the wrong decision.

In the exam

Metric questions ask which criterion is well formed, which measurement fits a requirement, or whether a result justifies a release. Strong answers are specific and measurable, include the measurement method, use code checks for binary safety and security rules, measure latency at a high percentile, express cost per successful outcome, and look at category-level results.

Check your understanding

Question 1

Which success criterion is best formed?

Show answer

Answer: D. A good criterion names the metric, the target and how it is measured. The others cannot be tested.

Question 2

After a prompt change, overall accuracy rose from 90% to 91%, but accuracy on requests involving minors fell from 94% to 78%. What should happen?

Show answer

Answer: C. Category-level regressions on sensitive slices are hidden by averages. The change fails its guardrail and should not ship until the slice is fixed.

Question 3 · select 2

Which TWO requirements are best verified with code checks rather than a model judge?

Show answer

Answer: A, C. Binary rules and formats are deterministic and cheaply checked in code. Tone and capturing the main concern need interpretation.

Apply it: Define success for Corvane's assistant

Exercise · about 15 minCase: Corvane Home

Before Corvane builds the routing design, the support director asks you to define what success means. Write success criteria the team can test.

  1. Write one criterion for each family: accuracy, latency, cost, safety and security.
    Done when: each names a metric, a target and a measurement method.
  2. Mark each one as a ship threshold, a guardrail or zero-tolerance.
  3. Name the slices you will report separately, and say why.
  4. Map two metrics to business outcomes the Finance partner and the support director care about.
Check your work
Show model answer

1 and 2. Criteria

FamilyCriterionType
AccuracyAt least 95% of order-status answers match the order system exactly, and at least 90% of product answers are graded correct and cited to the right manual on a 400-question setThreshold
LatencyChat 95th percentile under 3 seconds at peak-season load; first words under 1 secondThreshold
CostUnder $0.12 per resolved in-scope contact, including escalationsThreshold
SafetyNo refund promised outside policy; no card numbers in any model input or outputZero-tolerance
SecurityZero cross-customer data in 200 adversarial tests (other people's order numbers, injected instructions)Zero-tolerance

3. Slices. Each contact type (order status, product, returns); chat and email; peak-season traffic; and adversarial cases. Returns and adversarial slices matter most because errors cost money or expose data, and they are a small share of traffic that an average would hide.

4. Business mapping. Cost per resolved contact maps to support operating cost (Finance). Resolution rate and escalation rate map to first-contact resolution and agent workload (support director); CSAT on assistant-handled contacts is reported alongside.

Sources

Go hands-on optional, needs a Claude API key

Runnable notebooks from Anthropic's Claude Cookbook that build the patterns in this lesson.