Skip to content
Field Notes · No. 05

Agent Evals That Show When Your AI Agent Is Getting Worse

by Laith Al-Saadoon6 min read

Updated

  • Evals
  • Regression
  • Quality

An agent can still complete the task while taking more steps, spending more, or making riskier decisions. The evaluation tools I reviewed address two different problems: catching regressions before a release, and detecting bad output during a run. Both loops need a way to turn observed failures into repeatable tests.

The teams that only run offline evals ship blind. The teams that only run in-flight critics can’t tell if Tuesday’s deploy was worse than Monday’s. You need both loops, and production failures must feed back into the offline dataset. That closed loop is the difference between an agent that degrades silently and one that gets better every week.

Measure the path, not just the answer #

LangChain published its methodology for evaluating what they call “Deep Agents,” agents that sustain multi-step work across tools, files, and long-running sessions.1 The contribution that jumped out was the ideal trajectory. For any given task, record the minimum steps, tool calls, and wall-clock seconds needed by the best model you’ve observed. Score every subsequent run against that baseline using ratios.

Consider a task like “What is the current time and weather where I live?” The ideal path is 4 steps, 4 tool calls, ~8 seconds with parallel execution. An agent that solves it in 6 steps, 5 calls, 14 seconds scores a step ratio of 1.5 and a latency ratio of 1.75. Both solutions are correct, so binary evals see two passes, while trajectory evals see a 75% latency regression.

The question is whether the agent is getting the right answer less efficiently than it used to. Binary pass/fail cannot detect that regression, and it compounds into user-visible slowness.

LangChain pairs trajectory metrics with behavior-category tagging. Every eval gets a label (file_operations, retrieval, tool_use, memory, conversation, summarization), so when a model update degrades performance, you see which category regressed rather than debugging a flat number.1 Data sources are three channels: dogfooding feedback (production errors become evals), benchmark adaptation, and hand-written tests for specific behaviors.

•   •   •

Two complementary evaluation loops #

LangChain’s approach is one half of the picture. It’s an offline loop with fixed datasets, run in CI, that blocks the PR if scores drop. The other half is the in-flight critic, real-time evaluation that catches bad output before it reaches the user.

Anthropic frames the distinction cleanly.2 Offline evals give you faster iteration, full reproducibility, and zero user impact. Online monitoring reveals real user behavior at scale and catches issues your test set never imagined. The gap between the two loops is where agents fail silently, with 95% accuracy on your eval suite while production users encounter query patterns you never tested.

The teams that only run offline evals ship blind. The teams that only run in-flight critics can’t tell if Tuesday’s deploy was worse than Monday’s.

The recommended architecture, convergent across Anthropic, McKinsey/QuantumBlack, Braintrust, and a January 2026 arXiv survey on agent systems:2345 automated offline evals on every commit (CI gate), production monitoring with real-time scoring (in-flight), and a closed loop where production failures feed back into the offline dataset. McKinsey/QuantumBlack describes the in-flight layer precisely: “The critic validates the producing agent’s output against the definition of done, returning pass/fail with explanation. If the output is rejected, the producing agent iterates until the artifact passes.”3 They cap iterations at 3–5 attempts to prevent infinite loops.

•   •   •

Choose a framework for the failure you need to see #

The framework landscape is fragmenting by paradigm rather than by language.

DeepEval (v3.9.3, released March 25) is the most complete open-source option, with 50+ metrics, pytest-native tests, and an Apache-2.0 license.6 Its differentiating innovation is the DAG metric: LLM-powered decision trees built from TaskNodes, BinaryJudgementNodes, and VerdictNodes that produce deterministic scores. This solves G-Eval’s non-determinism problem. The same input produces the same score across runs because the evaluation follows an explicit decision graph rather than a single-pass LLM judgment.

RAGAS remains the de facto standard for RAG-specific evaluation, built on the RAG Triad: query–context, context–response, query–response.7 Its diagnostic power is precise: high faithfulness + low relevance isolates retrieval as the bottleneck; low faithfulness + high relevance isolates generator hallucination. Three of four core metrics are reference-free, so no human-labeled ground truth is needed.

PydanticAI takes a different angle entirely.8 Instead of evaluating the agent’s trajectory as a sequence of decisions, it evaluates individual OpenTelemetry spans in the execution trace. Span-based evaluators see the full span tree for each test case, asserting on latency per span, token usage per span, and error rates at specific execution stages. The integration with Pydantic Logfire means eval assertions and production telemetry share identical instrumentation. The same spans you evaluate offline are the same spans you monitor in production.

•   •   •

DSPy inverts the whole model.9 In most frameworks, the workflow is: write prompts, run evals, see what failed, manually tweak, repeat. DSPy collapses steps two through four into automated compilation. You define a typed Signature (inputs → outputs), compose it into a Module, define a metric function, and the Optimizer runs 100–500 LLM calls to test prompt variations, keeping only those that numerically improve the score. Evaluation becomes the optimization signal itself. Compilation costs $20–50 per complex pipeline and takes 10–30 minutes. When a provider releases a model update that breaks your hand-crafted prompts, you recompile.

Then there’s the acquisition signal. OpenAI bought Promptfoo on March 9 for an undisclosed sum. The 11-person startup was valued at $86M after its July 2025 Series A, had raised $23M total, and claimed adoption by 25%+ of Fortune 500 companies and 350,000+ developers.1011 Promptfoo’s specialty is model-agnostic red-teaming and security testing: prompt injection, data leakage, jailbreaks, tool misuse. It’s being integrated into OpenAI Frontier, the enterprise agent platform launched February 5. When the largest model provider acquires the leading security testing tool, it shows where the eval conversation is heading, from accuracy to safety.

•   •   •

Two newer entrants are worth watching. Mastra (Y Combinator W25, $13M, TypeScript-first) shipped first-class evaluation primitives in February 2026, with versioned Datasets that use SCD-2 item-level versioning and runnable Experiments with configurable scorers.12 The SCD-2 versioning means each test case update creates a new version while preserving history, so you can track how your expectations evolve alongside agent capabilities. Vercel’s agent-eval benchmarks coding agents (Claude Code, Codex) in sandbox isolation, with the critical design choice that the agent never sees the test assertions during execution.13 Their data produced a counterintuitive finding. An 8KB docs index in AGENTS.md achieved a 100% pass rate where active skill retrieval topped out at 79%. Static context beat active retrieval for reference knowledge tasks.

Turn failures into regression tests #

Across all seven frameworks plus the acquisition, the eval conversation is maturing from “does it work?” to “is it getting worse?” to “is it safe?” The architecture converging is two loops: offline regression to catch what you anticipated, in-flight critics to catch what you didn’t, and a feedback mechanism that turns the second into the first.

References #

  1. 1 LangChain, “How we build evals for Deep Agents”, March 26, 2026
  2. 2 Anthropic, “Demystifying Evals for AI Agents”, January 9, 2026
  3. 3 McKinsey / QuantumBlack, “Agentic Workflow Architecture”, February 2026
  4. 4 Braintrust, Evaluation Guides, 2026
  5. 5 Wang et al., “AI Agent Systems: A Survey,” arXiv, January 2026
  6. 6 DeepEval, DAG Metrics Documentation, v3.9.3, March 25, 2026
  7. 7 Es et al., “RAGAS: Automated Evaluation of Retrieval Augmented Generation”, arXiv:2309.15217
  8. 8 PydanticAI, Evals Documentation, 2026
  9. 9 DSPy / StanfordNLP, GitHub Repository, 33.2K stars, March 2026
  10. 10 TechCrunch, “OpenAI acquires Promptfoo to secure its AI agents”, March 9, 2026
  11. 11 Forbes, “OpenAI Acquires Promptfoo To Embed Security Testing Into Its Agents”, March 10, 2026
  12. 12 Mastra AI, Changelog 2026-02-13: @mastra/core 1.4.0 Datasets and Experiments, February 13, 2026
  13. 13 Vercel, @vercel/agent-eval Repository (vercel-labs/agent-eval), January 2026

The next question is what these failures cost across a fleet. Yield engineering connects evaluation results to useful work delivered.

All Frontier Field Notes