What are standard LLM benchmarks like MMLU, GSM8K, and HumanEval?
Beginner · 2 min read · Evaluation & Testing
Open in study mode to save this question and track progressShort answer: Standard LLM benchmarks measure specific model capabilities across core dimensions: MMLU tests multi-disciplinary knowledge and reasoning, GSM8K measures grade-school math problem solving, and HumanEval measures Python code synthesis and execution accuracy.
Detail
Evaluating foundation models requires standardized datasets covering diverse reasoning domains:
| Benchmark | Target Capability | Problem Format | Evaluation Method |
|---|---|---|---|
| MMLU (Massive Multitask Language Understanding) | General domain knowledge (57 subjects: humanities, STEM, social sciences) | Multiple-choice (4 options) | Multiple-choice accuracy |
| GSM8K (Grade School Math) | Multi-step mathematical reasoning | Word math problems requiring sequential arithmetic | Exact numeric match on final answer |
| HumanEval | Python code generation | Function signatures + docstrings + unit tests | pass@k functional code execution against hidden unit tests |
| MATH | Advanced competition math | High-school / Olympiad math problems | Exact match on LaTeX numeric expression |
| SWE-bench | Real-world software engineering | Full GitHub issues + repository codebases | Resolving unit test failures across repos |
Understanding pass@k Metric in Code Benchmarks
For code generation (HumanEval), models are evaluated using pass@k, which measures the probability that at least one of generated code samples passes all unit tests:
Where total samples are generated, and samples pass all test cases.
Example
Python calculation of pass@1 score calculation concept:
python
def calculate_pass_at_1(results: list[bool]) -> float:
# results is a list where True = unit tests passed, False = failed
passed = sum(1 for res in results if res)
return passed / len(results) if results else 0.0
test_results = [True, True, False, True, False]
print("pass@1 Accuracy:", calculate_pass_at_1(test_results))Interview tips
- Discuss data contamination: how public benchmark questions can inadvertently bleed into pre-training corpora, inflating performance scores.
- Emphasize that while public benchmarks offer baseline model comparisons, domain-specific evaluation suites tailored to enterprise data are critical for production systems.