What is benchmark contamination, and how can you detect or avoid it?
Evals · Pro 1
Short answer
Contamination is when a model was trained on a benchmark's questions, so its score shows memory rather than skill. Labs detect it by checking for long word sequences shared between test and training data, or by seeing if the model finds the test text unusually easy to predict. The safest guard is your own private, unseen test set.
Deeper answer
Public benchmarks are posted online, so their questions end up in web crawls and in training data, often by accident. The two common checks are n-gram overlap, which needs access to the training data, and perplexity, where very low perplexity on test questions suggests the model has seen them.
As a user of models you rarely see training data, so treat scores on old, popular benchmarks with care, prefer fresh benchmarks, and keep a private test set from your own data that never goes online. The same problem happens inside your own project if test examples leak into fine-tuning data.
What a strong answer covers
- The model saw test questions during training
- Scores then show memory, not skill
- Detect with n-gram overlap or perplexity
- Guard with a private, unseen test set
Answer it out loud in the mock interview about 1 min
Follow-ups to expect
- Why can't you usually run an n-gram check yourself on a hosted model?
- How do you stop your own test set from leaking into training?
Common mistakes
- Thinking contamination is always deliberate cheating
- Forgetting that your own test set can leak too
Learn it
Choosing a model: benchmarks, leaderboards and your own tests
- How do you evaluate an agent, beyond checking its final answer?
- How would you evaluate an LLM application?
- How do you evaluate a RAG system?
- How would you build a test set for an LLM feature when you have no labelled data?
- What are the pros and cons of using an LLM as a judge?
- A new model has just topped a public leaderboard. Your manager wants to switch. What do you do?
- What is the difference between pointwise and pairwise evaluation, and when would you use each?
- How do you stop a prompt or model change from breaking things that used to work?
- How would you evaluate an LLM feature whose answers are open-ended text?