AI-900 Practice Question: Describe features of generative AI workloads on Azure
What is the purpose of 'top_p' (nucleus sampling) in Azure OpenAI API calls?
⚠ Common exam trap
Candidates often confuse 'top_p' with a simple 'top-k' count or a quality threshold, when in fact it is a cumulative probability cutoff that dynamically adjusts the candidate set size based on the model's confidence distribution.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
A sampling method that restricts token selection to the most probable token set
'top_p' (nucleus sampling) in Azure OpenAI API calls controls the cumulative probability threshold for token selection. Instead of considering all possible next tokens, the model selects from the smallest set of tokens whose cumulative probability exceeds the 'top_p' value (e.g., 0.9 means the model considers only the top tokens that together have a 90% chance). This reduces randomness while allowing more natural variation than fixed 'top_k' sampling.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
The maximum number of paragraphs in the generated response
Why it's wrong here
The number of paragraphs in generated text is a formatting or length property, influenced by parameters such as max_tokens, stop sequences, or the prompt's instruction, not by top_p. top_p operates at the token level, modifying the probability distribution from which each next token is drawn, and has no direct control over document structure, paragraph breaks, or response length. Confusing these conflates content length with the statistical sampling mechanism that shapes word choice.
- ✓
A sampling method that restricts token selection to the most probable token set
Why this is correct
top_p, also called nucleus sampling, is a sampling method where at every decoding step the model sorts all candidate tokens by descending probability and selects the smallest set whose cumulative probability reaches p (e.g., 0.95). It then samples only from that high-probability token set, proportionally to their probabilities. This restricts token selection to the most probable subset while still allowing some stochastic variation, controlling output diversity more directly than a fixed top-k cutoff.
- ✗
A parameter that sets the minimum response quality threshold
Why it's wrong here
There is no generation parameter that sets an explicit 'minimum response quality threshold'; quality is measured afterward via human judgment, automated metrics, or downstream task performance. top_p instead controls the statistical diversity of sampling by choosing tokens from a dynamic nucleus of the probability distribution. It neither guarantees factual correctness nor enforces a baseline for linguistic quality, so this description mischaracterizes both its purpose and its mechanism.
- ✗
The priority level of the API request in a queue
Why it's wrong here
Request priority in a queue is an API-management concern, typically handled by gateways, rate limiters, or message-queue ordering to decide which incoming call gets processed first. It has nothing to do with how the language model selects output tokens. top_p (nucleus sampling) is a decoding parameter that shapes response diversity by controlling which subset of vocabulary tokens can be sampled at each generation step, not the queuing or scheduling of API requests.
Go deeper
Related to this question
Learn chapter
Azure Machine Learning Studio
Key term
Model
In IT and AI, a model is a trained mathematical representation that learns patterns from data to make predictions or decisions.
Key term
Token
A token is a digital or physical object that represents a set of permissions or access rights, used to verify identity or grant access in computer systems.
About these practice questions
This AI-900 question is part of Courseiva's 985-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This AI-900 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AI-900 exam.