Claude Certification Guides
CCAR-P/Domain 410 min read

Lesson 4.1

Designing Evaluations

How to build an evaluation that can actually decide a question, from sourcing representative cases and choosing metrics to handling non-determinism and keeping the eval honest over time.

Every other decision in this certification, from model choice to prompt wording to effort settings, is supposed to be made "against the evals". That presumes the evals exist and can be trusted. Building one is a design task in its own right, and the professional exam treats a weak eval as a worse outcome than no eval, because it manufactures false confidence.

Anatomy of an eval

ComponentWhat it isCommon failure
DatasetInputs with expected outputs, references or rubricsUnrepresentative, too small, stale
Task runnerCode that executes the system under test on each caseTests a prompt in isolation rather than the real pipeline
GraderDecides whether an output is acceptableMeasures the wrong thing; see the graders lesson
MetricsAggregates grader resultsA single average hides the failing segment
ThresholdThe bar for a passSet after seeing results, so it always passes

Run the eval against the system as deployed: the same prompt assembly, retrieval, tools and model configuration. An eval of the prompt alone will not catch a retrieval regression.

Sourcing cases

Representativeness beats volume. Draw from:

  • Production traffic, sampled across routes, tenants, languages and time, with sensitive data handled under the same rules as logs.
  • Known failures, every incident becomes a case.
  • Edge cases and adversarial inputs: empty documents, contradictory instructions, injection attempts, inputs at the context limit.
  • Synthetic cases generated by a model to fill gaps, reviewed by humans before inclusion, and labelled as synthetic so their share can be tracked.

Label quality matters more than label quantity. Two reviewers on a sample, with disagreement measured and resolved, is the minimum for cases that will gate releases.

Choosing metrics

Match the metric to the decision:

  • Accuracy or pass rate for classification and extraction.
  • Field-level precision and recall for structured extraction, so one wrong field does not hide behind nine right ones.
  • Rubric score for open-ended generation, graded item by item.
  • Task success for agents: did the end state meet the specification?
  • Operational metrics alongside quality: tokens, cost per case, latency, number of turns.

Report by segment, not only overall. A 94% average with 60% on one document type is a failing system for that document type.

Non-determinism

Model outputs vary between runs even at identical settings. A single run can flip a borderline case and masquerade as a regression or an improvement. Run each case several times and report the distribution. Two useful aggregates: pass@k, the chance that at least one of k attempts passes, which matters when a human picks the best of several drafts, and pass^k, the chance that all k attempts pass, which matters when the system must be right every time with no human filter. Production systems without a human in the loop should be judged on pass^k.

Keeping the eval honest

  • Hold out a test split. If you tune prompts against the whole set, you overfit to it. Iterate against a training split, check a validation split, and report the test split only.
  • Watch for saturation. When everything passes, the eval has stopped discriminating. Add harder cases or retire it as a smoke test.
  • Watch for contamination. Cases copied into the prompt as examples are no longer tests.
  • Version the dataset. Every change to cases or labels is a change to the yardstick; record it alongside results.
  • Audit periodically. Re-sample production to check the eval still reflects reality.

Cost and cadence

Evals cost tokens. Use the Message Batches API for full runs; it halves the cost and parallelises. Share cached prefixes where cases use the same system prompt. Keep a small fast suite for every change and a full suite for releases and model migrations. Track eval spend as a line item; an eval nobody can afford to run will not be run.

A minimal case format

{
  "id": "claims-0412",
  "segment": "handwritten-form",
  "input": {"document_file_id": "file_...", "instructions": "..."},
  "expected": {"claim_amount": 1240.50, "currency": "EUR"},
  "grader": "field_match",
  "source": "production-2026-02",
  "notes": "Amount written with comma decimal separator"
}

Fields for segment, source and notes are what make the dataset maintainable a year later.

Exam focus

  • An eval has a dataset, runner, grader, metrics and threshold; it must exercise the deployed pipeline, not an isolated prompt.
  • Source cases from production, incidents, adversarial inputs and reviewed synthetic data; label quality outranks quantity.
  • Report metrics by segment; use field-level measures for extraction and task success for agents.
  • Handle non-determinism with repeated runs; pass^k is the right standard for unsupervised production systems.
  • Hold out a test split, watch for saturation and contamination, and version the dataset.
  • Run full suites through Batches to control cost; keep a fast subset for every change.

Check yourself

5 questions

  1. 1.A customer-service company is about to build a Claude assistant for returns and refunds. The product owner wants to start prompt engineering immediately and 'write the evals later once we know what good looks like'. What should the architect recommend FIRST?

  2. 2.A team reports 97% on their eval set after three weeks of prompt tuning, but production quality has not improved and users report new failure types. Reviewing their process, the architect finds that every prompt change was tested against the entire eval set, which has not changed since week one. What is the MOST likely problem?

  3. 3.A team is assembling the first evaluation set for an email-triage assistant. Which composition is MOST appropriate?

  4. 4.An architect is designing the evaluation strategy for a contract-analysis product. They propose two separate suites: one that measures how well the system handles new, difficult contract types the team is actively trying to improve, and one that must stay at or near 100% and runs on every change. A stakeholder asks why two suites are needed. Which explanation is CORRECT?

  5. 5.A team compares two prompts on a 60-item eval set. Prompt A scores 48/60 and prompt B scores 51/60 on a single run. The team declares B the winner and ships it. What is the MOST important weakness in this conclusion?