What does perplexity measure and why is low perplexity insufficient for quality?
Same topic, related formats. Practice these next.
Same topic, related formats. Practice these next.
Perplexity is the exponential of average negative log-likelihood on held-out text. Lower means a better fit to the text distribution, but it measures fluency, not factual accuracy or helpfulness.
Imagine a friend who is amazing at finishing your sentences. You start saying 'Once upon a...' and they instantly guess 'time'. Perplexity is a score for how rarely this friend is surprised by the next word. A low score means they are almost never caught off guard, so they predict text smoothly. But being a great sentence-finisher does not make them honest or useful. They could confidently finish 'The capital of Australia is...' with 'Sydney', which sounds perfectly natural yet is wrong. Perplexity only rewards sounding likely, not being correct or answering what you actually asked. That is why a model can have low perplexity and still hallucinate facts or ignore your instructions.
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.
3 min: define perplexity as exp of average negative log-likelihood, give the branching-factor intuition, then explain why it measures fluency not quality and breaks across tokenizers and after alignment.
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.
Treating perplexity as a quality score. It only measures how well the model predicts held-out tokens, not whether answers are factual, helpful, or follow instructions.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.