All guides

Tutorial

Define Success Before You Build an Agent

"The agent works" is not a success criterion. It is a feeling produced by watching a demo. A criterion is something a second person can check, on a defined set of cases, without asking the author what they meant.

Writing those criteria before the build is the cheapest quality work available, because it turns every later disagreement into a test rather than an opinion.

What a Criterion Contains

Four parts, in one sentence each.

The case. A specific input, taken from real traffic, described precisely enough that two people would pick the same one.

The expected outcome. What a competent person does with that case, including the artefacts they produce.

The tolerance. Which parts must match exactly and which may vary. A reply can be phrased differently and still be correct. A refund amount cannot.

The evidence. Where the result is observed: the record, the reply, the log entry.

A criterion without a case is a preference. A criterion without a tolerance produces arguments about wording. A criterion without evidence cannot be checked at all.

Start With the Complete Case

The first criterion for any agent should describe a normal, complete request that the process handles today, end to end.

Not the hardest case, and not the easiest. A middle case that appears several times a week. Write what a good outcome looks like in terms of systems changed and messages sent, and state the fields that must be exact.

This criterion is the one that proves the agent can do the job at all. If it fails, nothing else matters.

Then the Boundary Cases

Boundary cases are where the process nearly breaks: the request that is almost inside policy, the customer who has contacted three times, the order that was already refunded.

Write three to five. Each should have an unambiguous correct answer, which sometimes means the correct answer is "escalate to a person". An agent that escalates the right cases is working correctly, and the criterion should say so explicitly, because otherwise escalation looks like failure in every later report.

Then the Refusals

Every agent needs cases it must not handle. Out-of-scope requests, requests for information the agent has no access to, and requests that would require an action outside its permissions.

A refusal criterion has two parts: the agent does not take the action, and it says something useful about what happens next. An agent that silently declines is worse than one that escalates with context.

Make the Tolerance Explicit

The tolerance is where most criteria quietly fail. Two examples show why.

For a drafted customer reply, the tolerance might be: the facts must match the record exactly, the policy statement must match the current wording, the remedy must match the policy outcome, and the tone may vary. That is checkable by a person in thirty seconds and partly checkable by a script.

For a record update, the tolerance is usually exact: the status field, the amount and the reference number must match, and any other change is a failure. No variation is acceptable because the record is the system of record.

Writing the tolerance forces the team to decide which parts of the output actually matter, which is often the most useful conversation in the project.

Turn Criteria Into a Test Set

Once written, the criteria become rows in a dataset: case, expected outcome, tolerance, evidence. Thirty rows is a usable starting set. The rows come from real traffic, not from imagination, because imagined cases are always tidier than reality. Evaluation datasets covers how to grow and maintain the set.

The set is then run before every change to the brief, the tools or the model. That is what makes improvement measurable rather than anecdotal, and it is the difference between a pilot and a permanent system.

Criteria for the Business Case

Technical criteria are half the job. The other half is the number the project was funded to move.

Write it in the same form: the metric, the baseline, the target and the window. For example: median handling time for damage claims, currently twenty-two minutes, target twelve, measured over a four-week period after the approve rung goes live.

Two rules keep this honest. The baseline is measured before the agent exists, from the existing process. And the metric is one the team already tracks, so that nobody argues about definitions after the fact.

What to Do When a Criterion Fails

A failing criterion is information, not a verdict. Classify the failure before fixing it.

If the agent had the right information and chose wrongly, the brief or the tool descriptions need work. If the agent lacked the information, a tool is missing or the data source is unreliable. If the expected outcome in the criterion is what is wrong, the process itself is ambiguous and the team needs to decide the policy before the agent can implement it.

That third case is common and worth naming early, because it means the project has surfaced a business decision that had been deferred. That is a good outcome, even though it delays the build.

FAQ

How many criteria are enough for a pilot?

Thirty rows covering one complete case, three to five boundary cases, three refusals and the rest normal traffic. That is enough to catch structural problems. It is not enough to certify the agent for the act rung, which needs a few hundred real cases.

Should the person who built the agent write the criteria?

No. The criteria should be written by whoever owns the process outcome, with the builder translating them into tests. A builder writing their own criteria will unconsciously write tests the implementation already passes.

What if two stakeholders disagree on the expected outcome?

That disagreement is the finding. Resolve it as a policy decision, write the resolution down, and add the case to the set. An agent cannot be more consistent than the policy it implements.

Next step

Write one complete case, three boundary cases and one refusal, with the tolerance stated for each. If that takes more than an hour, the process needs a decision before the agent does. Send us the set and we will tell you whether it is ready to build against.

Next step

Talk to us about the work.

Tell us what you want an agent to run. We come back with a scope, not a slide deck.