Agents and Autonomy

If nobody wrote the test set, the system was demonstrated, not evaluated

A written set of cases, with expected behaviour, is the difference between knowing a system works and having watched it work once.

Photo: Kristin Hardwick · CC0 · via StockSnap

The demo goes well. The agent answers the questions the developer asks it, handles the booking, declines the medical question. Everyone is impressed. The system is launched.

What was observed was a performance. What was not established was whether the system behaves the same way on the questions nobody asked, in the languages nobody spoke in the meeting, on the day the calendar API is slow. A demo is a sample of one, chosen by the person with the most reason to want it to go well.

What an evaluation set is

A written list of inputs, each with the behaviour the system should produce. Not just the happy path. The awkward cases: the caller who mumbles, the one who switches language mid-sentence, the one asking about something the business does not do, the one who is angry, the one whose question has a medical half, the one at three in the morning, the one that is a compound of two requests.

For each, the expected behaviour is written down before the test is run. Answer, escalate, refuse, ask for clarification, hold. Then the system is run against the set, and the results are compared to the expectations, and the comparison is kept, with the date and the version of the system it was run on.

Why written and why before

Written, because a test set in someone's head is not a test set; it is a memory, and it changes. The developer remembers the cases that passed. The cases that were awkward and never quite resolved fade. A written set does not fade.

Before, because a set written after seeing the results is a set written to pass. If the expected behaviour is decided after the system has produced its output, the expectation will drift toward the output, and the test will confirm whatever the system did. The expectation has to be fixed first, by someone thinking about what should happen, not about what did.

The set is also the specification. It says, more precisely than any prose, what the system is for and what it must not do. When the client asks "will it handle X", the answer is "X is case 23; here is what it does". When the client asks for a new feature, the first question is "which cases does that add".

What goes in it

Every escalation trigger, phrased three ways, in every language the system will meet. The direct phrasing, the oblique phrasing, the one that uses none of the trigger words.

Every hard limit, approached and exceeded. The fiftieth send and the fifty-first. The tool on the list and the tool not on it.

Every disclosure moment. The first message. "Are you a real person?" "Can I talk to someone?"

Every tool the agent can call, failing. The calendar that returns an error. The CRM that times out. The messaging API that rejects the number. What does the agent do when the tool it depends on does not work?

A dozen ordinary cases for baseline, so that a change which fixes the awkward cases and breaks the normal ones is caught.

And, growing over time, every incident. Each near-miss from the logs becomes a new case, with the expected behaviour being what should have happened. The set is never finished; it is the accumulated memory of everything the system has got wrong.

How to run it

Before launch, obviously. Then after every change: a new tool, a new prompt, a new model version, a new escalation trigger. The run takes an hour. The alternative is finding out in production that the change which fixed the compound-message case broke the Roman Urdu case.

The results are kept, dated, next to the version they were run on. A year later, the question "did this ever handle X correctly" has an answer.

The governance point

An evaluation set is the evidence behind the deployment claim. Without it, "we tested it" means "we watched it", and the sign-off is a signature on an impression. With it, the claim is specific, the evidence is kept, and the next person to touch the system can see what was known when it launched.

It is also the only honest basis for the sentence in the proposal that says what the system does. "The agent escalates medical questions" is a claim. "The agent escalated all fourteen medical-question cases in the evaluation set, in Urdu, Roman Urdu and English, on this date" is evidence.

The objection

"We don't have time to write test cases." Writing the set takes a day. Running it takes an hour. The alternative is not saving a day; it is spending the day later, in production, on the failure the set would have caught, plus whatever the failure cost. The demo went well because the demo was chosen. The evaluation set is the demo nobody chose.

The principle

A system that has been watched has been demonstrated. A system that has been run against a written set of cases, with expected behaviour fixed in advance, has been evaluated. Only the second supports a claim.

Written from deployment and research, not from a content calendar. If something here is wrong in your experience, tell me which line.