By NHI Mgmt Group Editorial TeamDomain: AI SecuritySource: BraintrustPublished 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 framework for evaluating LLMs and AI agents in production, built around traces, datasets, and scorers, with the key finding that systematic evals can speed delivery rather than slow it.

Why it matters: It matters because AI teams now need repeatable governance for agent behaviour, not just model testing, and identity teams must understand when tool use, access decisions, and output quality become operational risk.

👉 Read Braintrust's guide to evaluating LLMs and AI agents in production


Context

AI evaluation breaks down when teams rely on subjective impressions instead of repeatable measurement. In production AI systems, especially LLMs and agents, a prompt change or model swap can alter tool choice, retrieval quality, or output correctness without any clear signal until users see the failure. That is a governance problem as much as an engineering problem, because poor evaluation lets risky behaviour move downstream into live workflows.

The identity angle is real when agents act on behalf of users, call tools, or touch sensitive data. Once an AI system can choose actions at runtime, the question becomes not just whether it is accurate, but whether its access, decision paths, and outputs are sufficiently bounded and observable. That makes evaluation part of broader AI governance, and in some environments, part of identity and privilege control.

Braintrust's starting point is typical of teams that have moved beyond simple demos but not yet built durable evaluation loops. The underlying issue is common across AI programmes: development speed rises faster than the organisation's ability to verify quality.


Key questions

Q: What breaks when AI prompts are changed without evaluation?

A: The system may appear to work in a demo while silently degrading in production. Prompt changes can alter retrieval behaviour, output tone, or decision quality in ways that are hard to spot without comparison runs and scored datasets, which makes regressions harder to detect and explain.

Q: Why do AI agents need step-level evaluation as well as end-to-end testing?

A: End-to-end success can hide fragile behaviour in the middle of the workflow. Step-level evaluation shows whether the agent chose the right tool, built the right arguments, and used the tool output correctly. That matters because a poor intermediate decision can create risk even when the final answer appears acceptable.

Q: How do security teams know if automated AI evaluation is actually working?

A: Look for stable agreement with human reviewers, low sensitivity to answer order, and consistent scores across repeated tests on the same inputs. If the judge’s output moves when presentation changes or drift appears after model updates, the evaluation control is no longer trustworthy enough for production use.

Q: How should organisations govern external tools used by AI agents?

A: Organisations should review external tools as security inputs, not convenience features. Each tool needs ownership, approval, metadata inspection, and ongoing monitoring for hidden instructions or unexpected behaviour. If an AI agent can act on a tool, then the tool’s provenance and control status should be governed like any other sensitive integration.


Technical breakdown

Why trace-driven evaluation changes AI development

Traditional software testing assumes deterministic behaviour. LLMs and agents do not behave that way, so the same input can produce different outputs depending on model choice, retrieval context, or tool availability. Trace-driven evaluation captures each step of execution, including prompts, tool calls, retrieval spans, and final responses, so teams can replay the exact path that led to a result. That turns production incidents into reproducible test cases and makes regression analysis possible before deployment.

Practical implication: instrument agent traces so every production failure can become a reusable evaluation case.

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

Scorers are the measurement layer of an eval system. Code-based scorers are best for deterministic checks such as schema validity, length limits, required fields, or exact factual matches. LLM-as-a-judge scorers are used when the quality criterion is subjective, such as tone, usefulness, or reasoning quality. The design challenge is to keep each scorer specific, measurable, and narrow enough that it reflects a single success criterion rather than a vague overall impression.

Practical implication: use deterministic scoring wherever possible, and reserve model-based judging for genuinely subjective criteria.

How agent evaluation differs from single-prompt testing

Agents need two layers of scrutiny. End-to-end evaluation checks whether the full task succeeds, while step-level evaluation checks whether the agent chose the right tool, built correct arguments, and handled tool output appropriately. This matters because a task can appear successful even when a sub-step is fragile, and a visible failure can originate from a single bad retrieval or incorrect tool parameter. Trace granularity is what lets teams isolate that difference.

Practical implication: score both task completion and intermediate decisions before you let agent changes reach production.


NHI Mgmt Group analysis

Trace-based evaluation is now a governance control, not just an engineering practice. AI programmes that cannot replay production behaviour cannot reliably explain why an agent chose a tool, exposed an output, or degraded in quality. That leaves reviewers with symptoms instead of evidence. For identity and security teams, the practical takeaway is that traceability has become part of AI governance, because runtime decisions are where policy is either enforced or bypassed.

Evaluation debt is the AI equivalent of control debt. When teams ship prompt changes without reproducible scoring, they accumulate hidden risk in the same way that unreviewed access grows into entitlement sprawl. Braintrust's core message is that evaluation loops should be built into the delivery path, not bolted on after defects appear. Practitioners should treat missing eval coverage as an operational gap, not a documentation issue.

AI agents need step-level accountability because end-to-end success can hide unsafe behaviour. An agent can complete a task while still making poor tool choices, leaking context, or taking an inefficient path that weakens trust. That matters for IAM-adjacent workflows where the agent's access path and execution path are both security concerns. The control objective is not only outcome quality, but bounded decision-making.

Measurement for agents is converging with identity governance. Once an agent can query data, call tools, and act across systems, it behaves like a non-human identity in practice even if the article frames the topic as evaluation. That is where AI quality management and access governance overlap. Security teams should treat agent evaluation results as evidence that informs privilege scope, tool permissioning, and release gating.

Evaluation is becoming the condition for scale, not the cost of scale. The teams that move fastest are the ones that can prove a change helped before it reaches production, and that is as true for AI systems as it is for identity programmes. The organisations that build this discipline early will have fewer blind spots when agents become more capable and more widely deployed.

What this signals

The evaluation discipline described here will increasingly shape whether AI programmes can be governed at all, because production traces are becoming the evidence layer for quality, safety, and control decisions. Teams that cannot measure agent behaviour at step level will struggle to justify expanding tool access or automating more workflows.

Evaluation debt: the gap between shipping AI features and proving they behave safely enough to keep them in production. As agents take on more operational work, this debt begins to look like an access governance problem as much as a development problem.

Practitioners should expect AI release management to borrow more from IAM and PAM style controls, especially where agents can invoke tools, query sensitive systems, or trigger downstream actions. The practical question is no longer whether AI can work, but whether it can be measured tightly enough to trust.


For practitioners

  • Instrument every production trace Capture prompts, retrieval spans, tool calls, and final outputs so each AI interaction can be replayed as a test case when quality drops or behaviour changes.
  • Define separate scoring rules for deterministic and subjective quality Use code-based scorers for schema, format, and factual checks, then apply LLM-as-a-judge scoring only to qualities such as clarity, tone, or reasoning.
  • Score agent steps, not just final answers Evaluate tool selection, argument construction, and handling of tool output independently so a successful final answer does not hide a risky intermediate decision.
  • Feed low-scoring traces back into the eval dataset Tag failures from production, add them to offline datasets, and rerun the same scenarios before deployment so regressions are caught in a controlled environment.

Key takeaways

  • AI evaluation is moving from a development convenience to a governance requirement as agents begin to make more runtime decisions.
  • Production traces, step-level scoring, and controlled feedback loops are the difference between measurable improvement and shipping on guesswork.
  • As agent deployment accelerates, teams will need evaluation evidence before they can justify broader tool access or production release.

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 and MITRE ATLAS address the attack and risk surface, while NIST AI RMF, NIST CSF 2.0 and NIST SP 800-53 Rev 5 set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
OWASP Agentic AI Top 10The article focuses on agent evaluation, tool use, and runtime behaviour in agentic systems.
NIST AI RMFMANAGEThe piece is about operationalising AI risk controls in production workflows.
MITRE ATLASTA0006 , Credential Access; TA0008 , Lateral MovementAgent tool use and runtime execution can create attack paths that mirror adversarial AI behaviour.
NIST CSF 2.0GV.RM-03AI evaluation supports risk management and governance decisions across production systems.
NIST SP 800-53 Rev 5SI-2The article's regression-testing logic aligns with controlled change management and defect handling.

Document evaluation coverage as part of risk management and tie release approval to scored evidence.


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.
  • Agent step-level evaluation: The practice of measuring each decision an AI agent makes during execution, not just the final answer. It helps reveal whether tool selection, parameter construction, retrieval use, and output synthesis are working correctly, which is essential when failures can occur at multiple points in a workflow.

What's in the full article

Braintrust's full article covers the operational detail this post intentionally leaves for the source:

  • The exact data, task, and scorer pattern used to structure evals for production AI systems.
  • Concrete examples of how trace logs are turned into datasets and reused in offline testing.
  • The workflow for combining human review with automated scoring in AI product teams.
  • The practical mechanics of agent evaluation across tool choice, argument quality, and output synthesis.

👉 The full Braintrust article shows how trace-driven evals, scorer design, and agent debugging fit into one workflow.

Deepen your knowledge

NHI Foundation Level course, the industry's only accredited NHI security programme, covers NHI governance, machine identity security, and secrets management. It helps security practitioners connect runtime access decisions to broader identity controls and release discipline.
NHIMG Editorial Note
Published by the NHIMG editorial team on August 20, 2026.
NHI Mgmt Group — the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org