← AI glossary

AI glossary · Basic · Language models · Data & evaluation

Perplexity

Perplexity is a score that measures how well a language model predicts the next token in text it has not seen before. Lower means better prediction. It is a different concept from Perplexity, the AI search company with the same name.

About this term
Level
Basic · Technical terms you often meet in AI news
Added
2026-11-23
In plain words It is similar to counting, on a fill-in-the-blank test, how many candidates a student hesitates between for each blank. A student who always narrows it down to one or two understands the flow of the text better than one who wavers among ten. A limit of this analogy, though, is that filling in blanks well does not guarantee the student is good at real work.

What it is

An LLM is trained to look at preceding text and predict the next token (a piece of text) as a probability. Perplexity shows the model text that was not used in training and summarizes, as a single number, how high a probability the model gave on average to the tokens that actually appeared. The word literally means 'bewilderment,' so it is easy to think of it as how confused the model is when choosing the next token. In practice, people more often look at its logarithm, the cross-entropy loss, instead of perplexity. The two show the same information on different scales.

How it works

First, a set of evaluation texts that the model was not trained on is fixed. The model reads the text from the beginning and outputs a probability for the next token at each position; the higher the probability given to the correct token, the better the score. If there are many positions where the model gave the correct token almost no probability, perplexity rises sharply. Because it can be measured with just text, without people separately labeling answers, it has long been used as a basic metric for checking whether pretraining is going well.

Why it is getting attention

In a November 22, 2026 post titled 'Perplexity and Intelligence,' OpenAI chief scientist Jakub Pachocki proposed using perplexity as a common yardstick for developers to compare the pace of AI progress and set shared safety standards. In the post, OpenAI disclosed for the first time figures measured on an evaluation dataset built from its internal codebase. OpenAI said GPT-3.5, at a log perplexity of about 0.99, held fluent conversations; GPT-4, at about 0.91, made good use of CoT (Chain-of-Thought) reasoning; and once the value dropped below 0.8, game-changing capabilities in cybersecurity and mathematics appeared. It also said that after switching to a model at about 0.76, it began getting breakthrough results on open math problems. OpenAI's proposal is that, since benchmarks saturate quickly but perplexity can be used for a long time, the ability to understand and monitor AI behavior should reach predetermined milestones before models pass certain values.

Log perplexity by model, as reported by OpenAI

GPT-3.5
GPT-4
Math breakthrough model
Approximate values published by OpenAI, measured on OpenAI's internal evaluation dataset. Lower values mean better next-token prediction. They cannot be directly compared with other companies' figures.

Things to know

Perplexity varies greatly depending on which text and which tokenizer it is measured with, so numbers should not be compared directly between models measured under different conditions. The OpenAI figures above are also based on its own internal dataset and cannot be directly compared with other companies' models. OpenAI itself listed as limitations that cross-developer comparison is difficult, that there is a gap with real task performance, that it does not reflect progress after pretraining such as fine-tuning and reinforcement learning, and that the lower bound on how far it can drop is unknown. If data contamination occurs, where evaluation text gets mixed into training data, scores can come out better than they really are.

Example

Perplexity is also often used as a reference in research on making models lighter. The LazyWeights paper covered on this site compressed quantized weights further to run LLMs on edge devices, and compared how much size could be reduced while keeping perplexity degradation within a set limit. In practice, too, after quantizing or fine-tuning a model, teams often first re-measure perplexity on the same evaluation text to check that it has not gotten much worse than the original model.

Where it came up on this site

Related terms

References