# Perplexity (metric)

Canonical page: https://www.theglitch.ai/ai-glossary/perplexity-metric

A score for how surprised a language model is by a piece of text; lower means it predicted the text better.

[Perplexity (metric), common card \#164 in The Glitch AI glossary: A score for how surprised a language model is by a piece of text; lower means it predicted the text better.](https://www.theglitch.ai/images/cards/glossary/perplexity-metric.png?v=e059e9c7a9c52432)

GLS 164 · common

Also called: PPL.

For: Builders

## Why it matters

It is a core training number, and worth knowing so you don’t confuse it with the search company of the same name.

## In practice

A model with lower perplexity on legal text usually handles contracts better.

## Watch for

Low perplexity doesn’t mean helpful or truthful answers.

## Related terms

[Next-token prediction](https://www.theglitch.ai/ai-glossary/next-token-prediction) · [Evaluation](https://www.theglitch.ai/ai-glossary/evaluation) · [Pre-training](https://www.theglitch.ai/ai-glossary/pre-training)

## Sources

- [Hugging Face docs: Perplexity of fixed-length models](https://huggingface.co/docs/transformers/perplexity)

- [Wikipedia: Perplexity](https://en.wikipedia.org/wiki/Perplexity)

Definition updated 2026-10-29.

[The Ultimate AI Glossary (2027): every term](https://www.theglitch.ai/ai-glossary)

---

Site: [The Glitch](https://www.theglitch.ai) · [About Rabin](https://www.theglitch.ai/about) · [Agent guide](https://www.theglitch.ai/agent.md)
