← All writing

Evals Before Vibes

How we replaced "it feels better" with an eval system for a production AI agent, and what it changed about who could ship a prompt.

· 6 min read · ai

TL;DR

  • We judged a production AI agent's prompt changes by eye. That doesn't scale.
  • An eval system fixed it with four parts: a golden dataset, standard scores, custom checks and a trigger anyone can pull.
  • The custom checks caught what review missed. One run scored 5/5 everywhere and still had 1 bad citation in 12.
  • The biggest win wasn't accuracy. It was letting the PM test a prompt without an engineer.

"Looks good to me!" in the AI era

We built an AI agent that researches a company and writes an account plan for a sales team:

  • financials
  • recent news
  • competitors
  • the people worth knowing

The output went straight onto a canvas that real account teams used to research their customers.

Every week someone wanted to improve the prompt. The PM had customer feedback. An engineer had an idea for the financial section. Every change got the same review:

  1. Run it on a company or two.
  2. Read the output.
  3. Decide whether it felt better.

That review has three problems:

  1. It's anecdotal. One good run on one company says little about the next fifty.
  2. It can't see regressions. A better news section can quietly break the citations. Nobody reads closely enough to notice.
  3. It needs an engineer. The PM had the best sense of what "good" means, but couldn't test a change without a developer.

We were judging an agent's output by vibes. So we built an eval system to replace them.

What an eval is

An eval is a test for output you can't assert exactly.

  • You can't write expect(summary).toEqual(...) for an LLM.
  • You can check that it did what it was asked, used the right tools, stayed relevant and cited real sources.

If you're new to this, start with Hamel Husain's Your AI Product Needs Evals and Anthropic's guide to defining success criteria and building tests.

Ours came down to four parts.

1. A golden dataset

  • Five public companies, one each from consumer goods, media, tech, agriculture and insurance.
  • Different shapes on purpose. A media company's news looks nothing like an insurer's financials. A prompt that only works for one isn't a good prompt.
  • Small but stable. Every run against the same five is comparable to the last.
  • The golden run lives in git, next to the eval code. Reviewers diff a new run against it, not against someone's memory.

2. Standard scores for the obvious things

Off-the-shelf evaluators use a second model as the judge (LLM-as-a-judge). We used Azure AI Foundry's, which score 1 to 5:

EvaluatorQuestion it answers
Intent resolutionDid it understand what was asked?
Task adherenceDid it do that task, not another one?
RelevanceIs the output about this company?
Tool call accuracyDid it call its tools with sensible arguments?

Cheap to adopt. Also generic. They can't check the rules that matter most for your product.

3. Custom checks for the rules that matter

Two rules were non-negotiable, so I wrote custom evaluators for them:

CheckRuleScore
Required tool callCall the research tool before writing. Skipping it means writing from the model's memory: confident, and maybe a year out of date.Pass / fail
Citation validityEvery cited source must be one the agent actually retrieved.% of citations that check out

The custom checks found more real problems than the standard scores did.

4. A trigger anyone can pull

  • Prompts lived in our CMS, not in code.
  • Publishing a prompt sent a webhook that started an eval run.
  • The run used the real pipeline: same tools, same data, same output formatting as production, with an eval flag set.
  • No laptop. No special branch. No engineer.

This part mattered most. Prompt changes went from "ask a developer" to "publish, wait, read the scores."

What it caught

The 5/5 run that wasn't.

  • A prompt change scored a perfect 5 on intent, tool use and relevance. I was ready to call myself a prompt engineer.
  • The same run scored 92% on citation validity. About 1 citation in 12 pointed at something the agent never retrieved.
  • No human review would catch that. Reviewers see footnotes and move on. Nobody opens every source.

The boring fix that worked.

  • The financial prompt asked for "key financial information."
  • I rewrote it to name the exact fields the research tool returns.
  • The model stopped reaching for half-remembered numbers and used the ones it was handed.
  • The scores showed it was better. Before evals, I'd have been guessing.

What I'd do differently

  1. Use one scale. Our PM asked: why does one check pass at 1.0 and another at 5? Mixed scales mean every reader needs a cheat sheet. Normalize to pass/fail plus a percentage before anyone else reads a report.
  2. Write the process down before handing it over. A system one engineer can run is a bottleneck with extra steps. I documented how to trigger a run, read results and change a prompt, then walked the team through it. After that:
    • the PM tested changes without me
    • one engineer updated the citation check when the output format changed
    • another sent the scores to our dashboards in Datadog
  3. Don't over-automate early. I spent a while chasing infrastructure so evals could run unattended in a shared environment. It needed another team's time, and it wasn't the bottleneck. The trigger-and-read loop delivered most of the value months earlier.
  4. Start smaller than feels respectable. Five companies and six checks felt too thin. They were enough to turn "I think it's better" into "intent held at 5, and citations are at 92%." That sentence wins arguments vibes can't.

The takeaway

Evals aren't really about the model. They're about who decides what "better" means, and how they prove it.

  • Before: the people closest to the customer had opinions. Engineers had the keys.
  • After: everyone saw the same numbers on the same five companies. A prompt change was an experiment, not a debate.

I've kept the habit since. On my current project, a change to how meeting notes are summarized ships with an eval run in CI, and it has to show a measurable improvement before it merges. It's slower than vibes for about a week. Then it's faster, because you stop re-arguing the same changes.

Further reading

Evals Before Vibes · Maxwell Kendall