By NHI Mgmt Group Editorial TeamBased on Braintrust: “How to evaluate LLMs and AI agents in production: The Braintrust way” (May 16, 2026)

TL;DR: AI quality improves when teams turn production traces into datasets, then use code-based scorers for deterministic checks and LLM-as-a-judge scorers for nuanced outputs, according to Braintrust. The core shift is from shipping AI on vibes to treating evaluation as infrastructure, because agent failures often only appear when tool use, retrieval, or synthesis breaks in production.


At a glance

What this is: This is a practical view of how production traces, datasets, and two scorer types can make AI evaluation measurable, with the key finding that trace-based testing catches regressions earlier and speeds iteration.

Why it matters: It matters because AI and agent programmes need controls that test behaviour before deployment, not just monitor outcomes after users encounter tool-selection errors, hallucinations, or retrieval failures.


Context

AI evaluation fails when teams rely on subjective judgement after deployment instead of structured tests before release. That gap becomes sharper for AI agents because their errors often emerge across multiple steps, including tool selection, retrieval, argument construction, and synthesis. For identity and governance teams, the deeper issue is control quality: if behaviour is only visible in production, the programme is already too late to prevent damage.

Trace-driven evaluation tries to close that loop by converting real production interactions into test cases and then scoring them consistently. In practice, that means the evaluation surface shifts from static prompts to live traces, which is where agentic systems actually fail. The governance question is not whether AI can be monitored, but whether the organisation can prove that a change improved behaviour before it is allowed into production.


Key questions

Q: What breaks when client-facing AI is only tested with single prompts?

A: Single-prompt tests miss behavioural drift, which is when a model stays compliant at the start of a conversation but becomes unsafe after several exchanges. That matters in regulated workflows because the model can gradually weaken disclaimers, overstep its role, or produce transactional language that would not appear in an isolated test.

Q: Why do trace-based evals reduce risk in AI and agent programmes?

A: They reduce risk because they make quality measurable before deployment and let teams replay the exact failure path that produced a bad result. That shortens the feedback loop, improves detection of regressions, and prevents silent degradation from reaching users. The benefit is governance as well as engineering: behaviour becomes auditable, not just observable after the fact.

Q: How do security teams know whether an agent evaluation process is working?

A: Look for evidence that evaluation results change decisions. If the team updates prompts, policies, datasets, or release criteria after a finding, the process is working. If scores only generate reports and never alter build choices, the evaluation function is decorative rather than operational.

Q: What is the difference between evaluating the final answer and evaluating agent steps?

A: Final-answer evaluation checks whether the outcome looks acceptable, while step evaluation checks whether the agent chose the right tool, passed the right arguments, and used the right context along the way. Both are necessary because a plausible final response can hide a bad internal decision. Step-level evaluation is what reveals where the workflow actually went wrong.


Technical breakdown

Why trace-based evaluation changes AI quality control

Trace-based evaluation treats each production interaction as evidence, not just telemetry. A trace captures the model call, any retrieval step, tool invocation, and the final output, which lets teams reconstruct the exact path from input to answer. That matters because AI systems are non-deterministic and multi-step, so a simple pass or fail test on the final response misses where the behaviour actually changed. By turning traces into datasets, teams can replay known failures, compare prompt variants, and validate whether a modification improved the underlying workflow rather than just the surface text.

Practical implication: Use production traces as the primary source of test cases so regressions are caught in the same execution path that users experience.

Code-based scorers versus LLM-as-a-judge scorers

Scorers are the measurement layer of an AI eval system. Code-based scorers work best when the requirement is deterministic, such as schema validity, format rules, length limits, or presence of citations. LLM-as-a-judge scorers are better for subjective qualities like tone, empathy, coherence, or whether an answer actually resolves a complex request. The key governance point is that these two scorer types serve different assurance needs. Deterministic checks keep the basics from drifting, while judge-based scoring handles quality dimensions that cannot be reliably reduced to exact string matching.

Practical implication: Separate hard checks from subjective quality checks so each failure mode is measured with the right control.

How agent evaluation exposes tool use and step-level failures

Agent evaluation is different from single-prompt testing because the failure may occur in planning, tool choice, parameter construction, or synthesis. That is why end-to-end scores alone are not enough. Teams need step-level traces that show each span in the workflow, because a bad outcome can come from one wrong tool call even when the final answer looks plausible. In an agentic system, the control problem is not only output quality but decision quality. If the wrong tool is called, or called with the wrong arguments, the system can fail silently before the user sees the result.

Practical implication: Evaluate both the full task and the intermediate steps so the organisation can isolate whether the failure is in planning, tools, or synthesis.


Threat narrative

Attacker objective: The practical objective is to induce failure that looks valid enough to pass review, thereby degrading trust in the AI system before the mistake is detected.

  1. Entry occurs when a prompt change, model swap, or retrieval adjustment alters the agent's decision path without being caught by pre-production tests.
  2. Credential or tool access is misused when the agent selects the wrong tool, constructs the wrong arguments, or consumes retrieval context that should have been excluded.
  3. Impact appears when the agent returns a plausible but wrong answer, silently regresses quality, or pushes a broken workflow into production.

Read and download The State of NHI & AI Agent Breach Report 2026, covering 200+ breaches impacting Non-Human Identities including AI Agents.


NHI Mgmt Group analysis

Trace-driven evaluation is becoming the control plane for production AI quality. Traditional software testing assumes deterministic behaviour, but LLMs and agents can fail in ways that only become visible after deployment. Turning production traces into datasets gives teams a way to measure behaviour where it actually occurs, which is why evaluation should be treated as infrastructure rather than a last-stage QA exercise.

AI evaluation debt is the new governance gap. When teams cannot score changes before release, they accumulate blind spots in model behaviour, tool use, and retrieval quality. That gap is especially acute for agentic systems because the failure is often procedural, not just textual. The practitioner consequence is straightforward: the longer evaluation stays manual or ad hoc, the more production becomes the test environment.

Trace-level visibility is essential for agent accountability. An agent does not just produce an answer, it executes a chain of decisions that may include tool calls, context selection, and synthesis. Without a replayable trace, the organisation cannot prove where the failure occurred or whether a change actually improved the workflow. For teams governing AI risk, this makes traceability a prerequisite for defensible release decisions.

Evaluation for agents is really decision-quality assurance. The core issue is not whether the output sounds polished, but whether the system chose the right tool, used the right context, and completed the right sequence of actions. That is a governance distinction that matters for identity, access, and security teams because agent behaviour can trigger real-world actions. Practitioners should therefore treat evaluation as a control over decisions, not just responses.

Agentic AI identity risk begins where evaluation ends. When a system can act through tools and external services, the question becomes who or what is authorised to do each step and how that behaviour is verified before deployment. This is where AI governance meets identity governance: the organisation needs proof that delegated actions are constrained, observable, and testable. For practitioners, that means aligning eval design with access governance from the start.

From our research library:

What this signals

Evaluation debt will become a deployment risk for agentic systems. Teams that cannot replay production traces before release will keep discovering quality failures after users do. That shifts AI governance from a model-management problem into a release-control problem, which is where identity, access, and auditability start to matter for agent behaviour.

Traceability is now part of AI control assurance. If an organisation cannot show how a tool-using system reached a decision, it cannot credibly defend its quality controls. The practical implication is that trace-level logging and reproducible evals need to sit alongside policy, monitoring, and access governance, not behind them.


For practitioners

  • Build production traces into test datasets Capture real agent interactions, tag failures, and promote those traces into repeatable eval cases so regressions are tested against actual workflows.
  • Separate deterministic and subjective scoring Use code-based scorers for format, schema, and factual checks, then use LLM-as-a-judge scorers for tone, coherence, and other nuanced qualities.
  • Test both end-to-end and step-level behaviour Measure the final outcome and each intermediate span, including tool selection, argument construction, retrieval relevance, and synthesis quality.
  • Gate releases on replayable failure cases Replay the same low-scoring traces before deployment and block changes that improve one metric while creating regressions in a critical workflow.

Key takeaways

  • Production AI testing needs to move from prompt-only checks to trace-based evaluation if teams want to catch regressions before users do.
  • Agent systems require both deterministic scoring and subjective judgement because tool use, retrieval, and synthesis fail in different ways.
  • The governance shift is from reviewing outputs after the fact to proving that every release improves the underlying workflow.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

OWASP Agentic AI Top 10 addresses the attack and risk surface, while NIST AI RMF and NIST CSF 2.0 set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
OWASP Agentic AI Top 10ASI03 — Identity & Privilege AbuseAgent evaluation here is about controlling tool use and delegated actions inside production workflows.
ASI08 — Cascading FailuresMulti-step agent workflows can fail across planning, tools, and synthesis, creating chained regressions.
Recommendation — Test agent actions against identity and privilege boundaries before allowing changes into production. Break complex agent workflows into replayable steps and validate each dependency separately.
NIST AI RMFMEASURE — Measure AI SystemsThe article centers on measuring AI behaviour through evaluative scoring and trace replay.
Recommendation — Define measurable quality criteria and monitor whether changes improve or degrade system behaviour.
NIST CSF 2.0GV.OV-01 — Oversight of cybersecurity riskTrace-based evaluation is an oversight control for production AI and agent releases.
PR.AA-05 — Access Permissions, Entitlements and AuthorizationsAgent tool use is bounded by entitlements and authorization decisions that should be validated in testing.
Recommendation — Establish oversight for AI release gates so production changes are reviewed against defined evidence. Verify that agent permissions match intended task scope before deployment.

Key terms

  • Trace-Based Evaluation: An evaluation approach that records the full execution path of a run, including inputs, intermediate calls, retrieved context, and outputs. It helps teams debug multi-step AI systems by showing how a result was produced, not just whether it looked correct.
  • LLM-as-a-judge: A control pattern where one language model evaluates another model's prompts, tool calls, or outputs against policy. It is not content moderation alone. In practice, it acts as a runtime decision layer that can allow, block, redact, or escalate based on semantic context and organisational rules.
  • Production Tracing: Production tracing records an agent’s full execution path, including tool calls, retries, and intermediate states. It gives teams evidence about how the system reached a result, which is essential for debugging, evaluation, and governance when final outputs alone do not explain behaviour.
  • Agentic workflow: An agentic workflow is a sequence of tasks executed by an AI agent with some level of tool access and decision authority. In security terms, the workflow matters because it can span multiple systems, identities, and permissions, which makes attribution and revocation harder than with ordinary automation.

Deepen your knowledge

The NHI Foundation Level course, the industry's only accredited NHI security programme, covers NHI governance, agentic AI identity, and machine identity security. It helps security and identity practitioners build the governance baseline needed for modern AI-driven programmes.
NHIMG Editorial Note
Published by the NHIMG editorial team on August 20, 2026.
Updated on October 12, 2026.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org