Card 25 of 44· Domain 3 · Deploy

Testing agents — why the usual approach breaks

Why conventional test practice fails on non-deterministic output, the four ways to judge quality, and why an agent that refuses too much has failed rather than played safe.

Testing agents — why the usual approach breaks
Open the card in a new tab to read it at full size.

Conventional software testing assumes a fixed input produces a fixed output, and
that you can enumerate what to test. Neither holds here, which is why testing
agents needs its own approach.

Three reasons the usual practice breaks

Non-determinism. The same input can produce different wording. So assertions
have to be about meaning and constraints, not exact strings. A test that fails
because a synonym appeared is not testing anything useful.

Quality is a spectrum. Not pass or fail, but better and worse. That means you
need a bar rather than an assertion — and a good bar to use is: no worse on any
dimension, better on at least one.

Unbounded input. Users can type anything, so you cannot enumerate the cases.
The response is to sample the tail deliberately rather than pretend to
completeness.

The four ways to judge

Deterministic checks. Did it cite a source? Did it refuse? Did it call the
right action? Cheap and reliable, so use them for everything that allows them.

Model-based grading. A language model scores the output against a rubric. The
qualification matters: it must be calibrated against human judgement before you
trust it, or you are grading with an instrument nobody has checked.

Human review. Where consequences land. Sampled rather than exhaustive.

Comparative evaluation. A against B on the same set. This is the right tool
for change decisions — "is the new version better than the old one" is a far
easier question to answer reliably than "is this version good".

Metrics that matter

Groundedness — the key measure for a knowledge agent.
Task completion — for task agents.
Tool call accuracy — did it pick the right action.
Over-refusal — a real failure, not a safe default.

Over-refusal, since it keeps coming up

An agent that declines whenever it is unsure will score beautifully on every
safety measure and be useless in practice. People will stop asking it things,
containment will look excellent, and the dashboard will show a healthy system
nobody trusts.

Exam trap. Over-refusal is a failure mode. A testing strategy that only
measures harm and never measures unnecessary refusal is incomplete.

The one line to carry: test for meaning against a bar, not for strings against
an assertion — and measure refusing too much as carefully as you measure saying
something wrong.

Goes with: card 41, which sets out which metric family belongs to which kind
of model — and what makes a validation criterion real.


Currency (19 Aug 2026). Agent evaluations went GA in March 2026 with customisable
test sets, and multi-turn conversation tests followed — so you can evaluate realistic
dialogue rather than single turns. See card 44.