BLEU score comes up in a meeting. What does it measure and when does it still make sense?
BLEU measures n-gram precision between generated and reference text, designed for machine translation where valid outputs share phrasing. Misleading for open-ended generation.
Imagine you asked ten translators to translate the same paragraph from French to English. Their translations would use mostly the same words in mostly the same order, because there are only so many natural ways to say the same thing in English. BLEU takes advantage of this. It looks at the machine's translation and checks how many of its word sequences (single words, pairs, triples, groups of four) also appear in the human reference translation. The more matches, the higher the score. There is also a penalty for outputs that are too short, since a very short translation could get all its words right but miss half the meaning. This works well for translation because the outputs are constrained. But if you asked ten people to write a creative story about a cat, they would use completely different words. BLEU would score all of them poorly against any single reference, even though they are all good stories.
Detailed answer & concept explanation~5 min readEverything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
5 min: define BLEU as n-gram precision with brevity penalty, explain the four n-gram levels, name translation as the valid use case, explain why it fails on open-ended generation, and name BERTScore and LLM-judge as replacements.
Real products, models, and research that use this idea.
- Google Translate reports BLEU scores internally on its translation benchmarks, and BLEU improvements correlate with user preference gains for the translation use case.
- The WMT (Workshop on Machine Translation) annual shared task uses BLEU as one of its primary evaluation metrics alongside human evaluation.
- Hugging Face's evaluate library includes a BLEU implementation that is commonly used for translation model comparisons in open-source research.
What an interviewer would ask next. Try answering before peeking at the approach.
QHow does modified n-gram precision differ from standard n-gram precision, and why does the modification matter?
Don't say thisRed flags and common mistakes that signal junior thinking. Click to expand.
Red flags and common mistakes that signal junior thinking. Click to expand.
Applying BLEU to open-ended generation tasks like summarization or dialogue. BLEU penalizes valid paraphrases because it only counts exact n-gram matches, making it a poor proxy for quality on tasks with diverse valid outputs.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.
Same topic, related formats. Practice these next.