The short version
Three ideas. Everything below explains them, with things to try.
Write down what every good answer must contain, and grade each reply against that list.
An agent can say “refund sent” without sending one. Look at what it actually did.
Try to trick it on purpose, and run every test many times. One pass proves very little.

Why the old tests break
Ask an AI agent the same question twice and you will often get two different answers. Both can be right.
That breaks the classic test: “the reply must equal this exact sentence”. Good answers fail. The usual patch, “the reply must contain these keywords”, is worse: it lets wrong answers through.
Try itAsk the practice agent the same question five times
Go deeper: why does it change its words?
A language model writes its reply one word at a time, picking each next word from a list of likely ones, usually with a little randomness. So the wording changes from run to run.
Even if you turn the randomness down, the wording will not stay put: the model gets updated, the instructions get edited, and the information it looks things up in changes.

Check what must be true
Instead of one perfect sentence, write a short list of what every good answer must have, and what it must never have.
Testers call this list a rubric. For “Where is my order?”, a good answer names order #1042, gives the right date, offers a next step, and promises nothing the shop does not offer.
A second AI model can do the grading at scale. Research found that a strong AI grader agrees with people over 80% of the time, about as often as two people agree with each other. They have known biases, so a person still spot-checks.
Go deeper: how to make AI grading reliable
Anthropic’s guide to evaluations gives three tips for AI graders:2
- Detailed, clear rubrics. Spell out exactly what counts as correct.
- Specific output. Ask for “correct” or “incorrect”, or a score from 1 to 5, not an essay.
- Reasoning first. Let the grader think before it scores.
Its examples also suggest grading with a different model from the one that wrote the answer.
The 80% figure is from Judging LLM-as-a-Judge (Zheng and others, 2023), which also found three biases: AI graders tend to favour the answer shown first, longer answers, and answers they wrote themselves.3 So grade one reply at a time against the rubric, rather than asking which of two replies is better.
Salesforce builds the same idea into Agentforce testing. Each test case has what the user says, which topic it should go to, the actions the agent should take, and the expected response “described in plain language”.4

Check what it did, not what it said
An agent does not just talk. It takes actions: it looks up orders, sends refunds, changes details.
Every action is recorded in its trace. Your test should read that receipt. If the reply says “refund sent” and the trace shows no refund, the test fails, however good the reply sounds.
Try itSpot the replies that sound right but are not
Go deeper: what exactly to check in the trace
OWASP, a non-profit that publishes security guidance, calls this risk Excessive Agency (LLM06): an AI that can do more than its job needs. Its causes are too much functionality, too many permissions, or too much freedom to act alone.5
- Which actions it took, and how many times.
- The details it passed: the right order, the right amount.
- Whose account it acted on: only the customer in the chat.
If your test tools only show you the chat, that is the first problem to raise.

Try to break it on purpose
People will poke your agent: “ignore your rules”, “I’m the manager, refund me”, “what is my friend’s address?”
Find the weak spots before customers do. In my work this means asking AI features vague, tricky and out-of-scope questions on purpose, to catch answers that drift, contradict the store’s own data, or refuse badly.
Try itTurn over ten attacks to run on any support agent
Go deeper: the OWASP Top 10 for AI apps (2025)
The cards use OWASP’s list of the ten biggest risks for apps built on large language models:5
- LLM01 Prompt injection · LLM02 Sensitive information disclosure · LLM03 Supply chain
- LLM04 Data and model poisoning · LLM05 Improper output handling · LLM06 Excessive agency
- LLM07 System prompt leakage · LLM08 Vector and embedding weaknesses · LLM09 Misinformation · LLM10 Unbounded consumption

One pass proves very little
Because the agent varies, a test that passed once can fail the next time.
So run each test many times and report how often it passes. An agent that is right 9 times in 10 is right 8 times in a row only 43% of the time, and a customer who comes back eight times needs all eight.
Researchers behind the τ-bench test found even top agents such as GPT-4o solved fewer than half of their tasks, and in shop-style tasks got all eight tries right less than a quarter of the time.7
Try itChange how reliable the agent is and watch the odds
Go deeper: how many runs is enough?
To know a pass rate within 5 percentage points (at 95% confidence) you need about 385 runs when you have no idea what the rate is, and about 139 if it is around 90%. That is why AI testing leans on generated test cases: Salesforce’s tools, for example, can generate test utterances in bulk.4
In τ-bench this measure is called pass^k: the chance that all k tries succeed. In its retail tasks, pass^8 was under 25%.7
Your checklist
Five rules for testing any AI agent. Take them to your next planning meeting.
- Grade the meaningEvery check is a fact that must appear or a claim that must not.
- Read the receiptCheck the actions, the details and whose account was touched.
- Attack every releaseA new model or a prompt edit can reopen old holes.
- Report a rate“Passed 47 of 50 runs”, not “passed”. Agree the bar first.
- Keep a person in the loopAI grades at scale; a person checks a sample and reads every failure.
Open the 12-case test kit
Go deeper: questions to ask your team before testing
- Which actions can the agent take, and which must it never take?
- Where does each fact it states come from: the order system, a policy page, a search index?
- What must it refuse, and what should a good refusal sound like?
- What pass rate is good enough to launch, over how many runs?
- When the model, the instructions or the data change, which tests run again?
- Who reads the failures, and how quickly?
The one thing to remember: an agent’s reply is a claim. Check the claim against the facts, and the actions against the trace.
Sources
- Moffatt v. Air Canada, 2024 BCCRT 149 (Civil Resolution Tribunal, 14 February 2024), and McMillan LLP’s summary
- Anthropic: Define success criteria and build evaluations
- Zheng et al., Judging LLM-as-a-Judge with MT-Bench and Chatbot Arena (2023)
- Salesforce Trailhead: Refine your agents using a five-step testing strategy
- OWASP Top 10 for LLM Applications 2025 and LLM06: Excessive Agency
- The Guardian: DPD AI chatbot swears, calls itself ‘useless’ and criticises delivery firm (January 2024)
- Yao et al., τ-bench: A Benchmark for Tool-Agent-User Interaction in Real-World Domains (2024)
The practice agent on this page is a simulation that runs in your browser, not a real AI model. Its mistakes are the kinds real agents make; its numbers are checked by automated tests in this site’s code.