INSIGHTS / AIOPS
Evals are the spec: how to know your AI feature actually works
A demo that looks good tells you very little. How we build evaluation suites that catch regressions before users do, including for agents that take actions.
Most AI features ship on the strength of a demo. Someone tries twenty questions, the answers look sensible, and the feature goes live. A few weeks later a prompt tweak or a model upgrade quietly makes one kind of answer worse, and nobody notices until a customer does. Traditional software has automated tests to catch this. AI features need the same thing, and the industry name for it is evals.
An eval suite is the closest thing an AI feature has to a specification. It writes down what good looks like, in a form a machine can check, so every change can be judged against it. This article describes how we build them on client projects, and the mistakes we see most often.
What an eval actually is
An eval has three parts. A set of inputs that represent the work the feature will really do. A definition of a good output for each one, which might be an exact expected answer, a list of facts that must appear, or a scoring rubric. And a scorer that compares what the system produced with that definition and records the result.
Run together, those parts behave like a test suite. Change the prompt, swap the model or adjust how documents are retrieved, then run the suite and compare the scores with the last run. Because AI outputs vary, the results are rates rather than simple passes and fails: 94% of cases met the bar last week, 89% this week, and here are the eleven cases that got worse.
Build the dataset from reality
The dataset is where most of the value sits, and where most teams cut corners. Questions written by the people who built the feature tend to be questions the feature already handles. Start with real inputs instead: support tickets, search logs, documents from the actual archive, transcripts from the pilot. Fifty to a hundred well-chosen cases is enough to begin, as long as they cover the common requests, the awkward edge cases your domain experts warn you about, and the inputs the system should refuse.
Every failure found in production becomes a new case. Over time the dataset turns into a record of everything the feature has ever got wrong, which is exactly what you want to check before the next release. Version it alongside the code. Keep a held-out portion that nobody tunes prompts against. Review it every few months so it keeps reflecting how people really use the feature.
Score in layers
We score in three layers, cheapest first. Deterministic checks come first. Is the output valid, are the required fields present, did it stay under the length limit, did it avoid an action it must never take? These cost almost nothing to run and catch a surprising share of regressions. Next come model-graded checks, where a second model scores each output against a written rubric. Score each criterion separately (accuracy, completeness, tone, whether it cited a source) instead of asking for one overall grade. A single grade hides which part got worse.
A model grader is only useful if it agrees with people. Before relying on one, have domain experts label a sample of outputs and compare their scores with the grader's. Where they disagree, rewrite the rubric until they don't. Then keep a small amount of human review running permanently: a weekly sample of real outputs read by someone who knows the domain. That layer catches the problems nobody thought to write a check for.
Evaluating agents
Agents need more than a check on the final answer, because an agent can reach the right answer the wrong way. It might call a tool it shouldn't have, take fifteen steps when three would do, or skip the point where it was meant to stop and wait for approval. So we score the path as well as the result: which tools were called, in what order and with what inputs, how many steps it took, and whether every action that needed a human sign-off actually got one.
On the industrial IoT monitoring platforms we build, each agent runs against a library of fault scenarios drawn from real incidents. That library does more than catch regressions. If an agent gives the same verdict for a whole class of sensor patterns every time, the judgement has become a rule, and that step can be replaced with ordinary code. Evals tell you where AI is needed as well as whether it works. We wrote about that dividing line in multi-agent architectures that survive production.
Run them everywhere
Evals belong in three places. In the build pipeline, so every change to a prompt, model or retrieval setting runs the suite, and a drop below the agreed bar blocks the release. As the gate for model upgrades, so a new model version is adopted when the scores show it does better on your own work. Public leaderboards measure someone else's work. And in production, where a sample of live traffic is scored continuously so drift shows up on a dashboard before it shows up in complaints.
Track cost and latency in the same report as quality. A change that adds two points of accuracy and doubles the cost per request is a business decision, and the people making it need both numbers side by side. This is also how savings become safe to take: if a smaller model or a shorter prompt holds the quality bar, you have the evidence to switch. Our article on the real cost of running AI features covers the cost side.
The mistakes we see most
Vibe checks, where someone tries a handful of prompts and declares the new version better. Public benchmark scores used as a stand-in for performance on your own data. One aggregate score that hides a collapse in a category that matters. Tuning prompts against the same cases you report results on, until the suite measures memorisation. And model graders that were never checked against human judgement, which can drift as quietly as the system they're grading.
None of this needs a large platform to start. A spreadsheet of cases, a script that runs them and a written rubric will take a team further than most production AI systems go today. What matters is deciding, before the next change ships, what good looks like and how you will know if you've lost it.