A hands-on guide to tracing AI agents with OpenTelemetry, span design, and SDK-level instrumentation for production systems.

AI Agent Evaluation Metrics Visualization and Reporting

Categorizing failures by root cause helps teams fix the right system instead of treating symptoms.

· 9 min read
Cover illustration for “AI Agent Evaluation Metrics Visualization and Reporting”
Agent Evaluation Frameworks · October 29, 2026 · 9 min read · 1,945 words

An agent that finished has not necessarily finished correctly. It can return a fluent answer after a failed tool call while its dashboard remains green. AI agent evaluation metrics, visualization, and reporting must expose that difference by comparing behavior with intent, then organizing failures into categories that route teams toward the right fix.

Why latency and token counts can't tell you what went wrong

Latency, token usage, and error rate describe execution. They remain necessary for understanding throughput and operational health, but they cannot establish whether an agent followed its instructions. Traditional application performance monitoring was built to detect crashes and slowdowns. A confident wrong answer can exhibit neither. The gap occurs when the software runs as it should but the agent fails at its task.

The plan may be right, but the tool returns a 500 and the agent proceeds as though the call succeeded, fabricating a plausible response. The tool failure and the agent failure are distinct. A record of the tool failure does not show whether the agent stopped, recovered, or kept going without evidence it could use. The notes’ documented multi-agent orchestration example ran for 47 days without a code change before a silent failure occurred, illustrating why stable code alone cannot establish reliable behavior.

Microsoft AI Red Team’s 2026 update documents another failure mode, goal hijacking, in which adversarial instructions appear aligned with legitimate task completion while silently redirecting the agent’s terminal goal. A conventional security scanner does not test that relationship between the assigned task and the goal actually pursued. The execution can look entirely normal from outside. If a metric cannot distinguish completing the intended task from completing the wrong task, it measures throughput. A useful reliability metric must therefore encode what the agent was supposed to accomplish.

How a failure taxonomy makes metrics meaningful

A failure category turns a measurement into a routing signal. Instead of reporting only that an output failed evaluation, it identifies the surface responsible and the location of the likely fix. The five useful surfaces are planning, tool use, retrieval, reasoning, and safety/policy. Each leaves a different trace fingerprint. Treating them as interchangeable encourages patches that hide symptoms without building protection against recurrence.

Planning errors appear as the wrong tool sequence, an infinite loop, or premature termination. Their fixes belong in the planner prompt and cycle detector. Tool errors instead appear as wrong arguments, tool hallucination, or unhandled error paths, directing attention to schema guards and retry policy. A correct plan followed by a failed tool call requires a different correction from a plan that selected the wrong sequence.

Retrieval errors include a wrong chunk, missing context, or a hallucinated source, with fixes in the retriever rubric and ingestion controls. Reasoning errors include factual mistakes, math errors, and ignored instructions, with fixes in the generator rubric and calibration set. Safety and policy violations can take the form of PII leaks, jailbreak compliance, and out-of-policy commitments. Their fixes belong in the output scanner and refusal eval. These categories connect evidence in a run to a specific corrective surface.

Microsoft’s v2.0 taxonomy expanded its catalog from 27 to 34 failure modes after twelve months of red team engagements against deployed agents. A static metric list will lag an evolving failure landscape, while an incident review without a category leaves no clear basis for a regression test. The next occurrence then becomes difficult to distinguish from a new problem.

What the trace actually needs to capture, and why most teams under-instrument it

Most teams instrument the model call. They capture LLM token counts and latency but miss the plan, tool, and retrieval spans needed to identify which surface broke. The trace must cover the plan-tool-retrieve-respond chain, linking intermediate decisions to the behavior that followed them. Otherwise, the evaluator sees an answer without the execution context needed to explain it.

A tool span needs arguments, the return value, the error code, and whether the agent proceeded after an unsuccessful response. The downstream action is essential to the diagnosis. Without it, a tool error cannot be distinguished from an unhandled tool error. A retrieval span also needs chunk identity, source, and evidence that shows whether the retrieved content matched the query intent. That context separates a retriever that supplied the wrong material from a generator that reasoned incorrectly over suitable material.

The plan and goal-progress spans provide another distinction. A monotonically climbing step count without goal advancement is the fingerprint of a planning loop, but it remains invisible without step-level evidence. Turn budget offers an earlier warning than the final outcome. As the executed span count approaches the session limit, the trace can signal model instability or an ineffective prompt before the failure becomes visible to the user.

The instrumentation implication is to sample AI agent traces at 100 percent. Sampling drops whole agent runs as well as individual calls, so a trace that was dropped cannot help explain an incident later. Completeness must include the run as well as its steps. Detailed model spans cannot fill in missing agent spans, and the traces kept cannot explain failures in runs that were dropped.

How to structure dashboards so failure categories route to the right team

An executive deciding whether an agent is economical does not need the same resolution as an engineer diagnosing a failed run. A three-tier structure shows the same evidence at the levels of detail needed by executive, operations, and engineering teams. Its purpose is not to create separate versions of reliability, but to connect each decision to the evidence it requires.

The executive tier uses Task Completion Rate and Cost per Successful Task to show whether the agent is doing its job economically. The operations tier uses Tool Call Success Rate, turn-budget hit rate, and failure-category distribution to show where things go wrong and how often. The engineering trace tier has individual span replay, plan-vs-execute divergence, and retrieval chunk audit. Category labels connect the operational pattern to the trace evidence and the corrective surface.

Failure-category distribution is the routing view many teams lack. A bar or trend chart separating planning, tool, retrieval, reasoning, and safety failures makes that distinction visible before triage begins. Consider the fintech scenario of an agent sending a promotional rate that did not exist to thousands of users. The relevant signal would be a policy-violation category in the safety/policy bucket, surfaced through evaluation before release to users. A latency chart would not expose the out-of-policy commitment.

Other operations metrics need equally careful interpretation. A high turn-budget hit rate points to looping or ineffective prompting as the cause of slow execution. Output Quality Score belongs at this tier only when its scorer understands the agent’s intent. Generic fluency is not a substitute for correctness. A fluent wrong answer can score well on coherence while concealing precisely the failure the dashboard is meant to reveal.

Eval gates: the mechanism that turns trace data into regression prevention

Visualization reveals a failure, but an eval gate makes that failure a condition future changes must avoid. The gate uses an automated scorer to grade behavior against what the agent was supposed to do. Without that connection, a dashboard can make a recurring failure highly visible without making it less likely to ship.

Pre-merge CI evaluation runs on every pull request against a curated test set, catching regressions before they ship. Pre-deploy evaluation applies the same scoring logic to staging traces, where realistic input distributions can expose failures that passed CI. These stages test different evidence against the same definition of correctness. Continuous production evaluation then runs scorers when live traces match a classification predicate. It covers failures from new user behaviors, novel attack inputs, and model version regressions that neither earlier stage could see.

Production evaluation is necessary because golden datasets grow stale. An agent can pass a high proportion of anticipated test inputs while failing on the majority of real traffic as the production distribution drifts. Model substitutions expose a related blind spot. A cheaper model variant may leave the pipeline returning success codes even though its outputs are no longer usable. Continuous evaluation, using the same scoring logic as CI, detects the quality drop that those codes conceal.

Examples curated from production failures and edge cases grow over the agent’s lifetime, making each incident a test case the next deployment must clear. A dashboard finding needs a named regression test in CI. CI, staging, and production can share scoring logic without needing three separate toolchains. The workflow implication is that developers should be able to diagnose the category, make the fix, and clear the regression gate without leaving their existing environment.

What good failure reporting actually looks like in practice

A useful failure report names four things, including the failure category, the trace fingerprint that identified it, the instruction the behavior deviated from, and the regression test added to CI. Together, these connect the observed event to a violated requirement and a future release check. The report is an artifact of prevention. A chat thread that never feeds a test may record the debugging effort, but it does not provide the same institutional memory.

For an unhandled tool error, the report would identify the category as “tool error / no-error-handling” and show that the agent continued after the failed call. It would also name the actual instruction violated, rather than infer correctness from the final answer’s tone. The regression test completes that chain of evidence. Repeated reports with this category accumulate coverage of the same failure surface. Labeling every such incident “hallucination” erases the distinction between faulty retrieval, reasoning, planning, and tool handling.

The category should originate in evaluation. When the scorer writes it at eval time and includes it in the trace, routing can already be established before incident review begins. Three traces that show plan-vs-execute divergence with the same tool combination point to a shared problem in the planner prompt, linking the three bugs to the same cause.

Trend reporting then shows whether the correction changed the failure pattern. A report stating “tool errors down 40% since schema guards were added, planning errors flat” would distinguish progress on one surface from an unresolved problem on another. That is more informative than a falling aggregate error count.

Why the gap between agent intent and agent behavior is the measurement problem that doesn't go away

Every layer of this reporting system depends on a representation of what the agent was supposed to do. The trace supplies behavior, the taxonomy classifies deviations, and the scorer compares execution with the governing instruction. None can substitute for the intended task. Without it, more detailed telemetry can describe a wrong execution more precisely while still failing to recognize that it was wrong.

This makes intent-aware measurement more than a configuration problem. Additional spans and better dashboard templates improve visibility, but they do not establish the standard against which behavior should be judged. The observability layer must audit traces against the agent’s own instructions. Goal hijacking makes the limitation especially clear. A record of actions alone cannot reveal that the agent’s terminal goal was silently redirected unless the evaluator also knows the goal it was meant to pursue.

The hardest cases often look correct at the surface. Fluent language, valid JSON, and the absence of an exception can coexist with a violation of the assigned instruction. Those failures erode user trust without triggering a conventional alert. Scoring against intent cannot remain an optional quality check. The lesson for teams building reporting infrastructure is to start from the agent’s instructions and work outward to traces, categories, metrics, and gates. Starting from available signals instead leaves the system best equipped to measure execution and least equipped to judge its purpose.

Sources

  1. Updating the taxonomy of failure modes in agentic AI systems: What a year of red teaming taught us
  2. Silent Failure in LLM Agent Systems: The Entropy Principle and the Inevitable Disorder of Autonomous Agents

More in Agent Evaluation Frameworks