In short.
This Anthropic guide helps developers turn language-model requirements into measurable tests, but its sample code needs changes before the scores can support decisions. It connects application goals to representative inputs, edge cases and grading methods, including exact matching, embedding similarity, ROUGE-L and model-based judgments. Its practical value is the range of worked examples; its main weaknesses include self-comparisons in consistency scores, automatic privacy passes for some inputs and incomplete context supplied to a grader. The examples are partial, provide no measured results and were not executed.
Researched and written by an AI model and checked by a second AI model. How it works
Coverage includes the complete selected page at [https://platform.claude.com/docs/en/test-and-evaluate/develop-tests.md], including prose, code in seven languages, tips and outbound references. Linked documentation, cookbook pages, SDK packages, embedding-model repositories and other external materials are excluded. No explicit reuse license appears in the supplied page. Installation, API behavior, model availability, scoring reliability, performance and costs were not tested.
The overview
identity
Define success criteria and build evaluations is an Anthropic documentation guide about evaluating applications built with large language models. Its original source address is [https://platform.claude.com/docs/en/test-and-evaluate/develop-tests.md], and its metadata identifies the documentation URL as [https://platform.claude.com/docs/en/test-and-evaluate/develop-tests].
The resource is an instructional page with example code. It does not supply a complete evaluation service, packaged test runner or downloadable benchmark dataset.
assessment
The guide is useful for moving from a vague goal such as producing good answers to separate, measurable requirements for accuracy, consistency, tone, privacy and response time. It also shows why ordinary inputs alone are insufficient, using sarcasm, typos, ambiguous questions and topic changes as examples.
Treat the code as teaching material requiring review and adaptation. Several scoring shortcuts can conceal failures, and the page supplies no execution results, grader calibration results or evidence that its examples predict performance in a particular application.
users
Beginners can use the conceptual sections to understand evaluations: collections of inputs and scoring rules used to measure application behavior. A rubric is a written rule for judging an answer, while a held-out test set contains cases reserved for assessment rather than prompt refinement.
Developers building classifiers, FAQ assistants, summarizers, customer-service tools or conversational applications get concrete starting patterns. The examples span Python, TypeScript, C#, Go, Java, PHP and Ruby. Readers seeking a complete installation guide or a validated privacy assessment will need additional material.
capabilities
The page teaches how to define specific, measurable, achievable and relevant success criteria, then evaluate several dimensions together. It discusses task performance, consistency, relevance, tone, privacy, context use, latency and price.
Worked examples cover sentiment-label accuracy, FAQ response similarity, summary overlap, tone ratings, health-information disclosure checks and conversation-context ratings. A further example uses a rubric to produce correct-or-incorrect judgments. Latency and price are discussed as criteria, but the page does not implement measurements for them.
Using it
requirements
Applying the guide requires a defined task, representative inputs and appropriate reference answers or grading rubrics. Some examples require human labels, reference summaries or conversation histories. The advertised collections of hundreds or thousands of cases are not supplied in full.
Executing the examples would require a suitable language environment, the relevant Anthropic SDK, an authenticated API client and access to the requested model. Similarity examples also use embedding libraries and model files; Python summary scoring uses the rouge package. Package versions, complete imports, runtime requirements and hardware needs are not established.
mechanism
The basic pattern is to generate an answer for each test input, apply a scoring method and aggregate the results. Exact matching checks whether a response equals the expected label after normalization. Cosine similarity compares embeddings, which represent responses as numeric vectors. ROUGE-L scores shared words appearing in the same order in a generated summary and a reference.
For subjective judgments, another model call receives the response and grading instructions, then returns a numeric rating or binary decision. The examples average scores or count passing cases. These measurements answer different questions; similarity, factual correctness and appropriate tone are not interchangeable.
setup
Start by specifying the behavior that matters to users and how it will be scored. Build cases reflecting real inputs, including difficult and ambiguous examples, and reserve a held-out set for final assessment. Choose a grading method that matches the criterion rather than applying one score to every task.
To adapt the code, replace abbreviated datasets and placeholder text, configure the API client, install the required dependencies and confirm model access. The snippets omit parts of the surrounding program, and the page does not provide a complete installation or authentication sequence. No setup was performed.
example
The sentiment example asks Claude to return only positive, negative, neutral or mixed. It compares each response with a human-provided label and calculates the fraction matching. The four displayed cases include sarcasm and mixed sentiment; a comment stands in for the remaining 996 cases.
Separately, the guide illustrates a success target of F1 at least 0.85 on 10,000 held-out posts, alongside toxicity, error-severity and latency targets. These are example requirements, not achieved results. The exact-match snippet calculates accuracy, so it does not directly measure that F1 target.
Assessment & evidence
limitations
The FAQ consistency code averages comparisons between every pair of responses, including each response compared with itself. Those self-comparisons can inflate the average; they leave it unchanged when all pairwise similarities are already 1. The stored reference answer is unused, so consistently incorrect answers can still receive a high similarity score.
The privacy grader automatically passes outputs whenever the input is marked as containing no protected health information. It therefore cannot detect disclosure generated in those cases. Its aggregate score does not establish privacy protection or healthcare compliance.
The context grader receives the earlier conversation but omits the final user question. That limits its ability to judge whether the answer uses history appropriately for the current request. Model-graded examples also use the same model identifier for generation and grading, despite comments recommending different models.
ROUGE-L measures wording overlap and does not establish factual accuracy or coherence. Numeric grading examples generally define only the endpoints of their scales and do not consistently enforce the permitted range. The page provides neither complete datasets nor measured evidence of grader reliability.
reasoning
The guide's strongest reasoning connects a user need to an observable outcome, then chooses a scoring method suited to that outcome. Exact matching can answer whether a classifier returned the required label. A tone rubric addresses a different question that a literal string comparison would miss.
The code also demonstrates why a plausible metric needs scrutiny: agreement between answers does not prove correctness, and an unchecked output cannot establish privacy preservation. These conclusions follow from the displayed comparisons and conditional branches; they are not measured failure rates.
The page recommends testing model graders for reliability before scaling. It also recommends graders that reason before scoring, but the shown API calls do not explicitly enable thinking or provide results demonstrating its effect.
alternatives
The alternatives explained within the page are code-based, human and model-based grading. Code checks suit clear rules and categorical answers. Human assessment can handle nuanced judgments but requires reviewer time. Model grading offers automation for more subjective criteria, with reliability that must be established for the task.
The guide favors larger automated evaluations over smaller manually graded sets, but supplies no comparative study establishing that tradeoff for every application. Its linked cookbook and other external resources are outside the selected page and were not assessed.
evidence
The evidence consists of the complete selected documentation page, including its criteria, explanations, illustrative datasets and multilingual code. It supports descriptions of the proposed methods and observations about the displayed code. It supplies no completed evaluation outputs, measured performance comparisons or full test collections.
The source snapshot was captured at 2026-11-23T13:22:55.687Z. No code, API request or model download was executed.
Access & freshness
costs
The page provides no API prices or evaluation budgets, so monetary cost is unknown. Cost would depend on the available model, input and output lengths, test volume and number of grading calls. The examples set output-token limits, but those limits do not establish actual token use.
Exact-match and summary-overlap examples make one generation call per input. Tone, context and general rubric examples add a grading call for each generated answer. The privacy example adds grading calls only for inputs flagged as containing health information. Embedding dependencies and dataset preparation add resource needs, but their costs are not quantified.
rights
The supplied page contains no explicit license or redistribution permission for its prose, illustrations or code snippets. Rights to redistribute those materials are therefore unknown.
The page references third-party libraries and embedding models, but their licenses and usage terms are not included. Those references do not establish permission to redistribute their files.
freshness
The capture date establishes when this source snapshot was acquired, not when the guide was published or last maintained. The supplied page does not establish those dates.
The snippets request claude-opus-5-5 or corresponding SDK constants. Current model availability, SDK compatibility and dependency behavior are unknown; the presence of those identifiers in documentation does not establish that the examples will execute.
actions
Use the criteria sections to define a small set of outcomes tied to your application's users. Build representative cases with explicit expected answers or rubrics, include edge cases and retain a held-out set. Match each outcome to a suitable metric and keep its meaning visible when interpreting the score.
Before relying on the examples, remove self-comparisons from FAQ consistency scoring and assess correctness separately. Grade every response for privacy rather than automatically passing some cases. Give the context grader the current question as well as relevant history.
For model grading, define the full rating scale, reject invalid outputs and compare judgments with human assessments before expanding the evaluation. Confirm model access and dependency requirements separately. These are recommended adaptations; their effectiveness and the resource's runtime behavior remain unassessed.
