An agent can give the right answer for the wrong reasons: it might make unnecessary tool calls, ignore retrieved evidence, or fail unpredictably on the next run. Evaluation checks an agent’s answers and behavior against defined criteria so failures become visible and improvements can be tested. It helps measure robustness; it cannot repair a poorly designed agent by itself. section 7.0 section 7.2
A practical evaluation loop starts small:
- Set goals and benchmarks. For each input, record an expected response and a known-bad response. section 7.2
- Check more than the final answer. Inspect tool choices, grounding in retrieved context, steps taken, latency, cost, and failure behavior. Use a rubric when criteria such as factual accuracy, tone, and structure need judgment rather than exact matching. section 7.2
- Run tests repeatedly. Agent outputs vary, so one failure or success may be a one-off; run passing benchmarks at least three times to gain reasonable confidence. section 7.2.2
- Make the smallest useful change to the prompt or tools, then test again. Keep the benchmark set so later changes can be checked against it. section 7.2 section 11.1.5
Start with an answer check
Suppose a small knowledge base says that a fictional engine spins antimatter rings. A benchmark asks what it spins, expects “antimatter,” and marks “fusion” as a known-bad answer. The first evaluator can simply check whether the response contains the expected word. That is a useful starting test, not a complete evaluation: it does not reveal whether the agent retrieved the right fact or took an inefficient route to its answer. section 7.2.2 section 7.2
As an agent moves toward deployment, automate checks on prompt or model changes and retain traces of prompts, tool calls, latency, and outcomes. Human feedback and LLM-as-judge checks add perspectives that simple matching misses. For releases, place offline tests before shadow traffic, a small canary, and full rollout; record model and tool versions so a failed run can be investigated. section 11.1.5 section 8.3.5














