Case study · AI agents & evaluation

Measuring whether AI agents do their job.

Voice and email agents were scheduling freight appointments in production, and the only way to judge a call was to review it by hand. I built the evaluation system for those agents from scratch. Later I built the release gate for our data agent, then rebuilt its evaluation stack in the open with every grader tested first.

The questionHow do you know an AI agent is doing its job when no single answer is right?

BeforeJudging a scheduling agent’s call meant reviewing it by hand, so nobody could say whether a prompt change made the agents better or worse.
AfterI scored every existing call from several call agents as a baseline. New calls were then scored as they arrived, by agent, section, and scenario. The framework became the company’s standard for measuring AI performance. For the data agent, each data domain must pass at least 90% of its must-work cases on its own, in CI after each staging deploy.

The problem

The scheduling agents talk with people by phone and email to arrange freight appointments. A conversation has no single right answer, and the same sentence can be right in one part of a call and wrong in another. The team wanted to see performance across all calls without reviewing every one by hand.

The data agent had the opposite problem. It answers metric questions from the warehouse, so every answer can be checked against data. A wrong number that looks right is worse than no answer, so each change needed a test it had to pass before release.

From business problem to technical problem

The first job is translation. Here is how the ask changed shape before any code was written.

  1. Business askAre the scheduling agents getting better or worse, and can we tell without reviewing every call by hand?
  2. Technical questionGrade each agent response on real calls, in the context of its call section and scenario. Break the scores down the way agent owners work.
  3. What success looks likeA baseline over past calls, new calls scored as they arrive, and a low score that points to the stage that caused it.

Paths I weighed

There was more than one reasonable way to do this. These are the options I compared and why I picked one.

Considered

Keep reviewing calls by hand

Upside. People catch nuance a grader can miss.

Cost. Covers few calls, and gives no baseline to compare a prompt change against.

Considered

Buy a vendor evaluation tool

Upside. A faster start.

Cost. The vendors I talked with mostly simulated calls. We needed grades on real production calls first, at lower cost.

Chosen

Build a staged pipeline on our workflow tool

Upside. Grades real calls, each stage can be checked, and it builds on the workflow tool’s own agent nodes.

Cost. More pieces to maintain, and the classifiers can be wrong too.

What I built

  1. ParsePair each agent turn with the turn it answers
  2. ClassifyFind the call section and scenario, with one classifier per call type
  3. GradeAn LLM judge scores each response in that context
  4. StoreEvery stage keeps its own output, so a low score can be traced
  5. ReportScores by agent, section, and scenario

As the company’s only data scientist, I built the evaluation system for the voice and email scheduling agents from scratch. It is a fixed pipeline of specialized agents: a transcript parser, classifiers for the call section and scenario, and a response grader. I backfilled it over every existing call from several call agents, so the first scores were a baseline. Then I made it score new calls as they arrived. For the email agent, I added a check on whether it called the right tool. A teammate curated the labels for email classification. I didn’t build the agents themselves or the telephony.

Our business operations manager and product manager reviewed the scores, and the operations team used them. The scores informed decisions. They didn’t gate releases.

For the data agent, I built the evaluation suite and release gate. Pinned cases go through a real MCP client against staging. Expected values come from closed periods in the warehouse, and each data domain must pass on its own.

Two systems. Scheduling agents: a parser pairs each agent turn in past and new call transcripts with the turn it answers. Classifiers find the call section and scenario, and an LLM judge grades each response in that context. Each stage stores its own output. Scores by agent, section, and scenario go to operations and product for review. Data agent: pinned cases with expected values from closed periods run through a real MCP client against staging. Code graders check value, type, tolerance, and allowed sources. Each domain must pass on its own for the build to pass.
Every stage keeps its output, so a low score can be traced. The release gate checks each domain on its own.

How it got built, scaled, and fixed

  1. Build

    A proof of concept on a single utterance ran end to end first: parse, classify, grade. Then it grew into the full pipeline.

  2. Scale

    I backfilled every existing call, then fixed automatic triggering so new calls were scored as they arrived. Later I moved the email agent’s run history into the warehouse, so each run joins to its outcome.

  3. Fix

    When an upstream data format changed, I re-checked the evaluator. In the data agent’s gate, revised history moved frozen answers, so I wrote a tolerance rule per metric and re-pinned the answers.

Decisions that mattered

Stages, each with one job

One judge prompt over a whole call is faster to write, but a low score from it can’t be traced. With separate stages, a low score points at the parse, the classification, or the agent, so owners debug it instead of arguing with it.

Context before grading

The grader sees the call section and scenario first, and the caller turn each response answers. A response is judged against what that part of the call needs.

Backfill before the first review

Scores on past calls meant the first meeting was about real history, so people took the numbers seriously from the start.

Score in the owners’ units

Agent, section, and scenario are how the teams already organized the work, so the scores fit their decisions without translation.

Check labels a model made

A label set made by a model can carry that model’s errors into every grade. I flagged it for a human check before it was used as ground truth.

What I changed the second time

In the first system I didn’t measure the judge against human labels. We spot-checked grades by reading the calls behind them. So when I rebuilt the data agent’s evaluation stack, I measured every grader before I trusted it.

The production system stays private, so I did that rebuild from scratch in the open-source project governed-warehouse-mcp, on a synthetic warehouse. Expected answers are computed from data with reference SQL, so they can’t drift the way typed values did. Code graders check everything code can check. Each grader is first tested against scripted runs with planted failures, to show it fires when it should and stays quiet when it should. An LLM judge covers what code can’t check, with one pass or fail verdict per criterion, and its verdicts are compared with the tested graders. Any case that passed at the last baseline and fails now blocks the release, and a failed gate opens an issue for the owner.

The harness runs on synthetic data and scripted agent runs, so this page states no pass rates from it.

What transfers

Start from real traffic, and grade each response in the context it belongs to. Split the grader into stages whose outputs a person can check. Report scores in the units the owners already use. Use code checks wherever an answer can be checked, and keep the LLM judge for what code can’t see. Test every grader before it decides anything.

Methods

LLM-as-judgeTranscript parsingScenario classificationOnline evaluationTool-use correctnessPlanted-failure testsRelease gatesMCP

Collaborative work with product and engineering partners; this page describes my contribution. Diagrams are simplified.