November 30, 2026
AI Agent Evaluation: How to Test Agents Before Production
AI agent evaluation is the practice of testing an agent against realistic tasks and scoring whether it actually got the job done, reliably, safely and at an acceptable cost. In short: build a small set of real tasks, define what “success” means for each, run every task several times, grade the final outcome (and the path where it matters), and re-run the suite every time you change a model, prompt or tool.
This matters most in regulated, high-stakes work. Picture a healthcare billing team where an agent gathers patient records, checks payer criteria and drafts a prior authorization request. One wrong field is not a typo; it is a denied claim, a delayed treatment or a compliance finding. Gartner has predicted that over 40% of agentic AI projects will be canceled by the end of 2027, citing escalating costs, unclear business value and inadequate risk controls. A working evaluation process is how you answer all three before go-live.
In this guide, we cover what agent evaluation is, what to measure, the three kinds of graders, how to build your first test set, how to score reliability, how to choose tooling, and a checklist you can use this week.
What Is AI Agent Evaluation?
AI agent evaluation is a repeatable test of how well an agent completes multi-step tasks using real tools, scored against success criteria you define in advance. Unlike testing a single model response, you are testing a whole run: the plan, the tool calls, the intermediate decisions and the final result.
Anthropic’s engineering team defines the building blocks clearly: a task is a single test with defined inputs and success criteria, a trial is one attempt at that task, a grader is the logic that scores performance, a transcript is the full record of a trial, and the outcome is the final state of the environment. That last one is the key idea. An agent saying “your appointment is booked” is not the outcome; the booking existing in the database is.
How is evaluation different from observability?
Evaluation tests the agent before and between releases on known tasks; observability records what it does in production on real ones. You need both. Our guide to AI agent observability covers the production side, and the traces it produces are the best source of new test cases.
| Evaluation | Observability | |
|---|---|---|
| When it runs | Before release and on every change | Continuously in production |
| Inputs | A curated task set with known answers | Live, unpredictable user traffic |
| Main question | ”Is this version good enough to ship?" | "What did the agent just do, and why?” |
| Output | Pass/fail scores, regression alerts | Traces, cost, latency, anomalies |
What Should You Measure When Evaluating an AI Agent?
Measure five things together: task success, reliability across repeated runs, tool-use quality, safety and policy compliance, and cost and latency. A single accuracy number hides the trade-offs between them.
Task success: did the agent reach the correct end state? This is the headline metric and should be checked against the real system, not the agent’s own claim.
Reliability: does it succeed every time, or only sometimes? Agents are non-deterministic, so one pass proves little (more on this below).
Tool-use quality: did it call the right tool with the right arguments, in a sensible order, without needless loops? These checks help you diagnose why a run failed.
Safety and policy compliance: did it stay inside the rules, escalate to a human when it should, and refuse what it should refuse? For a claims or KYC workflow this is a pass/fail gate, not a nice-to-have. Our AI agent governance framework explains how to write those rules down.
Cost and latency: tokens, tool calls and time per task. An agent that succeeds at ten times the budget may still fail the business case, as our breakdown of what an AI agent really costs to build and run shows.
What Are the Three Types of Agent Graders?
You can grade an agent with code, with another AI model, or with people, and most good evaluations combine all three. Each trades speed against nuance, according to Anthropic’s guidance on agent evals.
| Grader | Best for | Strengths | Weaknesses |
|---|---|---|---|
| Code-based (exact match, unit tests, database checks, tool-call checks) | Anything with a verifiable answer: amounts, IDs, record state | Fast, cheap, objective, reproducible | Brittle; misses nuance and valid alternative answers |
| Model-based (LLM judge scoring against a rubric) | Open-ended output: tone, completeness, summaries | Flexible and scalable | Non-deterministic, costs more, needs calibration against humans |
| Human (expert review, spot checks) | High-stakes judgment and calibrating the other two | The gold standard | Slow and expensive |
Can you trust an LLM as a judge?
Yes, with calibration. The original LLM-as-a-judge research found that strong models can approximate human preferences closely, but also documented position, verbosity and self-preference biases. Treat a model grader as a junior reviewer: give it a written rubric, check a sample of its verdicts against an expert every release, and never use the same model to both produce and grade an answer when you can avoid it.
How Do You Build Your First Agent Test Set?
Start small and real: 20 to 50 tasks drawn from actual failures and actual user requests is enough to begin. Anthropic’s team notes that 20-50 simple tasks drawn from real failures is a great start, and that you should write each task so that two domain experts would reach the same pass/fail verdict.
Here is a practical way to build the set, using a healthcare prior-authorization agent as the example:
Mine real failures first: pull from support tickets, escalations and staff complaints. “The agent submitted the wrong CPT code for a knee procedure” becomes a task.
Write the success criteria before running anything: for each task, state the expected end state (“authorization request contains diagnosis code X, payer Y’s required documents attached, status set to ‘pending review’”).
Include cases where the agent should refuse or escalate: a missing consent form should route to a human, not be guessed around. Balance “should act” cases with “should not act” cases so you don’t optimize in one direction.
Add the edge cases your team already knows: scanned documents, conflicting records, a payer that changed its form last month.
Keep each trial isolated: reset the test environment between runs so one trial cannot leak state into the next.
Worked example: scoring one task
Take the task “Request prior authorization for patient record #T-104.” You could run it five times and grade each trial like this:
| Check | Grader | Result in trial 1 |
|---|---|---|
| Request exists in the test system with status “pending review” | Code | Pass |
| All three required documents attached | Code | Pass |
| Diagnosis and procedure codes match the expected values | Code | Fail (wrong procedure code) |
| Cover note is accurate and professional | Model + human spot check | Pass |
| Escalated to human when consent form missing (separate task) | Code | Pass |
The agent “completed” the task, but the trial fails on the code check. That is exactly the failure an unchecked demo would have hidden.
How Do You Measure Reliability: pass@k vs pass^k?
Run each task several times and report both how often the agent succeeds at least once (pass@k) and how often it succeeds every time (pass^k). For anything customer-facing or compliance-bound, pass^k is the number that matters.
Anthropic explains the difference: pass@k is the chance of at least one success in k attempts and rises as k grows, which suits tools where one good result is enough. pass^k is the chance that all k trials succeed and falls as k grows. Their example: an agent with a 75% per-trial success rate has roughly a 42% chance (0.75 cubed) of succeeding on all three trials.
The pass^k metric comes from the τ-bench paper, which tested agents in simulated customer conversations with domain tools and policies. The authors found that even state-of-the-art function-calling agents succeeded on fewer than half the tasks and were inconsistent, with pass^8 below 25% in the retail domain. The lesson: a demo that works once is not evidence that the agent works.
Which Kinds of Evals Should You Run: Capability or Regression?
Run both. Capability evals ask what the agent can do well and should start with a low pass rate, giving your team a hill to climb. Regression evals ask whether the agent still handles everything it handled before and should sit near 100%.
When a capability eval saturates, graduate its tasks into the regression suite and write harder ones. Run the regression suite on every change to the model, prompt, tool definitions or retrieval data, ideally automatically in your CI/CD pipeline.
Should You Grade the Path or the Outcome?
Grade the outcome first and the path only where the path itself is the risk. Anthropic warns that checking for a fixed sequence of tool calls is too brittle, and that it is often better to grade what the agent produced, not the path it took.
There are exceptions. If a refund must never be issued before identity is verified, that ordering is a policy check and belongs in the eval. OpenAI’s trace grading takes the same approach: it scores an agent’s end-to-end trace of decisions and tool calls to understand why it succeeded or failed, rather than treating the agent as a black box.
See where AI agents fit in your operations. Get a clear view of which workflows are ready for an agent and how you would test it before launch. Book a free AI audit
Which Tools Can You Use to Evaluate AI Agents?
You can start with a spreadsheet and a script, then move to a platform when volume demands it. The right choice depends on where your agent runs and how much your team wants to build.
| Option | Best when | Trade-off |
|---|---|---|
| Spreadsheet + custom script | First 20-50 tasks, one team | Manual; does not scale past a few agents |
| Your cloud or model vendor’s built-in evals (for example OpenAI’s agent evals) | You already build on that platform | Tied to one vendor’s ecosystem |
| Open-source eval frameworks | You want control and portability | You own setup, storage and upkeep |
| Commercial evaluation and observability platforms | Many agents, many teams, audit needs | Subscription cost; check export options |
Whichever you choose, prefer tools that can export your datasets and results. Evaluation sets are valuable intellectual property, and being locked out of yours makes switching models or vendors painful.
Common Mistakes to Avoid
Most failed evaluation programs share the same handful of problems.
Trusting the agent’s own report: always verify the end state in the system of record.
Never reading transcripts: Anthropic notes you won’t know whether graders work well unless you read transcripts and grades from many trials. A 0% pass rate across many trials often signals a broken task, not an incapable agent.
Testing only the happy path: include refusals, escalations, missing data and malicious inputs. Our guide to AI agent security risks lists attack patterns worth turning into tasks.
Treating evaluation as a one-time gate: models, prompts and data drift, so the suite has to run continuously.
Skipping the human: calibrate model graders against domain experts regularly.
How Promact Helps
Promact builds AI agents for operations-heavy teams in healthcare billing, BFSI, manufacturing and SaaS, and our AI agent solutions are designed so that a human approves high-stakes decisions, every action is logged in a full audit trail, and the agent asks a person when it is uncertain. We start with a free 30-minute workflow audit that maps where your team loses hours today, then define what “correct” looks like for the first workflow before anything is built, so the agent can be tested against that definition from day one. If you are still deciding whether your organization is ready, our AI readiness assessment checklist is a good first step.
Is Your AI Agent Ready to Be Trusted With Real Work?
Your agent is ready for production when you can tick most of the items below. If you cannot, the gap is your evaluation plan, not your model.
- You have a written definition of success for each workflow, agreed by a domain expert.
- You have at least 20 to 50 test tasks drawn from real cases and real failures.
- Each task is run several times, and you track pass^k, not just a single pass rate.
- Outcomes are verified in the actual system, not from the agent’s own summary.
- Refusal, escalation and error cases are in the suite alongside the happy path.
- The regression suite runs automatically whenever the model, prompt or tools change.
- A named person reads sampled transcripts every release.
If you recognized more gaps than strengths, the practical next step is to pick one workflow and build its first 20 tasks this week. When you want a second pair of eyes, book a free AI audit and we will help you define what good looks like.
Frequently Asked Questions
What is AI agent evaluation?
It is a repeatable process of running an agent against realistic tasks and scoring the results against pre-defined success criteria. It covers the final outcome, the steps taken, safety, cost and consistency across repeated runs.
How do you evaluate an AI agent?
Build a set of 20-50 real tasks, define the expected end state for each, run each task multiple times, grade with code, model and human graders, and track both success rate and consistency (pass^k). Then re-run the suite whenever anything in the agent changes.
What metrics are used to evaluate AI agents?
Common metrics are task success rate, pass@k and pass^k reliability, tool-call correctness, policy and safety compliance, escalation behavior, latency and cost per task. Pick the few that match your business risk rather than tracking everything.
What is the difference between pass@k and pass^k?
pass@k is the probability of at least one success in k attempts, and it rises as k increases. pass^k is the probability that all k attempts succeed, and it falls as k increases, making it the stricter measure for customer-facing and compliance-sensitive agents.
Can an LLM grade another LLM’s work?
Yes, and it is widely used because it scales, but model graders show known biases such as favoring longer answers. Give the judge a clear rubric and check a sample of its verdicts against human experts regularly.
How is agent evaluation different from observability?
Evaluation tests an agent on known tasks before release and after every change. Observability records what the agent does with live traffic in production. Production traces are a rich source of new test cases.
Sources
- Anthropic Engineering: Demystifying evals for AI agents - definitions, grader types, pass@k vs pass^k and advice on building eval sets
- τ-bench: A Benchmark for Tool-Agent-User Interaction in Real-World Domains (arXiv) - introduces the pass^k reliability metric
- Judging LLM-as-a-Judge with MT-Bench and Chatbot Arena (arXiv) - research on model-based grading and its biases
- OpenAI: Trace grading - scoring agent traces end to end
- OpenAI: Evaluate agent workflows - agent eval workflow and datasets
- Gartner: Over 40% of agentic AI projects will be canceled by end of 2027 - analyst forecast on cost, value and risk controls
Have a project like this in mind?
Tell us what you're building — we'll help you scope it and ship it.
Talk to us

