· AI

One benchmark run is not enough

On a twelve-case test, one model beat another by a single case and I picked the loser. How much a single run can tell you, why valid output and correct output are separate scores, and what I count now.

On August 14 I compared five local models on a routing task. The best of them got 10 of 11 cases right. I chose a different one, which got 9, and I still think that was the correct call. A one-case lead on eleven cases, from a single run, is too small to act on.

I wrote about that comparison last month for what it showed me about my prompt. The test itself was weaker than I treated it as being at the time.

What one case is worth

Each model saw the real system prompt and twelve messages, and its output went through the real parsing code. Eleven of the twelve messages have a correct agent. Every case ran once.

| Model | Valid JSON | Right agent | Median time | |---|---|---|---| | gemma4:e2b-it-qat | 12 of 12 | 9 of 11 | 2.4 s | | gemma4:e2b | 12 of 12 | 9 of 11 | 2.6 s | | laguna-xs-2.1 | 12 of 12 | 10 of 11 | 4.5 s | | qwen2.5:3b | 11 of 12 | 8 of 11 | 1.2 s | | qwen3.5:2b | 9 of 12 | 3 of 11 | not recorded |

Two cases separate the top four. With eleven scored cases, each case is worth nine percentage points, so the table appears to show a spread from 73 to 91 percent.

Suppose instead that all four models are right 85 percent of the time on messages like these. A model like that, given eleven cases, scores 9 about 29 percent of the time, 10 about 32 percent, 11 about 17 percent and 8 about 15 percent. Every score in the top four rows is an ordinary result for the same underlying model. A single run of this size does not distinguish between four different models and one model measured four times.

Scores from a model that is right 85 percent of the time
8 of 11 rightabout 15 percent
9 of 11 rightabout 29 percent
10 of 11 rightabout 32 percent
11 of 11 rightabout 17 percent

In one run the four closest models scored 8, 9, 9 and 10 of 11. Each is an ordinary result for the same underlying model.

There is published work on this. Evan Miller's 2024 paper on the statistics of model evaluations starts from the sentence "Fundamentally, evaluations are experiments," and argues for reporting them the way other experimental sciences do. Anthropic's summary of that paper warns that ignoring the noise "may lead researchers to inadvertently detect a difference in model capabilities when in fact none exists." One of its recommendations is the cheapest fix available to someone with a small test set: "we recommend resampling answers from the same model several times."

So the choice came down to the columns I could measure more firmly. The model that scored 10 took 4.5 seconds at the median against 2.4, and it is a 20 GB file against 4.3 GB. One case that might be noise did not justify twice the wait and five times the memory.

The last row is a different matter. Three of 11 is far outside anything chance explains at this size. One run is enough to reject a model that far behind, and it is too little to rank the four that finished close together.

Valid and correct are separate scores

The table has two score columns because the two things fail differently.

A response that is not valid JSON never gets as far as being right or wrong. My parser pulls out the outermost braces and tries to load them, and when that fails my code returns UNKNOWN without raising an error. I described that last month. The consequence for scoring is that a single combined accuracy number files a format failure under wrong answers, and production files it under the model politely declining. Neither label points you at the cause.

Look at the fourth row. One response in twelve was not valid JSON. That could be a model that breaks format on 8 percent of everything it sees, or a one-off. From one run I cannot tell which.

Rare failures are harder still. Before I fixed the prompt in August, I measured the model I had chosen over three runs of 20 cases, and it produced valid JSON 59 times out of 60. If one in 60 is the true rate, a single twelve-case run sees no failure about 82 percent of the time. A single 20-case run misses it about 71 percent of the time. Most single runs would have reported perfect validity for a prompt that drops one message in 60, and every message my assistant receives goes through that step.

It cuts the other way as well. Last month's post included an edit that broke the format in five runs out of six. A single run had a one-in-six chance of telling me that edit was fine.

There is a third column I did not have and should have: empty answers. On August 10 I timed a newer small model that was slower than the one it would have replaced and also returned an empty response field. It is a reasoning model, and everything it produced had gone into a separate thinking field. Ollama's chat API takes a think setting for this. The reference says "true requests thinking, false requests no thinking output, and null uses the model default." A model left on its default can reason well and still hand your parser nothing. The 20 GB model in the table is a thinking model too, and my code passes think: false on every request it sends.

Why the same input gives different output

The variation is there by design. A runtime samples from the model's probabilities, and Ollama's documentation lists a default temperature of 0.8. The same page describes a seed parameter: "Setting this to a specific number will make the model generate the same text for the same prompt."

Fixing the seed makes a test repeatable. It also means you have measured one draw out of the many that production traffic will produce. I leave the seed alone and repeat the test.

Timing needs the same care

Warm the model before you time it. The first request after a model loads pays for the load. If the first model in your list is charged for a cold start and the rest are warm, the timing column is measuring the order of your list.

Report the slow end. A median says what usually happens. The 95th percentile says what the slow requests look like, and with twelve samples it is just the slowest one. It takes several runs before that number means much.

Compare against the real timeout. My router gives the model 15 seconds. None of the five came close, so latency could only break a tie.

What I count now

  • The real system prompt and the real parser, never a simplified copy of either.
  • Every case more than once. I used three runs to judge the prompt change in August.
  • Validity, correctness and latency as three separate results, each reported as a count out of a total.
  • A difference of one or two cases treated as a tie. Ties are broken on things I can measure firmly, which here were latency and memory.
  • The whole test again after any prompt edit and any runtime upgrade.

One caveat. Sixty observations is still a small number. Three runs of 20 cases will almost certainly catch a failure that happens five times in six. It will catch a one-in-60 failure about 63 percent of the time. For anything rarer, a benchmark is the wrong instrument. The count has to come from production, where a parse failure is logged as its own event and somebody looks at the total.

The test set, the scoring and the decision are all mine here. At work they usually belong to three different people, and the question I would put to whoever presents a model comparison is how many times each case was run.

Views are my own.