Learn
Evaluations & benchmarks

How Are LLMs Evaluated? (MMLU, GSM8K, HumanEval Explained)

The short answer

MMLU, GSM8K and HumanEval are the benchmarks most often quoted in model releases. Each is a fixed prompt set with a fixed scoring rule: four-way knowledge questions, grade-school word problems, and 164 Python functions checked by unit tests. Understanding the few-shot format, answer extraction and pass@k explains why the numbers move and what they cannot tell you.

On this page

A benchmark score is a pipeline, not a property

When a model card says 88.7 on MMLU, that number is the output of a pipeline with at least six stages. A dataset supplies items. A prompt template renders each item, usually with a fixed number of worked examples. A decoding configuration decides whether the model samples or takes the argmax, at what temperature, with what maximum length. An answer extractor turns free text into a candidate label. A scorer compares that label to the reference. An aggregator averages over items, sometimes weighting subjects equally and sometimes weighting questions equally.

Every stage is a place where implementations differ, and the differences are not cosmetic. Scoring MMLU by comparing the log-likelihood of the tokens " A", " B", " C" and " D" gives a different number from asking the model to generate an answer and parsing the letter out of its prose. One measures preference among four continuations; the other measures whether the model can follow an instruction and produce a parseable response. Neither is wrong, but they are not interchangeable, and a leaderboard that mixes them compares apples to a fruit salad.

This is why reproducing a published score is often harder than it looks, and why the same model can appear at 84 on one leaderboard and 87 on another without either party lying. The first question about any benchmark number is not how good the model is but what exactly was run.

MMLU: fifty-seven subjects, four options

Massive Multitask Language Understanding was published in 2020 to test knowledge across a broad academic curriculum rather than a single task. It contains 15,908 questions across 57 subjects, split into 1,540 development items, 14,042 test items and a small validation set, ranging from abstract algebra and college physics to professional law, virology and high-school European history. Each item is a short question or incomplete statement with four candidates and one correct option.

The canonical protocol is five-shot: five labelled examples from the same subject are prepended to the question, and the model is scored on the probability it assigns to each of the four answer letters. Because there are four options, random guessing yields 25 percent. The original paper reported roughly 89.8 percent for an estimated expert-level human ceiling, and GPT-3 at around 44 percent, which is what made the benchmark interesting: there was a wide gap between machine and expert, and progress against that gap became a proxy for progress in language models generally.

That gap has closed. Frontier models report scores in the high 80s and low 90s, several at or above the original human estimate. When the remaining headroom is smaller than the measurement error, a benchmark stops discriminating between good models, and MMLU has reached that point.

What MMLU measures, and what it does not

MMLU is a knowledge-recall test with a multiple-choice interface. It rewards a model for absorbing facts about tax law, anatomy and world religions, and for picking the right completion when the answer is visible among four options. That is a real capability that correlates with general usefulness, but it is not reasoning. A model can score well by recognising the shape of a correct answer without deriving it, and can fail an item it understands because the few-shot examples nudged it toward another format.

Format sensitivity is measurable and large. Changing the few-shot order, the answer template, or even a leading space can move subject-level accuracy by several points, and scoring by generation moves it again. Heavily instruction-tuned models sometimes do worse under the log-likelihood protocol than their generative performance suggests, because the protocol asks them to behave like a base model.

MMLU-Pro, released in 2024, keeps the subject structure and raises the difficulty: 12,032 questions, ten options instead of four, and a requirement that models reason first. The larger option set cuts guessing from 25 percent to 10, and the questions come from more demanding exams. Scores drop substantially, which is the point: headroom is restored by making the task harder, not by adding more easy items.

GSM8K: grade-school arithmetic with a checkable answer

GSM8K contains 8,792 grade-school math problems, split into roughly 7,500 training and 1,319 test items. Each takes two to eight steps of basic arithmetic, and each carries a reference solution written as natural-language reasoning that ends with the final number after a "####" marker. The marker makes scoring exact: extract the number, compare it to the reference, count it right or wrong. There is no partial credit.

The benchmark was designed to require multi-step reasoning rather than pattern matching. A typical item describes a situation, gives several quantities, and asks for a derived total that cannot be read off directly. Because the answer is a single number, scoring is cheap, objective and reproducible, which is why GSM8K became the default arithmetic benchmark for the chain-of-thought literature. It is also why it became the default target for contamination and overfitting.

Eight thousand problems is not a lot. Past 90 percent, the remaining errors are a mix of hard items, ambiguous wording and annotation mistakes, and the benchmark's ability to rank models collapses. A jump from 94.1 to 94.8 is not evidence of better reasoning when the confidence interval around either number is wider than the difference.

Why GSM8K saturated, and what replaced it

Saturation produced a wave of perturbations testing whether models learned arithmetic or memorised surface patterns. GSM-Symbolic regenerates the same problems with different names and numbers; GSM-NoOp inserts an irrelevant clause that should be ignored. Models above 90 percent on the original set lose large amounts of accuracy when names and values change, and lose more with a distractor sentence. A model that learned the procedure should be invariant to a person's name.

The practical replacements are harder and less saturated. MATH contains competition-style problems with full LaTeX solutions. AIME problems are short, difficult and drawn from a small pool, which makes them useful for frontier comparison but statistically fragile. More importantly, the evaluation community shifted toward benchmarks with date-stamped releases, where items are collected after a model's training cutoff, so a high score cannot be explained by memorisation.

For reasoning models the interesting metric is no longer accuracy at a fixed budget but accuracy as a function of tokens spent. A model that reaches 92 percent after 8,000 thinking tokens and one that reaches it after 800 are not equivalent products, and a single accuracy number hides that.

HumanEval: 164 functions and a unit test

HumanEval, released with the Codex paper in 2021, contains 164 hand-written Python problems. Each gives a function signature, a docstring describing the intended behaviour and a set of hidden unit tests. The model writes a completion, the completion runs against the tests, and the problem counts as solved only if every test passes. There is no style score and no partial credit.

The benchmark introduced pass@k as its metric, and the definition matters. pass@k is the probability that at least one of k independently sampled completions passes the tests. The naive estimator, generate k samples and check whether any passed, is biased and high-variance. The standard unbiased estimator draws n samples per problem, counts c that pass, and computes 1 minus the ratio of combinations: one minus C(n-c, k) divided by C(n, k). With n=200 and k=1, this reduces to the fraction of samples that pass, which is why most papers report pass@1 computed from a large sample rather than a single greedy decode.

A detail that gets lost: a greedy pass@1 and a sampled pass@1 at temperature 0.2 with n=200 are different quantities. The first measures what the model does by default. The second measures the fraction of its attempts that succeed, which is closer to what a developer experiences when they retry a failing generation. Papers that switch between them without saying so create apparent progress that is partly a change of measurement.

Why 164 problems cannot rank frontier models

The binomial standard error for 164 independent items at 90 percent accuracy is about 7 points, so a 95 percent interval runs roughly from 76 to 100. Models at 91 and 94 are indistinguishable on this set. The intervals are also optimistic, because problems cluster into families: a model that fails one string-manipulation task often fails its relatives, which widens the true interval further.

The test suites are thin as well. The original problems average fewer than eight tests each, leaving room for a solution that passes the visible checks while being wrong in general. EvalPlus generated HumanEval+ with roughly eighty times more tests per problem, and pass rates dropped by double digits for many models. That gap is the difference between passing the tests we wrote and implementing the function.

Function-level benchmarks have since been supplemented by repository-level ones. SWE-bench gives a model a real GitHub issue and a checkout of the repository and asks for a patch that makes the project's own tests pass. Its verified subset contains 500 human-checked instances. Solving one requires navigating a codebase, finding the relevant files, understanding the build, and producing a minimal diff, none of which HumanEval tests.

The harness is part of the result

Most public numbers come from a few harnesses: EleutherAI's lm-evaluation-harness, HELM, OpenAI's simple-evals and each lab's internal runner. They do not agree. Prompt templates, chat templates, few-shot selection and answer normalisation all differ. A model evaluated with its own chat template beats the same model under a generic template that does not match its training format, and that effect can exceed the gap between adjacent models on a leaderboard.

Instruction-tuned models are especially sensitive. MMLU's base-model protocol assumes a completion-style prompt, while an instruct model expects user and assistant turns. If the harness flattens the conversation into plain text, the model may answer in a style the parser cannot read, and the score drops for reasons unrelated to knowledge.

The implication for a buyer is to prefer numbers produced by a single harness across all compared models, and to be suspicious of cross-leaderboard comparisons assembled from different sources. It is also worth checking whether error bars are reported at all. A leaderboard that publishes a single decimal place and no interval is implying a precision it does not have.

Contamination: the failure mode that looks like progress

Benchmark items live on the public internet, and pretraining corpora are scraped from it. Benchmark items are therefore in the training data of any model trained after publication with high probability. The only questions are how much leaked and how much it matters.

Detection is imperfect but not hopeless. N-gram overlap between benchmark items and training data is the standard check, with the caveat that short multiple-choice questions can overlap by chance. Canary strings embedded in benchmark releases provide a cleaner signal when a model reproduces them. Date-cutoff analysis is the strongest structural defence: if a benchmark was published after the model's training cutoff, contamination is impossible by construction. LiveCodeBench uses this approach, releasing problems on a rolling basis and evaluating only on items published after each model's cutoff.

Measured leakage has real effects. GSM1k, newly collected problems matched to GSM8K in style and difficulty, produced accuracy drops of several points to over ten for some models, largest where overlap was suspected. MMLU-Redux reviewed a sample of MMLU by hand and found a ground-truth error rate around 6.5 percent, which caps achievable accuracy and distorts subject comparisons.

Contamination has a subtler form too: benchmark-adjacent training. A model trained on LeetCode discussions and Stack Overflow answers has effectively seen the reasoning patterns HumanEval tests without seeing the exact prompts. N-gram checks miss this; it shows up as an unexplained gap between benchmark and novel-problem performance.

The uncertainty arithmetic nobody puts on the slide

Benchmark scores are proportions estimated from finite samples, so they carry sampling error. For a simple random sample, the standard error of accuracy p on n items is the square root of p(1-p)/n. Real numbers show how coarse the measurements are.

At 90 percent on MMLU's 14,042 test items the standard error is about 0.25 points, so a 95 percent interval is roughly half a point wide, precise enough to rank models a full point apart. At 90 percent on GSM8K's 1,319 items the standard error is about 0.8 points, an interval of roughly plus or minus 1.6. At 90 percent on HumanEval's 164 items the standard error is about 7 points and the interval roughly plus or minus 14, which is why single-digit HumanEval gaps between frontier models mean almost nothing.

  • Clustering: items within a subject or task family are correlated, so effective sample size is lower than item count and true intervals are wider than the binomial formula suggests.
  • Decoding variance: sampled evaluation adds run-to-run noise on top of sampling error. Three seeds is a minimum; one seed is an anecdote.
  • Paired comparisons: comparing two models on the same items is far more sensitive than comparing their independent averages, because item difficulty cancels. Use McNemar's test on the discordant pairs.
  • Multiple comparisons: scanning 57 MMLU subjects for the biggest regression guarantees a false positive. Correct for it or ignore subject-level noise.
  • Selective reporting: the best of several runs, or the best of several prompt formats, is not an unbiased estimate. It is a maximum.

Reading a model release without being fooled

A useful checklist is short. Ask which benchmark version was used, because MMLU, MMLU-Pro and MMLU-Redux are different tests. Ask whether the harness was the lab's own or a third party, because self-reported numbers on self-selected prompts are marketing until reproduced. Ask how many samples pass@1 used, and at what temperature. Ask whether the benchmark postdates the training cutoff. Ask for the standard error; if absent, compute it from the item count.

Then ask what the benchmark cannot answer: does this model do the thing you need? A model that leads on MMLU-Pro but cannot follow a JSON schema is useless for an extraction pipeline, and one that trails on HumanEval but writes careful, reviewable diffs may be the better engineering choice. Public benchmarks eliminate clearly unsuitable models; they do not choose among suitable ones.

Page feedback

Was this helpful?

A quick signal helps improve these notes.

Report a mistake Straight to the lab inbox

Put it to work

See the models, datasets and gateway this lab runs.