Top-p (nucleus sampling)

A sampling setting that limits the model's next-word choice to the smallest set of tokens whose probabilities add up to p.

Last updated: · Markdown version

How to apply it in prompts

Use this concept to reduce ambiguity and improve consistency. If you need strict formatting, combine it with a JSON guide and a per-model template.

What it means
Copy-paste example
I will run this prompt with a low top-p for consistency.
Task: write a 2-sentence product description for [product].
Constraints: plain language, one concrete benefit, no superlatives.
Return only the two sentences.
Opens the analyzer with the prompt prefilled.
Open in Promptea
FAQ
What is the difference between top-p and temperature?
Temperature reshapes the probability of every token; top-p cuts the list of candidates to the likeliest ones. Both control randomness, in different ways.
Do I need to set top-p?
Rarely. The provider's default works for most prompts. Reach for it when you call an API and need a specific balance of consistency and variety.