All guides

My evals lied to me. Here's how I pick AI models anyway.

To choose an AI model, test it on your own real questions and compare accuracy, latency and cost together. Nine rules for evals that don't lie, each with the mistake that taught it and something to try this week.

Gabriel MongaloDecember 3, 20268 min read

Gabriel Mongalo is an AI engineer in Phoenix with 10+ years shipping production software. He runs Southern Sun, an AI consulting practice serving Phoenix-area businesses in person and US businesses remotely.

A new model ships every other week, and each one is faster, cheaper or smarter on somebody's leaderboard. The question that lands on your desk is always the same: should you switch?

A leaderboard can't answer that. It doesn't know your users, your data, or what a wrong answer costs you. I build and test AI features that answer questions about people's own records. There, a wrong count isn't a quirky AI moment. It's someone looking for a thing you told them they don't have.

So I build evals, and they've lied to me more than once. Below are the nine rules I now follow, each with the mistake that taught it and something you can try on your own system this week.

None of it starts from a blank page. The backbone is the three-layer framework from Airbnb's Eval-driven development post: code checks what code can know, LLM judges handle what needs interpretation, and people decide what "good" means. Pydantic's Do evals the Airbnb way shows how to build it, and Anthropic's Demystifying evals for AI agents gives the vocabulary.


1. Read your traces before you write a test

Airbnb calls this the one rule: "When in doubt, look at your data." Run your system on about a hundred examples, read the traces, sort the mistakes, and only then write evaluators.

I'd read that. I learned it when a bug ticket arrived with a root cause and a fix ready to go. An answer was showing the wrong field, and the ticket blamed a column missing from the data. One real production trace showed the column was always there. The fix would have changed nothing, and the test written for it would have passed with the bug still live.

Tests written from a ticket check the failures you imagine. Tests written from traces check the failures that happened.


2. Let the model choose. Let code render.

The real cause of that bug was a blank cell. Some users had never filled in that field, but the model was still told to show it. So it borrowed the nearest plausible value from the same record. While fixing it, a second bug turned up that nobody had reported: a quirk in how the data was laid out put one number in another number's place on about a third of answers.

Neither was visible in code review. The code was correct. The model was re-typing data, and every field a model re-types is a field it can get wrong.


3. Measure rates, not pass/fail

Anthropic's guide builds this into its definitions: every attempt at a task is a trial, and you run several because outputs vary between runs. It's easy to agree with and then ignore. Here's why you shouldn't:

If the true failure rate is...Chance of a perfectly clean run (100 tries)
5%0.6%. A clean run is strong evidence.
1%37%. A clean run proves almost nothing.

A pass/fail gate on a 1% bug passes more than a third of the time while the bug is still there.

Rates also saved a fix I nearly threw away. The first attempt took that blank-cell bug from failing every time to failing about two runs in three. As pass/fail, that reads "still broken." As a rate, it reads "real progress, not enough," and that pushed me to the second change that finished the job: no failures in several hundred trials.


4. Make rare failures common, on purpose

In production, the bug hit about one row in twenty. Proving a fix against a bug that rare takes hundreds of runs. So I went looking for inputs that break it reliably:

  • The field left empty: failed 8 out of 8
  • The field filled with something distinctive: 0 out of 8

Same bug, far more signal. Now a fix could be checked in about twenty runs.

Amplified cases test the mechanism. Realistic cases measure exposure.


5. Build your test set from real questions

I was testing how the assistant handled item sizes, so I wrote a test question asking for one size. It passed, and I filed sizes under edge cases.

Then I searched the real, anonymized chat logs. Several real questions asked to leave out that size, which I'd never tested. People also wrote the same size three different ways, with a comma for the decimal and a unit I hadn't listed.

It happened again later. I spent about a hundred model calls tuning a prompt for two test questions that felt important. They appeared zero times in a week of real traffic. Meanwhile, a plain follow-up asking about the item just mentioned showed up nearly a hundred times.


6. Validate the grader before you trust the grade

I once compared three approaches across a few hundred answers. The answer key was solid. The grader wasn't. It had only been tested on text I wrote by hand, and real answers broke it:

  • A curly apostrophe in don't didn't match a straight-quote phrase list.
  • "You have no..." wasn't on the list of accepted ways to say "none."
  • An answer counted every unit when the grader expected a count of distinct items. Both were right.

None of these were model failures. All of them looked like model failures in the score. Anthropic names this as the main weakness of code-based graders: they're brittle to valid answers that don't match the expected pattern exactly.


7. Decide on accuracy, latency and cost together

Anthropic makes the case bluntly: when a stronger model ships, teams without evals spend weeks testing it, while teams with evals can upgrade in days. That matches what I've seen. Before an agent moves to a new model, it gets an eval built from real question shapes. Where code can compute the right answers from a test dataset, nobody types an expected number by hand, and swapping the model under test is one setting. The invoice extraction guide shows a small version of the same idea: the model reads, and Python checks the math.

And every eval reports three numbers, never one:

Current modelNewer, smaller model
Correct answers (about 100 graded)All of themOne fewer
p90 latencySameSame
Cost1×About 0.1×

The switch went ahead. One answer in about a hundred, for a tenth of the cost at the same speed, was a trade worth making and worth saying out loud.

"Best score wins" isn't the rule. For a feature that writes each user a short personal summary, I ran a seven-model bake-off with blind judges. The top scorer won by a hair. The runner-up shipped, because it sat inside the 3 to 5 second budget for something people sit and wait for. One contender was cut for a reason no leaderboard would catch: it invented details about the user and got basic facts wrong.


8. Fix the prompt before you change the model

A search prompt full of worked examples looked cluttered, so I trimmed it to clean principles and measured: five runs on each of thirteen tricky cases.

SetupCorrect
Original prompt, with worked examples~94%
Trimmed to principles~48%
Trimmed, on a newer model~62%

The prettier prompt halved accuracy, and a newer model won back only part of it.

I've also seen a whole extra agent added just to stop replies from switching languages. It was over-engineered, and a few prompt changes replaced it.


9. Keep judges few, narrow and honest

LLM judges are for what code can't check, like whether a recommendation makes sense. Each judge scores one thing and is told to ignore everything else, and where possible it comes from a different model family than the one being graded. That follows Airbnb's advice to keep a few well-calibrated judges instead of a crowd of noisy ones.

Airbnb's third layer, people labeling answers to calibrate the judges, is the slowest to build and the one I see put off most. Until it's done, a judge's score is a reason to go read the answers, not a number to gate a release on.


The housekeeping checklist

Not glamorous, but each one was written right after something went sideways:

  • Size the run first. State the number of calls and rough cost before starting, and get a yes for that number.
  • Run once, at the end. I once stopped a run halfway because the code was still changing. Much of it was already stale.
  • Check the totals. Rate limits once quietly dropped more than a quarter of the test cases, and the percentages still looked fine. Make sure every total equals cases × runs.
  • Look twice at "worse." A model once looked 7 points behind because the answer key listed only one or two right answers per question. Counting equally good answers, the real gap was about 3.

A lot of my eval work happens alongside an AI coding agent. It's fast and confident, which is exactly why this list exists.


The short version

  1. Read real traces before writing anything.
  2. Let code render what code can write.
  3. Measure rates, never pass/fail.
  4. Make rare failures common to verify fixes cheaply.
  5. Use real questions, weighted by how often people ask.
  6. Validate your grader on real answers.
  7. Decide on accuracy, latency and cost together, and say which trade you made.
  8. Fix the prompt before reaching for a new model.
  9. Treat uncalibrated judges as a reason to read, not a number to ship on.

The leaderboard tells you which model is smartest in general. Only your own evals can tell you which one is right for the person using your product tonight.

And the best sign a switch went well? Nobody noticed.

Further reading

Common questions

How do I know if I should switch AI models?
Run your own eval on real questions and compare accuracy, latency and cost together. A leaderboard ranks models in general. Only your data shows whether the new one is better for your users, and what you give up for the savings.
How many test runs do I need to trust an eval?
Enough to see a rate, not one pass. A clean run of 100 is strong evidence against a 5% failure rate, but a 1% bug comes through 100 runs clean about 37% of the time. For rare bugs, find an input that fails almost every time and test against that.
Can I trust an LLM judge's score?
Not on its own until it's checked against human labels. Keep each judge to one narrow question, use a different model family than the one being graded, and treat its score as a pointer to what to read, not a release gate.

Rather have it fixed
and running for you?

Start with a free 45-minute call. Bring the workflow, the part that breaks, and what it should do. If it's a fit, the first step is a fixed-price milestone, scoped in writing before any work starts, with the goal of something that runs, not a report.

Fixed price · scoped in writing first · in person in the Phoenix area

Read next

Extract Invoice Data from PDFs with Pydantic AI

To extract invoice data with Pydantic AI, give the agent a Pydantic Invoice class with a validator that checks the lines add up to the total. When they don't, Pydantic AI sends the error back and the model reads it again. No retry code.