How to evaluate an AI agent.

You would not ship software without tests. An agent needs them more, because the same input can produce different outputs. Here is the method we use, in plain terms.

Published · 7 min read

01Short answer

The short answer

To evaluate an AI agent, build a set of real cases with known good outcomes, run the agent on all of them, and score the results automatically. Decide in advance what score is good enough. Re-run the whole set every time you change a prompt, a tool or a model. Keep a trace of each run so that a failure can be explained, and have people review a sample in production.

02Terms

Four words you will hear

Eval
A test for AI behaviour: an input, the agent’s output and a score.
Golden set
The collection of real cases with agreed correct answers that the agent is tested on.
Grader
What produces the score: code, a second model, or a person.
Trace
The full record of one run: each model call, tool call, result, cost and timing.

03Method

The method, step by step

  1. Step 1

    Collect real cases

    Fifty is enough to start. Take them from actual history, and include the awkward ones: missing data, ambiguous requests, cases that should be refused. Write down the right outcome for each with the people who do the job.

  2. Step 2

    Decide what to score

    Score the outcome first: was the final result correct? Then score the path: did it call the right tools, in a sensible order, without doing anything it should not? An agent can reach a right answer the wrong way.

  3. Step 3

    Pick the cheapest grader that works

    Use code where the answer can be checked exactly, a model as judge where it needs reading, and a person where judgment is the point. Check the model judge against human scores before trusting it.

  4. Step 4

    Set the threshold before you look

    Agree what pass rate is good enough for this process, and which failures are never acceptable. Deciding after you see the score is how weak systems get approved.

  5. Step 5

    Run it on every change

    Prompt edits, new tools, model upgrades and price-driven model swaps all go through the same suite. This is what makes switching models safe.

  6. Step 6

    Keep evaluating in production

    Trace every run. Sample real cases for human review, track approval and override rates, and add every new kind of failure to the golden set.

04Graders

Which grader for which question

Most suites use all three.
GraderGood forWatch out for
CodeExact values, formats, totals, which tools were calledCannot judge tone or reasoning
Model as judgeSummaries, explanations, policy complianceNeeds calibrating against people; costs money per run
HumanHigh-stakes decisions and setting the standardSlow and expensive; use on a sample

05Why it matters

Why this is not optional

Evals are how an agent earns autonomy. Without them every decision about what it may do alone is a guess. With them, you can point to a number, and so can your auditor.

06Pitfalls

Common mistakes

  • Testing only the happy path. The cases that matter are the ones that should be refused or escalated.
  • Writing the test set from imagination. Invented cases are tidier than real ones.
  • Trusting a model judge unchecked. Compare it with human scores on a sample first.
  • Scoring only the final answer. An agent that deletes a record on its way to the right answer has not passed.
  • Treating evals as a one-off. The suite is a product asset that grows with every incident.

Start here

Let’s talk.

Tell us what you are trying to get done. You get a straight answer.

info@ligergroup.com

The process or system, what is in the way, any deadline.

A person replies by email. No newsletter.