BLEU score comes up in a meeting. What does it measure and when does it still make sense?
Same topic, related formats. Practice these next.
Same topic, related formats. Practice these next.
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.
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.
What an interviewer would ask next. Try answering before peeking at the approach.
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.