Also known as nucleus sampling, this inference parameter restricts token selection to the most probable share of the distribution; 0.1 keeps the top 10%. It shapes diversity, not length, and should be tuned instead of temperature, not with it.
Also called nucleus sampling.
Read more: Microsoft Learn
In the Ultra Transcenders books
Each book explains Top P in context, with comparison tables and the common traps.
Terms in this definition
- Inference
The act of producing a response with a trained model. Each request neither retrains the deployed model nor makes it look up stored training documents.
- State
A parameter in OAuth that carries custom data through the authorisation flow and back, as with the "Support state parameter" option in APIM.
- Token
The unit of text an LLM works with, which may be a word, part of a word or punctuation. Billing, limits and context windows are all counted in these units.
- Share
In OpenSharing, the container you fill with tables, views, volumes, models and notebooks for recipients. You need
CREATE SHAREon the metastore to make one; add a schema and all its assets, including later ones, go with history. - Model temperature
Sampling setting between 0 and 2 controlling how random the output is. Lower values yield focused, repeatable responses and higher ones more creative text; tune this or Top P, but not both.
Related terms
- Foundry playground
Interactive space in the Foundry portal where a deployed model can be tried out before any code is written. Users tweak temperature, top_p, max tokens and the system prompt, compare models and export sample code; production traffic does not belong here.
- Reasoning model
Kind of model, for instance the o-series or GPT-5 series, that produces hidden reasoning tokens before its answer. Temperature, top_p and penalty parameters are unsupported, and
max_completion_tokenssets output length. - top_p
Also known as nucleus sampling, this inference parameter restricts token selection to the most probable share of the distribution; 0.1 keeps the top 10%. It shapes diversity, not length, and should be tuned instead of temperature, not with it.