Start with the behavior that needs to be tested
A representative test set starts with the operational objective, not with the number of examples. Define which decision or task the system must perform, what an acceptable output looks like, and which errors are serious. For example, ticket triage may require correct classification, no invented data, and appropriate routing of ambiguous requests.
Then describe the expected distribution of inputs. List languages, channels, message lengths, levels of knowledge, file formats, combined intents, and situations in which information is missing. The representation should reflect the variety that the product intends to serve, rather than only the easiest examples to collect. The recommendation to align tests with the real usage distribution is consistent with the evaluation practices presented in source 1.
- Separate criteria for factual correctness, instruction following, formatting, and information security.
- Define in advance what constitutes approval, a serious failure, and an inconclusive result.
- Keep a reserved set for measuring changes, without using it to continually adjust the system.
Sources and references: [1]
Produce synthetic examples without creating a false sense of coverage
Synthetic examples are useful when the original information contains names, documents, contracts, private messages, or internal identifiers. They can preserve the task structure, such as intent, sequence of facts, required fields, and ambiguity, while replacing sensitive values with fictional entities. The goal is not to produce generic text, but plausible variations that retain the relevant difficulty.
A practical approach is to create a schema before writing the text. For each case, record the intent, available facts, missing facts, expected response, rationale for the label, and associated risk. Only then generate variations in vocabulary, punctuation, abbreviations, and the order of information. Compare the variations with the original schema to discard examples that changed the task without making that change explicit.
Do not treat the generator as an authority on the answer key. Synthesis can introduce impossible combinations, incoherent relationships, or an artificially clean distribution. Use validation rules, consistent fictional data, and review by someone who understands the process. When a real deidentified sample is available, use it only within approved controls and compare aggregate patterns, without transferring the original text into the test set.
- Generate families of examples from the same scenario, changing one variable at a time.
- Include negative examples in which the correct response is to ask for clarification or refuse an action.
- Mark the origin of each case, such as synthetic, deidentified, historical, or created by a specialist.
Sources and references: [1]
Treat review as a calibration process
Review should verify two different things: whether the case represents a possible situation and whether the answer key actually corresponds to the company policy or process. One reviewer may assess the scenario logic while another examines the expected output. For simple tasks, an objective rubric may be sufficient. For subjective tasks, record examples of acceptable responses rather than only one ideal sentence.
Turn disagreements into design information. If reviewers disagree about the label, the rule may be vague, the categories may overlap, or an escalation option may be missing. Update the rubric, preserve the disputed case with its rationale, and identify whether it should measure consistency, knowledge, or caution. Source 1 recommends combining metrics with specialist judgment and calibrating automated evaluators against human evaluations.
To reduce bias, vary the order of alternatives, the length of responses, and the apparent identity of fictional entities. In comparisons between two responses, avoid allowing the longer one to appear better merely because it is longer. An automated evaluation can speed up triage, but it should not be used as the only signal when the criterion involves context, intent, or operational risk.
- Write a rubric with observable criteria, approval examples, and failure examples.
- Record the reason for every answer key change and the rule version used during review.
- Use blind review when the identity of the source could influence the judgment.
Sources and references: [1]
Design difficult cases by failure category
Difficult cases are not merely absurd inputs. They are plausible situations that push the system's limits: requests with two intents, truncated text, typing errors, very long context, ambiguous fields, mixed languages, and conflicting instructions. Also include incomplete tool responses, swapped values, repeated calls, and transitions between stages. Each case should state the desired behavior, including when the correct response is not to proceed.
Also consider untrusted data inside the context. A customer comment, imported file, or search result may contain instructions that attempt to change the system's objective. Source 2 recommends constraining free text flows with structured outputs, separating untrusted inputs from privileged instructions, and applying controls to tool calls. For testing, simulate these attempts with fictional data and check whether the system preserves the task contract.
If the solution uses tools or agents, test tool selection, arguments, access limits, and behavior when a tool fails. If there are several stages, evaluate each stage in isolation before evaluating the complete flow. Source 3 recommends starting with the simplest architecture and adding autonomy only when tests show a need, because complexity can increase cost, latency, and accumulated errors.
- Create a matrix crossing input type, intent, risk, and expected response.
- Add injection attacks, but use only fictional entities, accounts, and documents.
- Test repetition, interruption, and termination limits in multistage flows.
Maintain, update, and use the set to make decisions
A test set loses value when it becomes a static collection of familiar examples. Version cases, rubrics, results, and data origins. When a failure appears in a controlled environment, turn the failure pattern into a new case without automatically copying the original conversation. Remove or replace redundant cases, but preserve a historical sample for comparing regressions.
Organize analysis by slices, such as language, channel, intent type, length, tool presence, and level of ambiguity. An overall average can hide the fact that the system works well on short messages and fails on compound requests. Compare versions using the same reserved cases and investigate relevant changes by category, rather than choosing an implementation solely by an aggregate score.
The set should also support scope decisions. If difficult cases reveal that the task depends on explicit rules, prefer a deterministic flow or limited classification. If they reveal a need for open ended decisions, refine tools, structured contracts, and stopping conditions. Evaluation is used to choose the architecture and monitor changes, not merely to produce a final score.
- Define a cadence for incorporating new failure patterns and reviewing older cases.
- Separate development, validation, and final test data to avoid adjusting against the result.
- Report performance by category and highlight failures that could change decisions or trigger tools.
Put it into practice
- Define the task, approval criteria, and types of failure before creating examples.
- Model scenarios with consistent fictional data and record the origin of every case.
- Build a matrix of normal variations, difficult cases, malformed inputs, and injection attempts.
- Review samples and rubrics with specialists, documenting disagreements and changes.
- Version the set, maintain a reserved test set, and analyze results by risk category.
Common questions
Can synthetic examples completely replace real data?
Not always. They better protect information and allow controlled scenario coverage, but they may lose language patterns and distribution characteristics. Compare aggregate characteristics with approved sources without copying sensitive content.
How many cases are needed to get started?
There is no universal number. Start with cases covering each decision, important variation, and high impact failure, then expand the set as disagreements and new usage patterns emerge.
When is it worth using an evaluator based on another model?
Use one for tasks with clear criteria, comparison, or classification, and validate its agreement with specialist evaluations. For subjective or high risk responses, treat the automated evaluator as support, not as the sole authority.
Sources and references
- OpenAI: Evaluation best practices ↗Accessed on November 13, 2026
- OpenAI: Safety in building agents ↗Accessed on November 13, 2026
- Anthropic: Building effective agents ↗Accessed on November 13, 2026



