An AI agent that "looks good in the demo" can fail in 15 percent of real cases and nobody finds out until a customer complains. Unlike traditional software, a model's answers change with the prompt, the model, and the data. Without systematic evaluation, every adjustment is a coin flip.
Short answer: Evaluating an AI agent means testing it with a set of real cases and measuring whether it completed the task, chose the right tools, and respected its safety limits. It is done before launch and repeated in production, because a change of model, prompt, or data can break cases that used to work.
Why is evaluating an AI agent different from traditional software?
Classic software is deterministic: same input, same output. An agent is probabilistic and depends on several components: the model, the instructions, the tools, and the retrieved information. A model version change or a new phrase in the prompt can improve one case and break another. Evaluation is your safety net. If you have not yet defined exactly what an agent is, start with what AI agents are and how they transform a business.
What metrics should you measure in an AI agent?
Final outcome
Did the agent complete the task? It is the most important metric. Examples: the order was captured correctly, the appointment was scheduled at the right time, the answer was correct and relied on the right source.
Process
Did it choose the right tool? Did it pass the parameters correctly? Did it take unnecessary steps? Sometimes the outcome is right by chance and the process is flawed.
Safety and limits
Does it respect what it must not do? Does it refuse to reveal other customers' information? Does it escalate when it should? Also test manipulation attempts.
Operations
Latency, cost per task, technical error rate, percentage of escalations to humans.
How do you build a test set for an agent?
- Collect real cases. Take actual conversations, emails, or requests, with personal data anonymized.
- Cover variety. Include easy, difficult, and ambiguous cases, with typos, with missing information, and out of scope.
- Define the expected answer. For each case, what should happen: the correct result, the expected tools, or the acceptance criterion.
- Add adversarial cases. Improper requests, attempts to bypass the rules, instructions hidden in a document.
- Start small. With 30 to 50 cases you already learn a lot; the set grows with every failure you find in production.
How do you grade an agent's responses?
| Method | Advantage | Caution |
|---|---|---|
| Automatic rules | Fast and cheap; ideal for formats, fields, and tools | Only covers what you can verify with code |
| Human review | The most reliable for quality and tone | Slow and costly; use it on samples |
| Model as judge | Scales quickly for subjective criteria | Can have biases; validate it against human judgment |
The usual approach is to combine them: rules for the objective, a judge model for a first pass, and people for key cases and calibration.
Testing before launch
- Regression. Run the full set every time you change the model, prompt, tools, or documents.
- Comparison between alternatives. Test two models or two prompts with the same cases and compare results and cost.
- Controlled pilot. A small group of real users with human review of what the agent proposes.
- Exit thresholds. Define beforehand what minimum result you need to go to production, for example a certain success rate on critical cases and zero failures on safety limits.
How do you monitor an agent in production?
Evaluation does not end at launch. Real data always brings new cases.
- Store conversations and tool calls, respecting privacy and retention.
- Review a weekly sample with people.
- Add "this answer did not help me" buttons to detect failures from the user's side.
- Alert on spikes in cost, latency, or escalations.
- Turn every important failure into a new case in the test set.
- Watch the provider's changes: when a model is updated or retired, rerun everything.
Common mistakes
- Evaluating only with examples the team chose because they work.
- Measuring "how good it sounds" instead of whether it solved the task.
- Not separating the evaluation of search (in RAG) from that of writing; that way you do not know where the failure is (how the retriever works is explained in RAG: AI with your company's knowledge).
- Changing the prompt without rerunning the tests; how to write them well is covered in system prompts for AI agents.
- Using a judge model without checking that it matches human criteria.
- Expecting 100 percent; define what level of error is tolerable given the risk of the process.
What does an acceptance criterion look like?
Suppose an agent that captures orders from customer emails. A reasonable criterion could be: in the test set, the products and quantities must match what the customer requested in the vast majority of cases, the agent must never create an order for a customer that does not exist in the system, and when faced with an ambiguous email it must ask or escalate instead of guessing. Notice that it mixes an accuracy target with hard zero-tolerance rules. That combination is the one worth agreeing in writing with the process owner before starting.
When it is worth investing heavily
The higher the risk, the more evaluation: an agent that answers questions about business hours requires little; one that modifies orders, calculates amounts, or handles sensitive information requires a robust test set, human review, and continuous monitoring. As an order of magnitude, building the evaluation framework can represent a significant share of the total project effort, and it is what separates an experiment from a reliable system. The exact scope depends on the process.
At DaltoAura we include from the start the test set and the acceptance criteria agreed with you, so that we launch with data and not with hunches.
Frequently asked questions
How many test cases do I need to evaluate an agent?
With 30 to 50 real cases you already learn a lot, as long as they include easy, difficult, and ambiguous situations, typos, missing information, and out-of-scope requests. The set should grow with every failure detected in production; the ideal number depends on the risk of the process.
Can an AI model grade the answers of another model?
Yes, it is the technique called model as judge and it helps scale the review of subjective criteria. It has biases, so you must validate it against human judgment on a sample. The usual approach is to combine automatic rules for what can be verified, a judge model for the first pass, and human review for key cases.
What level of accuracy should an agent have before launch?
It depends on the risk of the process and should be agreed in writing with the process owner before starting. An agent that answers business hours tolerates more error than one that modifies orders or handles amounts. An accuracy target is usually combined with zero-tolerance rules, such as not creating orders for nonexistent customers.
When do I need to rerun an agent's tests?
Every time the model, prompt, tools, or documents change, and when the provider updates or retires a model. Running the full set before publishing the change is the regression test that keeps you from fixing one case and breaking another without noticing.
Let's talk
If you already have an agent or assistant running and you do not know how well it answers, we can help you build the tests and metrics to measure and improve it.