Building a Repeatable Test Set for Production Agent Evaluation
Five dimensions turn agent testing into a release gate that catches failures before production.

A repeatable test set for production agent evaluation must measure more than whether an agent reaches the right answer. It must cover functional correctness, safety, latency and cost, robustness, and business KPI alignment. Building around these five dimensions turns evaluation into a deployment gate, with evidence that can be compared across releases.
Why agents that pass internal testing fail in production
An agent that issues a duplicate refund has failed even if its final response correctly says that the customer was refunded. A test that checks only that response can miss the duplicate transaction. The defect is in the evaluation boundary. Agents are non-deterministic, multi-step systems that use tools, so their behavior cannot be reduced to an expected answer for a given input. Production exposes the actions that a happy-path suite leaves unexamined.
The same gap allows a “scrappy win” to count as success when an agent guesses tool parameters or makes redundant API calls before reaching the right result. Public benchmarks cannot establish whether those actions respect an organization’s schemas, tools, or compliance rules. Internal testing must supply that evidence. NIST launched the AI Agent Standards Initiative in February 2026 to support confident adoption and secure operation of agents capable of autonomous actions, reinforcing the need for a more demanding definition of tested behavior.
The five dimensions that production actually tests agents on
Functional correctness covers both the outcome and the trajectory. Two agents can reach the same answer in four steps and nineteen steps, but the longer path introduces redundant API cost, audit exposure, and latency risk. Reference trajectories establish required sequences, while constraints accommodate multiple valid routes. A rule such as “must call verify_identity before any account change” tests an obligation without prescribing every step. Repeated runs then show whether the agent succeeds each time or only now and then.
Safety asks a different question from correctness. An action can do what was asked and still break policy, so prohibited actions need hard blocks that a good score elsewhere cannot cancel out. Latency and cost add limits on token consumption, tool calls, loops, and cost per resolution against a baseline. Robustness tests what happens when conditions deteriorate, including whether the agent retries intelligently, escalates, or stops safely after a tool error. Component-level evaluation separates failures in planning, retrieval, tool execution, and output formatting so that diagnosis can lead to a targeted fix.
Business KPI alignment establishes whether a technically successful task serves the intended purpose. It depends on the applicable metric definition, the authoritative data source, and the policy governing access. Execution rules cannot supply that meaning by themselves. Tests therefore need real business questions and expected answers grounded in trusted dashboards, SQL patterns, and workflow exceptions. Together, these dimensions distinguish a correct answer from an acceptable production result.
What goes into the test set: selecting and sourcing cases across all five dimensions
Cases should be chosen first for the failure modes they cover, with the number of prompts a lower priority. Roughly fifty to one hundred well-chosen cases can reveal early problems in testing and provide a diagnostic starting point, with production readiness still to be established. As the agent matures, the suite can grow toward fifty to five hundred tasks that reflect each use case. More variants of an easy task do not close an untested safety boundary. Each case needs to contribute evidence about behavior that the suite would otherwise miss.
Real business questions provide the foundation, while bug reports and support queues supply exceptions that the team did not anticipate. Checks done by hand before release and red-team exercises add known attack patterns. Every production incident should also lead to a case that reproduces it. For trajectory evaluation, cases should specify a reference path when order is mandatory and constraints when several routes are valid.
Context cases should include data sources that disagree, business terms with more than one meaning, and policy boundaries. These probe failures that clean inputs conceal. In regulated environments, however, selecting representative data is itself a governance decision. The suite must account for what data may be used, how audit trails are preserved, and whether Business Associate Agreements cover both the evaluation layer and the agent’s integrations.
How to grade agent behavior: choosing and combining evaluation methods
Programmatic checks provide the strongest evidence when completion changes a database, file, or API state. The grader should verify success by comparing that result with the expected value. For coding agents, the equivalent is running the tests the code is supposed to pass, including existing regression tests. Exact matching helps when values must be exactly the same. Fuzzy matching needs restraint because it can overlook consequential differences in numbers, dates, and identifiers.
Open-ended outputs require rubrics with explicit criteria for correctness, completeness, relevance, and policy adherence. Those rubrics judge acceptable variation without treating one reference answer as the only valid response. Consistency needs its own measure across repeated runs. Pass-k consistency scoring should expose the gap between passing once and passing reliably, rather than let a successful attempt conceal unstable behavior. Manual review can support these methods, but individual spot-checks cannot be the primary grading mechanism for agents handling hundreds or thousands of interactions.
Safety grading must stay binary when it checks for prohibited behavior. No partial credit can compensate for a blocked action occurring. Cost and latency checks can be automated through token counts, tool-call counts, loop flags, and p95 latency measurements against defined thresholds. Combining these methods preserves the distinctions between acceptable wording, correct state changes, reliable execution, and non-negotiable controls.
Embedding the test set into deployment: offline evaluation, CI/CD gates, and staged rollout
Offline evaluation establishes the first stage of the deployment gate. Before any production deployment, the full suite should compare changes to prompts, models, tools, or retrieval against a baseline before they merge. Red-team exercises belong here, before launch. Component-level checks then identify whether a failing case originates in the planner, retrieval, or tool execution.
CI/CD regression gates make that comparison automatic on each change. The core suite should block a release if it falls below the set thresholds, with a gate for each dimension. A composite score can hide a catastrophic regression. Task success may have an allowed margin of change, while safety tests must pass in full. These rules make release decisions repeatable instead of dependent on how convincing a handful of responses appear.
Staged rollout uses those gates based on the risk. A low-risk agent may launch with human review on exceptions, while payment processing or clinical decisions may require near-perfect performance on critical paths and hard blocks on certain actions. Production monitoring then supplies new cases to supplement pre-production testing. The automotive parts manufacturer case shows why evaluation must follow deployment iterations. Its quality agent flagged far more units as suspect than the actual defect rate during its first two iterations, while three iterations of sensor placement were needed before signal quality supported reliable operation.
Versioning the test set so it reflects the production environment it gates
A production baseline should be the version last confirmed good in production. Changes to prompts, models, tools, and retrieval each represent a versioning event. The suite needs its own change log. That record should identify which case was added, why it was added, and which production observation prompted it. Regression cases drawn from incidents must join the suite before the next release so that it keeps testing for known failures.
Business context also changes the meaning of a passing result. When a KPI definition changes, a policy boundary shifts, or a different data source becomes authoritative, the relevant cases must change with it. Otherwise, the suite rewards obsolete behavior. Versioning must cover expected answers and the context that governs them as well as the prompts. It also produces a history that governance and compliance reviews can inspect.
NIST’s AI Risk Management Framework organizes risk management around Govern, Map, Measure, and Manage. The test set serves the Measure layer and needs ownership, review, and maintenance under the governance that owns the agent. Correction must become a system-level capability. Updating the suite after production feedback makes that capability concrete by changing what the next release must demonstrate.
What the test set must look like in regulated verticals
Healthcare evaluation must test access boundaries as well as output quality. EHR processing, compliance, and clinical document understanding each need cases that show whether the agent follows the policy that applies. HIPAA and EU AI Act compliance help set what the platform must do, while SOC 2 gives teams a baseline for checking security controls. Adversarial and edge-case tests must check whether those controls hold when the workflow fails to work as expected.
Contract review cases should include correctly flagged clauses, false positives, and genuinely risky clauses expressed in unusual language. Cases for intake and email-management must also test policy boundaries. Sending an email to the wrong person or misrouting a legal matter has consequences that answer-quality scoring alone cannot capture. Trajectory evaluation matters most when an answer looks correct but rests on hallucinated reasoning that would fail an audit.
Cars24’s reported gains in resolution rates, turnaround time, and seller lead recovery show which outcomes matter for marketplace evaluation. Conversation quality alone is not enough. Revenue recovery and service throughput belong in KPI-alignment tests, while multi-agent systems need realistic combinations of energy pricing, labor availability, and component lead times. The manufacturer’s calibration experience also shows why tests must use the configuration for each deployment iteration.
Using an AI Operations Audit to establish evaluation baselines before building the suite
An AI Operations Audit establishes the inputs that make a suite coherent. Its six-stage assessment inventories workflows and baseline evidence, screens value and risk, examines data and integration, designs evaluation and governance controls, estimates delivery and operating requirements, and ranks the portfolio with a remediation roadmap. These decisions precede meaningful threshold selection. Without them, a team can build precise tests for a workflow whose value, ownership, or data quality remains unresolved.
The LLM Agent Readiness Assessment framework scores readiness for agent substitution across dimensions that include cognitive-execution complexity and governance-compliance intensity. Those factors help determine how demanding safety and compliance cases must be. Organizational readiness extends beyond the task itself. It includes business value, permissions, security, integration, evaluation ownership, and ongoing operating cost. For the suite, the practical questions are whether representative data exists, whether governance can maintain it, and whether integration access supports programmatic outcome checks against live systems.
Connecting test set results to the ROI conversation with business stakeholders
Business stakeholders need evidence of operational outcomes alongside evaluation scores. Completed tasks, active users, time saved per task, and outputs accepted without major changes show how the agent’s behavior holds up in actual use. Financial interpretation requires a further link. Saved minutes should count as cash savings only if they cut paid hours, contractor spending, backlog, or the need to hire. This distinction keeps a credible productivity result from becoming an unsupported financial claim.
Salesforce Agentforce reports human handoff and resolution rates after hundreds of thousands of conversations. IBM AskHR reports containment rates and HR operating expense reduction. ServiceNow reports annual hours saved through AI-powered search and virtual agent capabilities in HR operations. A suite grounded in business questions and operational data can produce evidence in the same terms, while still distinguishing pre-production performance from realized results.
Compliance officers, CIOs, and business sponsors can inspect what was tested, which thresholds applied, and how failures changed later releases. Accountability no longer depends only on confidence in a demonstration. A repeatable test set becomes the organization’s proof that the agent does what the business needs within the conditions under which it is allowed to act.
Notes
- AlphaEval: Evaluating Agents in Production
Informed the argument that production evaluation must use real business questions, authoritative data sources, and KPI-grounded expected answers rather than public benchmarks alone.
- Stop Shipping AI Agents on Faith: Capability Is Not Production Readiness
Supported the case that capability is not production readiness and that multi-dimensional deployment gates with per-dimension thresholds are needed.
Every new piece from Hallucination Report, as it's published.
Follow