# Evaluating agents and tracking quality

> An agent that shines in a demo can fail often in production. Evaluate it on real cases before release, then follow its traces and user feedback. Every change of model, instructions or source is replayed on the same evaluation set.

The evaluation set starts with twenty to fifty real cases, with the expected answer or criteria, including edge cases and expected refusals. It grows with every incident. Waiting until you have hundreds of cases delays the work for no reason.

For scoring, use an automated check where possible: the right action, the right field, the right source. An LLM judge scores the rest, and you check its scores by reading traces. A person settles disagreements.

Succeeding once in several tries is not enough for an agent that acts: measure whether it succeeds every time. An agent that succeeds on 80% of tries succeeds five times in a row only about one time in three.

In production, track traces, feedback, handover rate, answers without a source and drift over time. Stanford’s 2026 AI Index notes that AI capabilities are advancing faster than our ability to measure and manage them, and that multi-step planning remains a weak spot.

For an agent that acts, a red-teaming campaign before release completes the evaluation set, indirect injections included.

**When**: Needed as soon as an agent is published for people other than its author. Not needed for a personal drafting assistant, which is judged in use; an agent that answers customers or acts in a system is judged on an evaluation set.

**Trade-offs**: An evaluation set takes expert time to build and maintain. Without one, every model change is a gamble.

## Where to start

- Gather twenty to fifty real cases with a domain expert
- Automate the checks that can be automated
- Replay the set on every change
- Add each incident to the set

## Common mistakes

- Evaluating on made-up examples
- Trusting an LLM judge without reading traces
- Measuring a single try per case

## Metrics

- Success rate on the evaluation set, consistency included
- Answers without a source in production
- Time between an incident and its addition to the set

## Sources

- [Anthropic, Demystifying evals for AI agents](https://www.anthropic.com/engineering/demystifying-evals-for-ai-agents)
- [Stanford HAI, Inside the AI Index: 12 takeaways from the 2026 report](https://hai.stanford.edu/news/inside-the-ai-index-12-takeaways-from-the-2026-report)
- [ANSSI, Security recommendations for a generative AI system](https://cyber.gouv.fr/en/publications/security-recommendations-generative-ai-system)
