# BLEU and ROUGE, and Their Limits

> What BLEU and ROUGE measure, how they score one sentence, and why counting shared words misses meaning, explained for your AI interview.

**In short:** BLEU and ROUGE score a model's text by counting word chunks it shares with a human reference. They are deterministic, so the same input gets the same score, but they only see shared words, so a sentence with one word reversed can score higher than a correct rewording.

AI and LLM interview question Q252, Evaluation and observability. Intermediate, common (our estimate). From Venkat R. Murty's free Interview Kit: https://designervenkat.online/interview/ai/bleu-and-rouge-and-their-limits

## Say it in 30 seconds

BLEU and ROUGE are old scoring tools. BLEU counts the word chunks a model's text shares with a human reference, and it was built for machine translation. ROUGE does the same and is commonly used for summaries. Both are deterministic, so I use them as a cheap alarm. But they only see words. A correct rewording can score low, and a sentence with one word flipped can score high. So I never ship on them alone. I add a person reading a sample, or a meaning check.

## Say it in 2 minutes

BLEU and ROUGE are automatic scores. They compare a model's text with a reference, a version a person wrote and approved. BLEU came from machine translation in 2002. It counts how many word chunks in the output also appear in the reference, then combines those counts into one overlap score. ROUGE is the summary cousin. It checks how much of the reference shows up in the output.

Their limits come from the same design. Both count words, so they cannot see that two sentences with different words mean the same thing, or that one added word reverses a policy. In a made-up example for a bank's dispute letters, the correct rewording scored 0.62 and the reversed sentence scored 0.84. A 2016 study of dialogue replies found that metrics borrowed from machine translation track human judgement only weakly in one domain, and not at all in another. A 2018 review found BLEU is useful for diagnosing machine translation, but not for judging single texts.

So in an interview I would say: use them as a cheap alarm that flags big drops between model versions. Have a person read a sample of outputs. For free-form answers, add a meaning check, such as a second AI that grades the answer, or human scoring. Then say the trap out loud: a higher score only means more shared words.

## What are BLEU and ROUGE, in plain words?

A translation or a summary is hard to grade by hand at scale. BLEU and ROUGE grade it by machine, by comparing the model's text with a reference: a version a person wrote and approved.

Both tools count words that the output shares with the reference. BLEU counts runs of words in a row (chunks). The simple ROUGE-1 version counts single words. A one-word run is a unigram, and two words in a row is a bigram. The more the model's text shares with the reference, the higher the score.

Think of a bank's compliance reviewer checking a translated dispute letter against the approved Spanish wording. She ticks off phrases one by one. A machine can tick off quickly, but it only ticks words. In a real AI setup, a bank's translation model writes the Spanish version of thousands of letters, and BLEU scores each one against an approved Spanish version.

- **BLEU:** A word-overlap score first built for machine translation.
- **ROUGE:** A word-overlap score that asks how much of the reference the output covers. Commonly used for summaries.
- **Reference:** The human-written answer that the model's text is compared with.
- **N-gram:** A run of n words in a row. One word is a unigram, two words a bigram.

## How does BLEU score a sentence, and what was it built for?

BLEU comes from a 2002 paper titled "Bleu: a Method for Automatic Evaluation of Machine Translation". A 2018 structured review says the evidence supports BLEU for diagnosing machine translation systems, which is what it was first proposed for.

*Diagram, How BLEU scores one sentence: BLEU compares word chunks in the model's sentence with a human reference, then turns the overlap into one score. It only counts chunks.*
1. The model's sentence goes in to be scored.
2. The human reference is the answer key it is checked against.
3. Each chunk counts only as often as the reference holds it.
4. The overlap is turned into one score.

In plain steps: BLEU counts how often each chunk of words in the output appears in the reference. Our code keeps it to one- and two-word chunks. BLEU caps each chunk at the count the reference holds, so repeating a word does not win points. It combines the match rates (two in our code), then applies a brevity penalty when the output is not longer than the reference, so a model cannot score well by saying very little.

Here is a worked case. The reference is "We will refund the fee within five working days". A reworded but correct candidate is "The fee will be refunded within five working days". A candidate with one word added is "We will not refund the fee within five working days".

The code below scores both against the reference. BLEU-2 is a simplified version that checks single words and word pairs. ROUGE-1 recall checks single words only. The correct rewording scores lower on both, and the reversed sentence wins on both, because it shares almost every word.

```python
# Two sentence scores for a bank's dispute letters, with made-up numbers.
# A simplified BLEU-2 (single words and word pairs only) and ROUGE-1 recall.
import math
from collections import Counter

def chunks(words, n):
    return Counter(tuple(words[i:i + n]) for i in range(len(words) - n + 1))

def bleu2(candidate, reference):
    cand, ref = candidate.lower().split(), reference.lower().split()
    precisions = []
    for n in (1, 2):
        c, r = chunks(cand, n), chunks(ref, n)
        matched = sum(min(count, r[g]) for g, count in c.items())
        precisions.append(matched / sum(c.values()))
    brevity = 1.0 if len(cand) > len(ref) else math.exp(1 - len(ref) / len(cand))
    return brevity * math.sqrt(precisions[0] * precisions[1])

def rouge1_recall(candidate, reference):
    cand, ref = Counter(candidate.lower().split()), Counter(reference.lower().split())
    matched = sum(min(count, cand[w]) for w, count in ref.items())
    return matched / sum(ref.values())

reference = "We will refund the fee within five working days"
paraphrase = "The fee will be refunded within five working days"
wrong = "We will not refund the fee within five working days"
for label, sentence in [("Correct, new words", paraphrase), ("Wrong meaning", wrong)]:
    print(f"{label}: BLEU-2 {bleu2(sentence, reference):.2f}, ROUGE-1 recall {rouge1_recall(sentence, reference):.2f}")
```

Output:

```text
Correct, new words: BLEU-2 0.62, ROUGE-1 recall 0.78
Wrong meaning: BLEU-2 0.84, ROUGE-1 recall 1.00
```

*Diagram, Right words, wrong meaning: The two made-up sentences from the code. The reversed one is the trap: a single added word keeps most chunks matched, so the number goes up.*
1. The correct rewording gets 0.62 in our made-up example.
2. The reversed sentence gets 0.84, because almost every word matches.

## Where do BLEU and ROUGE break?

Every limit comes from one design choice: the tools only count words. The main ones are these.

- **Rewording:** A correct paraphrase uses different chunks, so it shares fewer and scores lower.
- **One small edit:** A single word like not can reverse the meaning and still leave most chunks matched.
- **A reference is needed:** No reference, no score. Someone has to write each reference first, and for free-form answers that is a real job.
- **Single texts:** The 2018 review does not support using BLEU to judge individual texts, so read the trend across many examples.

> "They require a ground truth in your dataset" (Google Cloud, Gen AI evaluation)
>
> "We show that these metrics correlate very weakly with human judgements in the non-technical Twitter domain, and not at all in the technical Ubuntu domain." (Liu and colleagues, 2016)
>
> "but does not support using BLEU outside of MT, for evaluation of individual texts, or for scientific hypothesis testing" (Reiter, 2018 review)

The 2018 review covered 284 correlations reported in 34 papers. Its verdict was narrow: BLEU fits diagnosing machine translation, and it does not carry over to judging one text or to testing a scientific claim.

> **Tip:** Asked what is wrong with BLEU? Say it counts shared words, so it can reward a wrong answer that uses the right words. Then name what you add beside it: a person reading a sample, or a meaning check.

## What does the interviewer want to hear?

**A strong answer covers**

- [ ] What BLEU and ROUGE count: shared word chunks against a reference.
- [ ] Where each came from: BLEU for machine translation, ROUGE for summaries.
- [ ] Why a wrong sentence can score high, with a concrete example.
- [ ] Why a correct rewording can score low.
- [ ] Where they still help: a repeatable check that flags big drops across model versions.
- [ ] What to add: a person reading samples, or a meaning-based check.

**Common traps**

- Trap: "A higher BLEU means a better answer." Better: It means more shared words with one reference. Check meaning with people or a second AI grader before you trust it.
- Trap: "BLEU works for any generated text." Better: The 2018 review supports it for diagnosing machine translation. It does not support using BLEU outside MT or for judging individual texts.
- Trap: "ROUGE checks whether the answer is true." Better: ROUGE counts overlapping words with the reference. It cannot tell a true sentence from a false one that uses the same words.

## Can you spot the weak metric?

**Spot the trap:** Your team's summary model scores 0.41 ROUGE on 500 summaries, up from 0.38. Which conclusion is safe?

A. The new model writes better summaries, so ship it today.
B. Word overlap rose a little. Have people read a sample before calling it better.
C. ROUGE proves the summaries are factually correct.
D. The model is worse, because its score is below 0.5.

**Answer:** B. A small rise in shared words is a signal, not proof. ROUGE counts overlap with one reference, so it cannot confirm facts or judge quality on its own.

**Quick check:** In your bank's translation test, a reversed sentence scores higher on BLEU than a correct rewording. What explains it?

A. BLEU only works on English, so the Spanish score is wrong.
B. The reversed sentence shares most word chunks with the reference, and BLEU counts chunks, not meaning.
C. The reversed sentence uses rarer words, so BLEU gives it extra credit.
D. BLEU scores are random, so the result means nothing.

**Answer:** B. BLEU counts shared chunks. One added word can flip the meaning and still leave most chunks matched, so the score stays high.

## Can you answer these from memory?

**Flash cards**

- **What does BLEU count?** Shared word chunks (n-grams) with a human reference. Our code checks only one- and two-word chunks.
- **What was BLEU built for?** Machine translation. Its 2002 paper is about machine translation.
- **How is ROUGE different?** It is recall-oriented: it asks how much of the reference the output covers.
- **Why can a wrong sentence score high?** One changed word, like not, can leave most chunks matching.
- **Do they judge meaning?** No. They count words, so meaning needs a person or a meaning-based check.
- **Are they still useful?** Yes, as a cheap alarm across model versions, never as a verdict.

## Likely follow-up questions

- Q248 What is a golden dataset, and how do you build one? https://designervenkat.online/interview/ai/what-is-a-golden-dataset
- Q249 What is LLM-as-a-judge? https://designervenkat.online/interview/ai/what-is-llm-as-a-judge
- Q251 How do you calibrate a judge against humans? https://designervenkat.online/interview/ai/how-do-you-calibrate-a-judge-against-humans
- Q253 Exact match, accuracy and F1 for LLM tasks? https://designervenkat.online/interview/ai/exact-match-accuracy-and-f1-for-llm-tasks
- Q254 Faithfulness vs relevance? https://designervenkat.online/interview/ai/faithfulness-vs-relevance

## Learn it in depth

- [Evaluation Metrics](https://designervenkat.online/learn/ai-engineering/evaluation-metrics)
