Log inStart free
LESSON 14.02 · 6 STAGES · 2 CONTROLS · 3 CHECKSPRO · PREVIEW

Overlap metrics: exact match, F1, BLEU and ROUGE

Watch four scores count the words a model output shares with a reference.


Pro lesson. Stage 1 is free to watch. Pro opens all 6 stages, 2 controls and 3 checks, in this lesson and every other.

Go Pro · $8.25/mo
EXPLAINER · 14.02 · SCORE BAYEM 0 · 7 VS 6 WORDS
01
Stage 1 of 6 · Exact match
Exact match scores 1 only if the whole candidate equals the reference. Here it scores 0.
Explain it simply

The top row is the reference, the answer a person wrote. The bottom row is the candidate, the output of a model. Exact match asks one question: is the whole string the same? One different word drops the score from 1 to 0.

Two rows of word cells. The reference is the cat sat on the mat. The candidate is a cat was sitting on the rug. Exact match is 0.

referencecandidate, matchclippedno matchbrevity penalty
referencecandidatethecatsatonthematacatwassittingontherugscoresEM0≠exact matchEM = 0referencecandidatethecatsatonthematacatwassittingontherugscoresEM0≠exact matchEM = 0
Toy: 1 reference of 6 words, 5 candidates
STAGE 1 / 6
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
EM=1[ y^=y ]\sy{em}{out}{\mathrm{EM}} = \mathbb{1}\left[\,\sy{cand}{out}{\hat y} = \sy{ref}{data}{y}\,\right]
EM=0\mathrm{EM} = 0

Exact match is 1 if the two strings are equal, else 0.

Common mix-ups

MYTHA high overlap score means the same meaning.

The fix, and 1 more mix-up with the diagram to show them, come with Pro.

Predict, then reveal
3 CHECKS · PRO
Q01The repeats candidate says “the” six times. How many of its 6 unigrams does BLEU count?

Make your guess, then test it in the diagram. All 3 checks come with Pro.

PRO LESSON · YOU WATCHED STAGE 1 OF 6
Unlock the full explainer
  • 5 more stages and 2 live controls
  • 2 mix-up cards and 3 predict-then-reveal checks
  • Watch it as a narrated video, in three voices
  • Every Pro lesson and capstone · 656 in total

$99 a year, or $15 a month. Cancel any time.