New Tool Radar

AI Agents & Automation

How to Evaluate an Agent Run Accuracy With a Test Set

Evaluate an agent run accuracy with a small test set of known answers, so a change that breaks routing shows up before users find it.

Schematic with three steps: Write the test set with known answers; Run the set and record the score; Fix the failing cases, then re-run the.

Trying an agent a couple of times is not an evaluation: it proves the demo works, not that the agent works. ADK’s evaluation framework records test cases with expected tool-call trajectories and final responses, and scores the agent against them, so a change that breaks routing shows up before users find it. Build a small test set first, ten to twenty cases with known answers, covering each specialist and the fallback. Run it before every change to the instructions, and treat a failing case as a bug, not as a test to rewrite.

What you need

  • An agent with a defined job and at least two specialists or tools
  • Ten to twenty test cases with known correct answers
  • A way to run the set and score it, such as ADK eval or a manual checklist

Step 1: Write the test set with known answers

Write each case as an input plus the expected answer or the expected tool calls. Cover each specialist, the fallback, and one off-topic input.

Step 2: Run the set and record the score

Run the whole set and record how many cases passed, and which ones failed. A score with no failing cases listed is not a score.

Step 3: Fix the failing cases, then re-run the whole set

Fix the cause of each failure, whether it is an instruction, a description or a tool, and re-run the entire set. A fix that breaks a previously passing case is not a fix.

Worked example: synthetic evaluation run

The table below is a synthetic example. It shows the expected result of the evaluation; no agent was run.

Case group Cases Passed
Billing questions 5 5
Technical questions 5 4
Off-topic input 2 2
Total 12 11

Expected result (UNTESTED). 11 of 12 cases pass, and the one technical failure is listed with its cause for fixing. This check was not run live; the table shows the expected result for the synthetic example.

Limits

  • A test set that only covers easy cases proves nothing; include the hard and off-topic ones.
  • Expected tool calls are part of the answer; a right answer via the wrong tool is a failure.
  • A failing test is a bug, not a test to rewrite to match the agent.
  • Re-run the whole set after every fix, not just the failing case.

Sources

See all