# Top-p

Canonical page: https://www.theglitch.ai/ai-glossary/top-p

A setting that limits the model to the smallest set of likely next tokens whose chances add up to p.

[Top-p, common card \#234 in The Glitch AI glossary: A setting that limits the model to the smallest set of likely next tokens whose chances add up to p.](https://www.theglitch.ai/images/cards/glossary/top-p.png?v=a6e4ab1c3062f58e)

GLS 234 · common

Also called: Nucleus sampling.

For: Builders

## Why it matters

Like temperature, it trades variety for predictability.

## In practice

At top-p 0.9 the model ignores the long tail of unlikely words.

## Watch for

Change temperature or top-p, not both, so you know what helped.

## Related terms

[Temperature](https://www.theglitch.ai/ai-glossary/temperature) · [Seed](https://www.theglitch.ai/ai-glossary/seed)

## Sources

- [Wikipedia: Top-p sampling](https://en.wikipedia.org/wiki/Top-p_sampling)

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)
