cd /news/large-language-models/llm-evaluation-108-llm-benchmarking-… · home › topics › large-language-models › article
[ARTICLE · art-180322] src=pub.towardsai.net ↗ pub= topic=large-language-models verified=true sentiment=· neutral

LLM Evaluation 108: LLM Benchmarking — How Benchmarks Work and Why You Shouldn't Trust Them Blindly

A benchmark is a standardized test measuring one specific LLM capability, built from four parts — a dataset and task, a run configuration, a scoring method and an aggregation method — as illustrated by the grade-school math benchmark GSM8K, released around 2021 with roughly 8,500 rows on Hugging Face. A test run of 20 GSM8K questions through the lm-evaluation-harness eval harness gave a model 90%, a figure the author warns needs care. The piece identifies four traps that make benchmark numbers misleading: contamination, saturation, configuration gaming and hidden aggregation.

recommendation

Match system prompts, shot count and all run settings exactly when comparing models, and audit published scores for contamination, saturation, configuration gaming and hidden aggregation before trusting them.

more in playbook: Evals and testing for LLM apps
by read20 min views19 publishedDec 2, 2026

A benchmark is a standardized test that measures one specific capability of an LLM. Every benchmark has four parts: a dataset and task, a run configuration, a scoring method, and an aggregation method. We walk through all four using GSM8K, a grade-school math benchmark. Running a benchmark is basically a loop over every question, but doing it reliably at scale needs a lot of extra plumbing, which is why we use an eval harness like lm-evaluation-harness. A quick test run on 20 GSM8K questions gave a model 90%, and we’ll see why that number needs care. Then we look at who runs benchmarks (frontier labs, third-party evaluators, and you) and the four traps that make benchmark numbers misleading: contamination, saturation, configuration gaming, and hidden aggregation.

Here’s what we’ve covered in this series so far:

In Part 7, we learned:

Now we’re fully prepared to study the first type properly. Today’s post is all about benchmarks.

“Benchmark” is one of the most thrown-around words in AI. Every time a new model launches, you’re hit with numbers: “It scored this much on SWE-bench. It scored that much on ARC-AGI.” Whole YouTube videos are made just comparing these numbers.

So what is a benchmark, in simple words?

A benchmark is a standardized test used to measure a particular capability of a model.

That’s it. It’s a fixed exam, and it targets one specific skill.

Pick any benchmark in the world and you’ll find the same four parts inside it:

To make these concrete, we’ll use one example benchmark throughout: GSM8K.

GSM8K stands for Grade School Math 8K.

It’s an older benchmark, released around 2021, and it isn’t used much anymore (we’ll see why near the end). But because it’s simple, it’s perfect for learning how a benchmark is built.

The dataset is the questions plus the answer key.

Every benchmark dataset has both questions and correct answers. It’s basically a golden dataset.

Here’s a sample question from GSM8K:

“Natalia sold clips to 48 of her friends in April, and then she sold half as many clips in May. How many clips did Natalia sell altogether in April and May?”

April = 48. May = half of 48 = 24. Add them: 48 + 24 = 72. The answer in the dataset is 72.

The answer key doesn’t just say “72.” It’s also written out step by step: “Natalia sold 48 / 2 = 24 clips in May. Natalia sold 48 + 24 = 72 clips altogether in April and May.” The final number always sits at the very end, so it’s easy to pick out.

You don’t have to take my word for it. Just search “GSM8K” and you’ll find it on Hugging Face and Kaggle. On Hugging Face, open the dataset’s Files and versions tab, go to main, and there it is: one column for the question, one for the answer, around 8,500 rows.

Every benchmark has its own dataset like this. MMLU has its own. Every other benchmark has its own. And each benchmark also tells you the task.

GSM8K’s task: when the model is given a simple grade-school math problem, it must generate the answer.

Every benchmark comes with guidelines for the settings you must use while running it.

Why? Because you can’t run one model under one set of settings and another model under different settings, then compare their scores. When you compare two models, every setting must be exactly the same for both. The run configuration tells you what those settings are.

It has three parts:

Let’s go through each.

When you pick a question from the dataset and send it to the model, you don’t send it alone. You also send a system prompt. And how you write that prompt matters. Change the prompt, and the same model can give a different result.

Zero-shot vs. few-shot. First, you decide whether the prompt is zero-shot or few-shot:

The benchmark tells you which one to use. GSM8K is classically reported at 8-shot. That means every time you send a question, you first show the model 8 solved examples in the prompt, and then your question.

Obviously, a zero-shot prompt usually gives worse performance, and few-shot usually improves it. That’s exactly why the number of shots must be fixed and the same for every model.

Chain-of-thought (CoT) vs. direct answer. Second, do you allow chain-of-thought, or ask for the answer directly?

GSM8K allows chain-of-thought.

So for prompt construction, the options are: few-shot or zero-shot, and chain-of-thought or a direct answer. Once the benchmark says “8-shot, with CoT,” every model must get the same 8 examples and the same instructions.

Next, you fix the generation settings.

So you decide up front: “Model A gets this many max tokens. Model B gets exactly the same.” Not too little, not too much.

This part is very interesting. You also fix a scoring strategy. There are three common ones.

pass@1: you show the model a question once. It answers. The answer is either right or wrong. This is the strict strategy.

pass@k: say pass@5. You ask the same question to the same model five times. If it gets it right at least once out of the five, you count it as correct. This is a more lenient strategy.

majority@k: you ask the same question k times, and the model gives you k answers. Whichever answer appears the most times is taken as the model’s answer. Remember mean, median, mode from school? This is the mode.

Take the example in the image. The correct answer is 72, and the model is asked five times. It answers 72, 70, 72, 68, 72.

Now imagine the first answer had been 70. pass@1 would fail, but pass@5 and majority@5 would still pass. Same model, same question, different scores, just because of the strategy.

Which one does GSM8K use? GSM8K scores are usually reported as pass@1: one try per question, and that one answer is either right or wrong. But some model announcements report GSM8K with majority voting instead, for example majority@32 (ask 32 times and take the most common answer). That gives a higher number than pass@1 for the same model. Other benchmarks, especially harder coding ones, often report pass@k.

So whenever someone tells you, “Our model scores 82% on benchmark X,” dig in and ask: was that pass@1, pass@k, or majority@k? Different strategies give very different numbers.

Tools: allowed or not? The benchmark also says, in advance, whether tools are allowed. Think about why this matters:

So this has to be decided up front. In GSM8K, tools are not allowed. But some benchmarks need tools. For example, SWE-bench, the software engineering benchmark, tests whether a model can solve GitHub issues. The model has to go to GitHub and fetch the issues, and for that it needs tools.

To sum up GSM8K’s run configuration: 8-shot, chain-of-thought on, temperature around 0, a fixed max-token limit, most likely pass@1, and no tools.

So far we’ve covered the dataset and task and the run configuration. Third comes scoring. Scoring has two important steps.

You sent the question, with a system prompt, under the fixed settings. The LLM sent back an answer. But that answer can come in any form:

It’s an LLM, so it can give you output in any shape. That’s why you have to do a lot of work on extraction first. You either:

to make sure you can pull out the answer in the right format. The correct answer is 72, so you want exactly that number and nothing else.

Once you’ve extracted the answer, you compare it with the answer key.

So comparison happens in one of three ways, the same three methods from Part 5: programmatically, with an LLM-as-a-Judge, or by a human.

The last part is aggregation, and it’s simple.

You have, say, 1,000 questions. For every question you now have a 1 or 0: did the model get it right or not. In the aggregation step, you just combine them:

“I had 1,000 questions. The LLM got 920 right. So this LLM scored 92% on the benchmark.”

Most of the time, aggregation is that straightforward. But not always.

Take MMLU, which tests general knowledge across 57 subjects. There, you may need to publish a separate result per subject:

Then you want one overall MMLU score. But you can’t just add all the percentages and divide by 57. Why? Because the dataset might have fewer biology questions and more economics questions. In that case, you need a weighted mean.

Here’s a quick example. Say biology has 100 questions (87% right), physics has 200 (91% right), and economics has 700 (72% right).

Same data, two different “overall” scores. The weighted one is the honest one, because economics makes up most of the questions. That’s why aggregation strategies matter too.

In a nutshell, a benchmark is a standardized test, and inside it you get:

Most benchmarks you hear about today were originally published as research papers.

Search for the GSM8K paper (“Training Verifiers to Solve Math Word Problems,” 2021) and you’ll find the paper where researchers first introduced this benchmark to the world. In it, they explain everything: which dataset they used, what run configuration, what scoring mechanism, what aggregation mechanism. And then that dataset shows up on the internet for everyone to use.

The same goes for MMLU (“Measuring Massive Multitask Language Understanding”) and SWE-bench (“SWE-bench: Can Language Models Resolve Real-World GitHub Issues?”). Different papers, same structure: task, dataset, run configuration, scoring, aggregation.

That’s literally the researchers’ job: studying how to test a particular capability of an LLM. Researchers in each field bring out benchmarks for their field. Those benchmarks (and their datasets) become popular, and every new LLM that hits the market gets measured on them.

(I’m deliberately not throwing a long list of benchmark names at you yet. First you need the overall idea of what a benchmark is. The big list of famous benchmarks comes later in this series.)

Let’s put ourselves in a frontier lab’s shoes.

Imagine we are a frontier lab, like OpenAI or Anthropic. We train our own LLMs. We just trained a new one, let’s call it “MyLab-v1.” And a new benchmark has just been published and is getting famous: GSM8K, which tests the math capabilities of any LLM.

We want to test MyLab-v1 on GSM8K. How do we do it, step by step?

Simply put, evaluating a model on a benchmark is a loop.

Every question in the benchmark dataset becomes one row, and you loop over them. For each row:

You do this ~8,500 times, once per question. When the loop ends, you have a big list with a 1 or 0 for every question. Then you aggregate it (take the average, in the simple case) using the aggregation strategy the benchmark gives you, and you get your final benchmark score.

In simple words: pick a question → wrap a prompt around it → apply all the settings → call the model → extract the answer → score it → store it. Repeat until every question is used up. Then aggregate, and you have your final benchmark score.

That’s how evaluation is done with a benchmark, at least for the simple ones. (The more complex benchmarks come later in this series.) Basically, you’re just following the research paper.

Looking at this, it feels very simple, right? “It’s just a loop. I’ll build it myself.”

The problem is that when you actually sit down to build a proper, reliable version, you’ll realize it isn’t that straightforward:

The job is still “run a loop.” But running a reliable loop at the scale of 8,000–10,000 LLM calls needs a lot more engineering.

So people don’t build all of this themselves. They use libraries. All this side “plumbing” has a name you’ve probably heard:

An eval harness is the software you use to execute model evaluations.

Famous eval harness libraries include:

With these, you can test your LLM on almost any supported benchmark without building much yourself. Without them, you’d have to build all that hectic plumbing on your own, and it might not even be standardized: run the evaluation once and get one result, run it again and get a different result. These harnesses made the whole job much easier.

A good analogy: the benchmark is the exam paper. The eval harness is the exam administration that conducts the exam and handles everything else on your behalf.

Let’s see how easy a harness makes this. We’ll use lm-evaluation-harness by EleutherAI, a very well-known library. It already supports a huge list of benchmarks, including GSM8K. And it can test OpenAI models, Hugging Face models, and more.

Here’s what the whole setup takes:

In that one command, you tell the harness a handful of things. Notice how each one maps to a part of the benchmark we studied:

Why limit it to 20 questions? Because we’re only checking that the setup works. For a real evaluation, you’d remove the limit, and the harness would run the full test set. Running the full GSM8K on a frontier model can cost around $25 for a single evaluation. Running 20 questions costs a few cents.

Hit run, and the evaluation starts. Behind the scenes, the harness makes 20 calls to the model, one per question. One command handles everything. That’s the layer of abstraction an eval harness gives you.

The result came back at about 90%. The model got 18 out of 20 questions right.

The results table actually shows two scores, under the names “strict-match” and “flexible-extract.” That’s the extraction step from Part 2.3 in action:

Same model, same replies, two extraction rules. On a bigger run, these two numbers can drift apart. That’s why extraction matters.

Because we asked it to log every sample, everything is saved. In the results folder there’s a folder for the model, and inside it there’s a record for every question: an ID for the question, what answer came back, the correct answer, and the score. You can sit down and go through every single one. The failures are where the real learning is: reading why the model got a question wrong tells you far more than the final percentage.

So right in front of your eyes, we ran a small model evaluation. Small and not very significant, sure. But remove the 20-question limit, and you’re genuinely testing this model on the full GSM8K benchmark. The result could be published. That’s essentially what a frontier lab does too.

Be careful here. 20 questions is a tiny sample. If you work out the margin of error:

Same “90%,” very different levels of confidence. A 20-question run is fine for checking that the setup works. It’s not fine for choosing between two models.

DeepEval is another popular evaluation library, one we’ll use later in this series for application evals. It also supports benchmarks. In its documentation, under Benchmarks → Available Benchmarks, you’ll find a list, and GSM8K is in there.

So you can do this with DeepEval too. But to run an OpenAI model through its benchmarks, you have to do a lot more setup work, while lm-evaluation-harness needed just one command. That’s why we used lm-evaluation-harness. Think of it this way:

After all this, a fair question pops up: most benchmarks are open. Their papers and datasets are freely available on the internet. So anyone can evaluate any LLM. Then who actually wants to do it, and why?

There are three categories of people who benchmark LLMs.

The obvious candidate. OpenAI, Anthropic, Google DeepMind: whenever they build a model, they’ll benchmark it. It helps them in three ways:

You may have seen leaderboards like LM Arena, or companies whose whole job is benchmarking different LLMs and publishing rankings.

They’ve been doing this for a long time, so people have started trusting them. Why? Because when they test two different models, say a Claude model and an OpenAI model, they test them under the same conditions. So their rankings are more reliable.

These are independent organizations whose product is evaluation. That’s literally what they get paid for.

Think of these leaderboards as IMDb ratings for models.

The last category is you: AI engineering teams building LLM-based applications.

Sometimes these teams don’t rely on frontier labs or third-party evaluators. They say: “We already have the tools. Public benchmarks are available. Libraries like lm-evaluation-harness exist. Let’s run our own evaluation and see how a model scores on a particular benchmark in our own conditions*, and also measure the* latency and cost*.”*

So there are three stakeholders who run (or can run) these evaluations: frontier labs, third-party evaluators, and companies and AI engineers themselves.

So far we’ve learned that benchmarks are super important and help us understand a specific capability of an LLM. But that doesn’t mean benchmarks are flawless, or that you should always believe what they tell you.

In a lot of scenarios, benchmarks are misleading. You can’t trust them blindly.

Whenever you read a benchmark score, be very, very careful. There are four kinds of problems to watch for.

Most benchmarks (MMLU, GSM8K, and many more) are public benchmarks. That means their research paper, their full methodology, and their dataset are all publicly available on the internet. Especially the older ones from 2021, 2022, 2023: their datasets have been online for years.

Now imagine a lab trained a new model six months ago. To train it, they scraped the most recent internet data and fed it into pre-training. There’s a good chance that this public benchmark’s dataset, the questions and their correct answers, became part of the model’s pre-training data.

If the model has already seen all 8,000 questions and answers, then later when you ask it, “What’s the answer to this question?”, there’s no guarantee it’s thinking. It might just have memorized it.

That’s why, for many big models trained on huge datasets, these benchmarks are contaminated: the model already knows the answers because they were in its training data. It’s a huge problem, especially with public benchmarks.

Solutions:

A simple way to spot contamination yourself: take a few questions and change the numbers. For example, make Natalia sell clips to 52 friends instead of 48 (the answer becomes 52 + 26 = 78). A model that truly reasons won’t care. A model that memorized the original will often still answer 72, or its accuracy will drop noticeably on the changed questions. That drop is a red flag.

Benchmark saturation is a life cycle.

A benchmark comes into the picture, say in 2021. It’s new. No model knows about it. Nobody has seen it. On these questions, most models perform poorly: 25%, 36%. All models hover around there.

But the benchmark is static. It doesn’t change. Meanwhile, models keep improving, every six months. So over time, new models perform better on the same benchmark. The previous generation was at 36%. Now it’s 50. Then 70.

Eventually, models start hovering at 90–95%, and they all cluster in one place. There isn’t much difference between their scores anymore. For example:

That’s benchmark saturation. And it means the benchmark is no longer useful: you can’t differentiate between models with it. If everyone scores the same marks on an exam, how would you know who’s good and who isn’t?

So when a benchmark saturates, it gets retired and replaced with a new one, and the industry starts working on the new one.

The GSM8K example I gave you? It’s a saturated benchmark. It’s not really used anymore, because everyone scores 94, 95, 97% on it. MMLU is saturated. SWE-bench has saturated too.

So most benchmarks have a life cycle: they arrive → every model finds them hard → models slowly improve → everyone scores well → the benchmark saturates → it’s retired and replaced. That’s how the benchmarking process works.

How to spot it: look at the top five or so models on a benchmark. If they’re all above 90% and within a few points of each other, the benchmark is saturated, and it can’t help you choose between them.

When frontier labs run benchmarks themselves, they can tinker with the configuration. For example: give their own model the most favorable conditions, and give the rival model the default conditions.

The basic idea of configuration gaming: whatever run configuration you were supposed to use, you give yourself the most favorable version of it.

Example: you’re benchmarking on GSM8K, and you quietly give your model a Python interpreter tool. Now it can write code to solve every math question. Obviously, its score goes up.

There’s a lot of room to tinker here, and it causes big variation: 5–10% swings are common. Even honest changes move the number. Run the same model on GSM8K with 8 examples versus no examples, or with chain-of-thought versus without, and you’ll get noticeably different scores.

The last step of benchmarking is aggregation: combining all the per-question numbers. Here, a lot of people play smart.

Take MMLU again, with questions from 57 subjects. A model might score well in physics but very poorly in economics. So what does the model provider do? Instead of giving you the individual subject scores, they give you the average. They never mention that the model isn’t good at economics.

Now say you have to build an economics chatbot. You see the MMLU score is great, “It does well across 57 subjects!”, and you deploy it. Then you find out it performs terribly on economics questions, because its economics score was terrible all along. It was just hidden in the average.

For example, a model could report 86% on MMLU overall while scoring 94% in physics, 91% in biology, and only 58% in economics. If economics is your use case, that 86% tells you almost nothing.

Because things can be hidden inside a benchmark score, you didn’t find out, and this happened to you. Always ask for the per-subject (per-category) breakdown, and look at the slice that matches your application.

These are the four major reasons you have to take benchmarks with a pinch of salt. The number thrown at you is not something to accept as-is. You need to build your own methodology, and decide which model works for you based on that. (We’ll go deeper into exactly that in the upcoming posts.)

| Topic               | Key idea                                                                                   ||---------------------|--------------------------------------------------------------------------------------------|| Benchmark           | A standardized test that measures one specific model capability                            || 4 parts             | Dataset/task → run configuration → scoring → aggregation                                   || GSM8K               | Grade-school math, ~8.5K Q&A pairs, 8-shot + CoT, no tools, likely pass@1                  || Run configuration   | Prompt (zero/few-shot, CoT), decoding (temp ~0, fixed max tokens), scoring strategy, tools || Scoring strategies  | pass@1 (strict), pass@k (lenient), majority@k (vote / mode)                                || Scoring             | Extract the answer (regex/structured output), then compare (exact match, LLM judge, human) || Aggregation         | Simple mean, or weighted mean when categories differ in size (MMLU)                        || Where it's defined  | The benchmark's original research paper                                                    || Running it          | A loop over every row, plus plumbing: batching, retries, rate limits, logging              || Eval harness        | Library that runs the loop for you: lm-evaluation-harness, Inspect, HELM                   || Who runs benchmarks | Frontier labs (a ceiling), third-party evaluators (most reliable), you                     || 4 traps             | Contamination, saturation, configuration gaming, hidden aggregation                        |

Ask yourself about the last benchmark score you saw:

If you can’t answer most of these, the number isn’t telling you as much as it seems.

Next up in this series: leaderboards (what they are, how they aggregate multiple benchmarks, and which ones to trust), the famous benchmarks for each of the 8 core capabilities, and how to build your own model-validation process with custom model evals.

If you missed the earlier parts of this series:

LLM Evaluation 108: LLM Benchmarking — How Benchmarks Work and Why You Shouldn't Trust Them Blindly was originally published in Towards AI on Medium, where people are continuing the conversation by highlighting and responding to this story.

── more in #large-language-models 4 stories · sorted by recency
── more on @gsm8k 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/llm-evaluation-108-l…] indexed:0 read:20min 2026-12-02 · —