Agent evaluation measures more than whether an answer looks right. An agent chooses information sources, tools, action sequences, and a stopping point; a small mistake can therefore lead to costly actions. Because the same request can produce different paths, one successful final answer may reflect luck rather than reliable behavior. Repeatable, automated tests are needed to examine both results and the steps that produced them. section 10.0 section 10.2.1
Evaluate each run from three perspectives:
- Final output: Does the artifact meet the request, including accuracy and required format? section 10.2.1
- Components: Did tools and other modules do their jobs, such as retrieving relevant documents or executing code without errors? section 10.2.1
- Trajectory: Were the reasoning steps and tool calls reasonable and efficient, or did the agent wander and backtrack? section 10.2.1
Start with representative user requests that can be run repeatedly. Keep execution records: without traces, a failed result cannot be reliably traced to a component or decision. Review those traces, log errors, group recurring failures into a taxonomy, and turn frequent or severe failures into a PASS/FAIL-first rubric. Use metrics as a dashboard for detecting regressions, not as a substitute for inspecting behavior. Open-ended tasks require explicit quality criteria before their results can be judged. section 10.2.1 section 10.5 section 10.0
A summarization run
Check whether the summary captures key points without omissions and follows the requested JSON or table format. Then inspect whether search returned relevant documents, whether the LLM interpreted them correctly, and whether unnecessary tool calls or backtracking preceded the answer. section 10.2.1
Run automated evaluation in CI/CD when prompts, tool integrations, or models change. Treat a passing test set as provisional: environments, users, and external APIs change. Review operational data, analyze new errors, and update the taxonomy, rubric, metrics, and test set so the checks continue to reflect real failures. section 10.4 section 10.4.2 section 10.5
Figure 10.4 Agent quality flywheel is a continuous four-step loop for improving agent quality. The process begins by defining quality criteria (1), followed by instrumenting the system to gain visibility into real-world behavior (2). The collected data is used to evaluate the agent’s performance and identify failure patterns (3). Finally, feedback loops are architected to update datasets, rubrics, and metrics (4), feeding insights back to step 1 to refine how quality is defined.
The agent quality flywheel shows how quality criteria, visibility into real behavior, failure analysis, and updates to evaluation checks feed into one another. section 10.4.2














