DEV Community

Cover image for The eval illusion: why passing tests doesn't mean safe in production
Babar Hayat for OpsVeritas

Posted on

The eval illusion: why passing tests doesn't mean safe in production

You built an AI agent. The reasoning holds up — your eval suite checks that it picks the right tool for each task, chains them logically, recovers from a bad step. Scores are high. You ship it.

Three days later, a customer says the agent returned a successful response and did nothing. No errors in the logs. Your monitoring flags something odd though: output tokens dropped to zero while input tokens looked totally normal. A silent failure your evals never had a chance to catch.

That's not a hole in your eval strategy. It's a different category of problem entirely.

Evals test reasoning in a controlled environment. Does it pick the right tool? Does it combine tools correctly? Does it recover when something looks wrong? Yes, mostly — because it's running with fresh context, clean input, and nothing else competing for its attention.

The reliability stack tests what happens once that same agent is loose in the real world. Did it actually execute what it decided to do? Did the output match what the model claimed? Did it quietly loop when a tool failed? These aren't reasoning questions. They're runtime questions, and evals were never built to answer them.

What evals miss

Evals run under close to ideal conditions — fresh context, known inputs, tools that behave the way you mocked them, one clean execution path.

Production runs under none of that. APIs time out at random. Rate limits show up mid-run. Real users send things your training data never saw. Context balloons across hundreds of runs. And sometimes the agent just quietly retries a failing tool call, over and over, with nothing logged as an error.

Here's a concrete version of that: your eval tests an agent that fetches user data from an API and summarizes it. It passes clean. In production, that API is slow one day. The timeout fires, the model reads that as a failed call, and decides to retry. Then retries again. Thirty attempts and 120,000 tokens later, it gives up and returns nothing — but logs "success" the whole way through, because technically nothing errored.

Your evals never saw a slow API. They never saw a third retry. They definitely never logged what the agent does when it finally gives up.

What the reliability stack actually watches

A few signals fill that gap, and none of them come from an eval suite:

Silent failures show up as a mismatch between input and output tokens — normal input, near-zero output means the agent processed the request and produced nothing.

Latency anomalies show up when success stays green but timing spikes. That's almost always a loop or a retry burning time in the background.

Token drift shows up when the same task starts costing more tokens over time on the same agent — usually prompt bloat or state quietly accumulating.

Cost spikes are the most obvious canary. A 10x jump in cost per run is rarely a coincidence.

And execution paths — which tools actually got called, in what order, did they all succeed — tell you whether the agent's recovery logic works under real failure, not just the happy path you tested.

Why this matters

The gap between shipped and safe isn't a code quality problem. It's an observability problem.

A well-reasoned agent with a clean eval score can still loop forever on a timeout, return silent success while doing nothing, or spike cost 100x from one bad retry cascade. None of those are logic errors — they only show up once the agent meets a messy, real execution environment.

Your evals proved it can reason. Something else has to prove it can run safely.

Getting started

You don't need to rebuild the agent or the eval suite. You need visibility into execution itself: wrap the LLM client so every run logs tokens, latency, cost, and output length. Run it long enough to know your baselines. Alert when something drifts from them. Log which tools actually got called and what happened when one failed.

Evals and the reliability stack aren't competing with each other. One proves the agent can think. The other proves that thinking survives contact with production.

Top comments (0)