Perplexity — AI Glossary

Perplexity is a standard metric for evaluating how well a language model predicts a sequence of text. Mathematically, it represents the exponential of the average negative log-likelihood per token — intuitively, it measures how "surprised" the model is by the text it encounters. Lower perplexity indicates better prediction quality, meaning the model assigns higher probabilities to the actual next tokens.