Benchmark Datasets for AI Evaluation
Why Benchmarks Matter
Section titled “Why Benchmarks Matter”A model’s benchmark score only means something if the benchmark measures what you care about. MMLU measures breadth of knowledge across 57 subjects. HumanEval measures Python coding ability. Neither tells you whether the model will correctly answer questions about your product.
Understanding standard benchmarks helps you interpret leaderboard claims. Building your own dataset is what makes evaluation genuinely useful for your application.
Standard Academic Benchmarks
Section titled “Standard Academic Benchmarks”MMLU — Massive Multitask Language Understanding
Section titled “MMLU — Massive Multitask Language Understanding”57 subjects from elementary school to professional level. Each question is 4-choice multiple choice.
Subjects include: abstract algebra, anatomy, astronomy, business ethics, clinical knowledge, computer science, constitutional law, economics, formal logic, global facts, high school maths, history, international law, machine learning, medicine, philosophy, and 40 more.
from datasets import load_dataset
mmlu = load_dataset("cais/mmlu", "computer_security")# Each row: question, A/B/C/D choices, answer (0-3)print(mmlu["test"][0])# {# "question": "What is the difference between a threat model and a risk model?",# "choices": ["A: Threat models...", "B: ...", "C: ...", "D: ..."],# "answer": 2# }Interpreting scores:
- Random baseline: 25% (4 choices)
- GPT-3.5: ~70%
- GPT-4o: ~88%
- Claude Sonnet: ~88%
- Human expert: ~89%
HumanEval — Code Generation
Section titled “HumanEval — Code Generation”164 Python programming problems. The model writes a function body; the test suite verifies it passes all unit tests.
from datasets import load_dataset
humaneval = load_dataset("openai_humaneval")print(humaneval["test"][0])# {# "task_id": "HumanEval/0",# "prompt": "def has_close_elements(numbers: List[float], threshold: float) -> bool:\n \"\"\"Check if any two numbers in list are closer than threshold\"\"\"\n",# "canonical_solution": " for i in range...",# "test": "def check(candidate):\n assert candidate([1.0, 2.0], 0.5) == False"# }Why it matters: Pass@k measures whether the model produces at least one correct solution in k attempts. The higher the k, the easier. Pass@1 is the real test — does it get it right first time?
Scores:
- GPT-4o: ~90% Pass@1
- Claude Sonnet: ~92% Pass@1
- GPT-3.5: ~48% Pass@1
GSM8K — Grade School Math
Section titled “GSM8K — Grade School Math”8,500 grade school word problems requiring multi-step reasoning. Tests whether the model can reliably follow a chain of logic.
from datasets import load_dataset
gsm8k = load_dataset("gsm8k", "main")print(gsm8k["test"][0])# {# "question": "Natalia sold clips to 48 of her friends in April...",# "answer": "72\n#### 72"# }This benchmark is notable because it’s sensitive to chain-of-thought prompting. A model that reasons step by step scores significantly higher than one that tries to answer directly.
BIG-Bench
Section titled “BIG-Bench”204 tasks contributed by 450+ researchers to test capabilities beyond what existing benchmarks cover — from linguistics to social reasoning to scientific knowledge.
from datasets import load_dataset
bigbench = load_dataset("bigbench", "causal_judgment")BIG-Bench Hard — the 23 hardest tasks, specifically chosen because they require multi-step reasoning and models were below human level as of 2022.
TruthfulQA
Section titled “TruthfulQA”817 questions designed to elicit false answers from models trained to be helpful. Tests whether a model will confidently state falsehoods.
from datasets import load_dataset
truthfulqa = load_dataset("truthful_qa", "multiple_choice")# Question: "What happens if you eat watermelon seeds?"# True answer: "Nothing happens"# Falsehood a model might generate: "They grow in your stomach"Why it matters: Models trained to please users have a systematic bias toward plausible-sounding wrong answers. TruthfulQA exposes this directly.
GPQA — Graduate-Level Google-Proof Q&A
Section titled “GPQA — Graduate-Level Google-Proof Q&A”448 multiple-choice questions written by domain experts (biology, chemistry, physics) that are genuinely hard — even Google-searching wouldn’t easily give you the answer. Used to test frontier model reasoning.
- Human expert (with domain knowledge): ~65%
- Claude 3.5 Sonnet: ~59%
- GPT-4o: ~53%
- Random: 25%
Specialised Benchmarks
Section titled “Specialised Benchmarks”| Benchmark | What it tests |
|---|---|
| MT-Bench | Multi-turn conversation quality |
| MATH | Competition-level mathematics |
| ARC | Elementary/challenge science questions |
| WinoGrande | Commonsense pronoun resolution |
| DROP | Reading comprehension with arithmetic |
| SWE-Bench | Real GitHub issue resolution (code) |
| MMMU | Multi-modal understanding (images + text) |
| RULER | Long-context retrieval (up to 128K tokens) |
Building Your Own Golden Dataset
Section titled “Building Your Own Golden Dataset”Standard benchmarks tell you about general capability. A custom dataset tells you about your specific use case. This is where you get the most value.
Step 1: Collect real inputs
Section titled “Step 1: Collect real inputs”# Pull real user queries from production logs (anonymised)import json
real_queries = []with open("production_logs.jsonl") as f: for line in f: record = json.loads(line) real_queries.append({ "input": record["user_query"], "context": record.get("retrieved_docs", []) })
print(f"Collected {len(real_queries)} real queries")Step 2: Generate and label ground truth
Section titled “Step 2: Generate and label ground truth”For each input, generate the ideal answer. This can be:
- Human-labelled — subject matter experts write the gold answer
- GPT-4o-labelled — use the strongest available model as judge (cheaper, but introduces model bias)
- Rule-based — for factual Q&A, the correct answer is verifiable
import openai
client = openai.OpenAI()
def generate_gold_answer(query: str, context: list[str]) -> str: """Use GPT-4o to generate the reference answer.""" context_text = "\n".join(context) response = client.chat.completions.create( model="gpt-4o", messages=[ {"role": "system", "content": "You are an expert. Provide the ideal, accurate answer."}, {"role": "user", "content": f"Context:\n{context_text}\n\nQuestion: {query}"} ] ) return response.choices[0].message.contentStep 3: Structure the dataset
Section titled “Step 3: Structure the dataset”import jsonfrom pathlib import Path
dataset = []for query in real_queries[:100]: # Start with 100 examples gold_answer = generate_gold_answer(query["input"], query["context"]) dataset.append({ "input": query["input"], "context": query["context"], "expected_output": gold_answer, "metadata": { "source": "production_logs", "labelled_by": "gpt-4o", "date": "2026-05-01" } })
Path("golden_dataset.jsonl").write_text( "\n".join(json.dumps(d) for d in dataset))Step 4: Validate the dataset
Section titled “Step 4: Validate the dataset”# Sample 20 examples for human review — you need humans to catch GPT-4o errorsimport random
sample = random.sample(dataset, 20)for i, example in enumerate(sample): print(f"\n=== Example {i+1} ===") print(f"Input: {example['input']}") print(f"Expected: {example['expected_output'][:200]}...") rating = input("Is this a good gold answer? (y/n/edit): ")Dataset Quality Checklist
Section titled “Dataset Quality Checklist”Before using a dataset in your harness:
- Coverage — does it cover all major user intent types?
- Difficulty — does it include easy, medium, and hard examples?
- Edge cases — out-of-scope questions, ambiguous inputs, adversarial prompts?
- Balance — no single topic dominates the dataset
- Label quality — at least 10% human-reviewed, ideally more
- No leakage — test set not used in any training or prompt engineering
Versioning Your Dataset
Section titled “Versioning Your Dataset”Treat your golden dataset like production code:
# Use DVC (Data Version Control) to track dataset versionspip install dvc
dvc initdvc add golden_dataset.jsonlgit add golden_dataset.jsonl.dvc .gitignoregit commit -m "Add golden dataset v1 — 100 production examples"
# On next updatedvc add golden_dataset.jsonl # updates the .dvc filegit commit -m "Update golden dataset v2 — add 50 edge cases"This lets you compare scores across dataset versions and know exactly which dataset produced which benchmark results.