Intermediate · 08
How we test language models
Benchmarks, leaderboards, human votes and AI judges: how anyone decides one model is better than another, and why it's harder than it looks.
7 min read · Tap underlined words for a definition
Swipe up to begin
For a spam filter, testing is easy: count right and wrong answers on held-out emails. For a that writes essays and code, "right" is fuzzy. The field uses several kinds of test, each with blind spots. A test suite for models is usually called an eval.
Benchmarks
A fixed set of questions with known answers: maths problems, multiple-choice exams, coding tasks with unit tests. A benchmark gives one comparable number.
Weakness: once a is famous, its questions leak onto the web and into . A model can score well by memory, not skill. This is called contamination.
Human preference votes
Show people two anonymous answers to the same and ask which is better. Thousands of votes produce a ranking, like chess ratings.
Weakness: people favour confident, long, nicely formatted answers, even when a shorter one is more correct.
Why can a model score highly on a famous benchmark without really having the skill?
AI as the judge
A strong model grades another model's answers against a rubric. It's cheap and fast, so teams can test thousands of cases on every change.
Weakness: judges have biases too, such as preferring answers that sound like themselves. Teams spot-check a sample by hand.
Your own evals beat leaderboards
If you build with AI, collect 50 to 100 real examples from your use case with what a good answer looks like. Run every model or prompt change against them. That tells you more than any public ranking.
Add your own test cases. Notice how a score alone hides where the model fails; reading the failures is where you learn.
You're building a customer-support bot. What's the most useful way to compare two models?
Before you drift off
- Benchmarks give comparable numbers but can be contaminated.
- Human votes and AI judges measure quality, each with their own biases.
- For real products, a small set of your own examples is the best eval.
Terms in this lesson
Go deeper, free and open
- HELM: Holistic Evaluation of Language Models · Stanford CRFM
- LMArena · LMArena · Human-preference leaderboard
- The LLM Evaluation Guidebook · Hugging Face · Free
That's the lesson
How we test language models · 7 min
Spotted a mistake? Suggest an edit
Previous: Embeddings: meaning as maps