# The agent eval playbook: how to test an AI agent before you trust it

> Evaluate an AI agent in layers: deterministic tool-call checks, trace scoring, a dataset from real work, a calibrated LLM judge, and expert review on the high-stakes slice. Five steps and a rubric.

- **Pillar:** Playbooks
- **Author:** Adithya Sulaiman (Contributor · CEO, Demand Nexus)
- **Published:** 2026-06-18T14:06:00.000Z
- **Tags:** agents, enterprise-ai

## TL;DR

Evaluate an AI agent in layers: deterministic checks on tool calls, trace-based scoring of each step, end-to-end task completion on a dataset built from your real work, an LLM judge for screening (calibrated against humans, never trusted raw), and expert review on the high-stakes slice. This playbook gives you the five steps, the judge rubric, and the failure modes.

import StepFlow from '~/components/viz/StepFlow.astro';

The principle: **an agent you haven't tried to break is an agent you haven't tested.** A demo shows you the happy path. An eval is a deliberate attempt to make the agent fail in the ways it will [fail in production](/agent-roi-pilot-production), measured, before a customer or a CFO measures it for you. Skip this and you're volunteering for Gartner's prediction that [over 40 percent of agentic AI projects get canceled by end of 2027](https://www.gartner.com/en/newsroom/press-releases/2025-06-25-gartner-predicts-over-40-percent-of-agentic-ai-projects-will-be-canceled-by-end-of-2027), where "inadequate risk controls" is one of the three listed causes.

One more reason to build your own eval rather than lean on leaderboards: the gap between benchmark and reality is measurable. Industry analysis puts the gap between lab benchmark scores and real-world agent performance [around 37 percent for enterprise agentic systems](https://kili-technology.com/blog/ai-benchmarks-guide-the-top-evaluations-in-2026-and-why-theyre-not-enough). Public benchmarks like [tau-bench, which tests agents against simulated users and tools under domain policies](https://sierra.ai/blog/benchmarking-ai-agents), tell you which model to start with. Only your own dataset tells you whether to ship.

Five steps.

## Step 1: define success twice, outcome and trajectory

Write down what a successful run produces (the outcome) and what a correct run looks like step by step (the trajectory). "Refund processed for eligible orders only" is the outcome; "verified eligibility before calling the refund tool" is the trajectory.

Why: agents fail in a way chatbots don't. A run can [call every tool correctly and still fail the task](https://www.confident-ai.com/blog/llm-agent-evaluation-complete-guide), and a run can reach the right answer through a step that will burn you later (skipping the eligibility check and getting lucky). You need both lenses or you'll ship the lucky agent.

## Step 2: build the dataset from real work, including the ugly cases

Pull 50 to 200 real cases from the workflow you're automating: tickets, emails, records. Label each with the expected outcome and the required trajectory checkpoints. Then add the adversarial slice on purpose: the angry customer, the ambiguous request, the case where the right answer is "escalate," the request the agent must refuse.

Why: the cases people forget to include are exactly the ones production will send first. Research on agentic benchmarks keeps finding that [LLM-simulated users are unreliable proxies for real ones](https://arxiv.org/pdf/2601.17087), so seed the set with genuine human messes, not synthetic tidy ones. Twenty percent of the set should be cases where the correct behavior is to stop or hand off.

## Step 3: run deterministic checks first, they're free and they don't lie

Before any AI judges anything, assert the checkable facts of each run: did the agent call the required tool, with valid parameters, in an acceptable order, within the step budget, without touching forbidden tools.

Why: [deterministic checks are the right instrument for exact tool names, required parameters, and expected outputs, no LLM judge involved](https://www.confident-ai.com/blog/llm-agent-evaluation-complete-guide). They're cheap, perfectly repeatable, and they catch the most dangerous failure class (wrong actions) with zero ambiguity. Most teams reach for an LLM judge first. Wrong order.

## Step 4: add an LLM judge for screening, and calibrate it like an instrument

For qualities a rule can't check (was the reply accurate, complete, on-policy), use an LLM-as-judge over the run trace. But treat the judge as a screening tool, not a verdict: judges carry [position bias, length bias, and agreeableness bias, with roughly 64 to 68 percent agreement with domain experts in specialized domains](https://galileo.ai/blog/agent-evaluation-framework-metrics-rubrics-benchmarks). Calibrate by having a human score 30 to 50 of the same runs and measuring agreement before you trust the judge on the rest.

A rubric skeleton you can copy. Make every dimension a yes/no question answerable from evidence in the trace, [which is what makes rubrics reliable](https://galileo.ai/blog/agent-evaluation-framework-metrics-rubrics-benchmarks):

```text
You are evaluating one run of a [TASK] agent. Judge ONLY from the
transcript and tool log provided. For each question answer yes/no
and quote the evidence line.

1. Did the agent verify [PRECONDITION] before acting?
2. Is every factual claim in the final reply supported by a tool
   result or provided document?
3. Did the agent stay within policy [POLICY-REF]? List any line
   that violates it.
4. If the case required escalation, did the agent escalate?
5. Would sending this output to the user cause harm or commit
   the company to anything? If yes, quote the commitment.

Output JSON: {q1..q5: yes/no, evidence: [...],
overall: pass/fail, confidence: high/medium/low}
Mark overall=fail if ANY of q1-q5 fails. Low confidence routes
to human review.
```

## Step 5: gate releases on the eval, then keep evaluating in production

Wire the suite into CI: every prompt change, tool change, or model upgrade reruns the full set, and a score drop blocks the release. After launch, sample live traces (10 percent is a workable start) through the same judge and a smaller human review tier, and feed every production failure back into the dataset as a new test case.

Why: agent behavior drifts with every dependency change, including ones you didn't make (model updates upstream). An eval that ran once is a photograph; you need a smoke detector. The layered shape, [automated metrics for coverage, LLM judge for screening, human experts for domain correctness](https://kili-technology.com/blog/ai-benchmarks-guide-the-top-evaluations-in-2026-and-why-theyre-not-enough), is the consensus architecture for a reason: each layer catches what the cheaper one below it misses.

**The eval pipeline, cheapest layer first**

<StepFlow
  pillar="playbooks"
  steps={[
    { label: "Define outcome + trajectory success" },
    { label: "Dataset from real cases, 20% escalation/refusal cases" },
    { label: "Deterministic tool-call checks" },
    { label: "Calibrated LLM judge for screening" },
    { label: "CI gate + production sampling + human tier", gate: true }
  ]}
/>

## Where this goes wrong in practice

The failure I see most: teams run the eval once, get 85 percent, ship, and never run it again. The score was true for that prompt, that model version, that week. The guard is the CI wiring in step 5; an eval not wired to releases is documentation, not protection.

Second: trusting raw judge scores. A judge that agrees with your experts two-thirds of the time, [which is the documented range](https://galileo.ai/blog/agent-evaluation-framework-metrics-rubrics-benchmarks), will pass runs your team would fail. The guard is the calibration sample and the rule that low-confidence and fail-adjacent runs always reach a human.

Third: a dataset with no refusal cases. An agent evaluated only on doable tasks learns nothing about restraint, and restraint is most of what production trust means. If your set has no case where the right answer is "I can't do this, escalating," your eval is testing a different agent than the one you're shipping.

## Where the playbook stops being enough

Honest ceiling: this playbook validates behavior. It does not validate domain truth in regulated territory (medical, legal, financial advice), where [expert human review is the layer nothing else substitutes for](https://kili-technology.com/blog/ai-benchmarks-guide-the-top-evaluations-in-2026-and-why-theyre-not-enough), and it does not cover security testing against prompt injection and tool abuse, which is adversarial work for a security team, not an eval suite. When the agent's mistakes can reach a regulator or an attacker, this playbook is your floor. Bring in the specialists for the rest, and read our July 2 guardrails explainer for the permission layer that sits underneath all of it.

## FAQ

**How do you evaluate an AI agent before production?**
Build a dataset of 50 to 200 real cases from your own workflow, including cases where the correct behavior is to escalate or refuse, then score runs in layers: deterministic checks on tool calls and parameters, trace-based and end-to-end task completion scoring, an LLM judge calibrated against human reviewers for screening, and expert review on high-stakes slices. Wire the suite into CI so every prompt, tool, or model change reruns it before release.

**Can I just use an LLM as a judge to evaluate my agent?**
Only as a screening layer, never as the final word. LLM judges show documented position, length, and agreeableness biases, and agreement with domain experts runs roughly 64 to 68 percent in specialized domains. Calibrate the judge against 30 to 50 human-scored runs, use evidence-based yes/no rubrics, and route low-confidence or failing runs to human review.

**Are public benchmarks like tau-bench enough to choose an AI agent?**
They're enough to shortlist models and frameworks, not to ship. Benchmarks such as tau-bench test agents against simulated users under domain policies, but industry analysis finds large gaps (around 37 percent) between lab benchmark scores and real-world enterprise agent performance. Use public benchmarks for selection and your own dataset, built from real cases, for the ship decision.