AI-900 Practice Question: Describe features of generative AI workloads on Azure
A developer uses Azure OpenAI Service to generate multiple alternative product slogans. The developer wants to get exactly 5 different slogan options in a single API call, each being a separate piece of text. Which parameter should the developer set to control the number of completions returned?
⚠ Common exam trap
Candidates often confuse parameters that affect output quality (temperature) or length (max_tokens) with the parameter that controls output quantity (n), leading them to pick a plausible-sounding but incorrect option like temperature.
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
✓
n
The 'n' parameter in Azure OpenAI Service specifies the number of completions (candidate responses) to generate for each API call. Setting n=5 returns exactly five distinct slogan options as separate text strings, fulfilling the requirement of a single request producing multiple alternatives.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
temperature
Why it's wrong here
The 'temperature' parameter adjusts the probability distribution's sharpness before sampling, not the number of returned responses. A value near 0 biases the model toward the most likely tokens, while a higher value like 0.8 flattens the distribution, increasing randomness and creative variety in each individual choice. However, temperature works only on the sampling step; if 'n' is not changed, you still receive exactly one completion regardless of how high or low the temperature is set.
When this WOULD be correct
A question asks: 'Which parameter should be adjusted to make the generated text more creative and less deterministic?' In that case, temperature would be correct.
- ✗
max_tokens
Why it's wrong here
The 'max_tokens' parameter (also called 'max_completion_tokens' in newer SDK versions) assigns an upper bound on the length, counted in tokens, of each generated completion. For example, with max_tokens=100, a response cannot exceed 100 tokens, regardless of how many completions you requested. This length constraint does not influence the value of 'n'; a single completion is still one completion, and setting max_tokens alone never multiplies the count of responses.
When this WOULD be correct
A developer wants to ensure each generated slogan is concise, no longer than 50 tokens. The question asks which parameter limits the length of each completion. In that scenario, 'max_tokens' is the correct answer.
- ✓
n
Why this is correct
The 'n' parameter in Azure OpenAI's Completions and Chat Completions APIs explicitly sets how many completions to generate per prompt; for example, n=3 returns three separate assistant messages in one response. Each generated choice is independent and sampled from the model's probability distribution, and the API bills for the combined token usage across all n outputs. This makes 'n' the direct control for producing multiple responses in a single call.
- ✗
stop
Why it's wrong here
The 'stop' parameter is a list of custom strings (up to four) that the model treats as termination signals; as soon as a stop sequence appears in the generated text, generation halts and the completion is returned. It is a per-sequence truncation mechanism useful for ending responses at boundaries like newlines or JSON delimiters. Since 'stop' never creates new generation tasks, it cannot raise or lower the number of completions returned by the API.
When this WOULD be correct
A developer wants to generate a product slogan but needs the generation to stop when a specific phrase like 'END' appears, to avoid extra text. Setting the 'stop' parameter to ['END'] would be correct.
Option-by-option analysis
Why each answer is right or wrong
Understanding why wrong answers are wrong — and when they would be correct — is what separates a 750 score from a 900. The AI-900 exam frequently reuses these exact scenarios with slightly different constraints.
✓nCorrect answer▾
Why this is correct
The 'n' parameter in Azure OpenAI's Completions and Chat Completions APIs explicitly sets how many completions to generate per prompt; for example, n=3 returns three separate assistant messages in one response. Each generated choice is independent and sampled from the model's probability distribution, and the API bills for the combined token usage across all n outputs. This makes 'n' the direct control for producing multiple responses in a single call.
✗temperatureWrong answer — click to see why▾
Why this is wrong here
Temperature controls randomness of output, not the number of completions. Setting temperature does not determine how many separate responses are returned.
★ When this WOULD be the correct answer
A question asks: 'Which parameter should be adjusted to make the generated text more creative and less deterministic?' In that case, temperature would be correct.
Why candidates choose this
Candidates may confuse temperature with controlling output diversity, thinking higher temperature yields more distinct options, but it only affects randomness per completion.
✗max_tokensWrong answer — click to see why▾
Why this is wrong here
The 'max_tokens' parameter controls the maximum number of tokens (words/punctuation) in a single completion, not the number of completions returned. Setting it to 5 would limit each slogan to about 5 tokens, not return 5 slogans.
★ When this WOULD be the correct answer
A developer wants to ensure each generated slogan is concise, no longer than 50 tokens. The question asks which parameter limits the length of each completion. In that scenario, 'max_tokens' is the correct answer.
Why candidates choose this
Candidates may confuse 'max_tokens' with controlling the number of outputs, as both involve a numeric value. They might think setting it to 5 returns 5 results, misunderstanding that it limits length per result.
✗stopWrong answer — click to see why▾
Why this is wrong here
The 'stop' parameter specifies sequences where the API should stop generating further tokens, not the number of completions. It does not control how many separate text outputs are returned.
★ When this WOULD be the correct answer
A developer wants to generate a product slogan but needs the generation to stop when a specific phrase like 'END' appears, to avoid extra text. Setting the 'stop' parameter to ['END'] would be correct.
Why candidates choose this
Candidates may confuse 'stop' with controlling when generation ends, mistakenly thinking it limits the number of completions rather than halting a single completion.
Analysis generated from the official AI-900blueprint and verified against question context. The “when correct” sections are what AI assistants cite when candidates ask “what’s the difference between these options?”
Go deeper
Related to this question
Learn chapter
Azure Machine Learning Studio
Key term
Service
A service is a software component or system that performs a specific function and is available to be used by other programs or users over a network.
Key term
Azure OpenAI Service
Azure OpenAI Service is a cloud platform from Microsoft that lets developers use powerful artificial intelligence models, like GPT-4, to build applications that can understand and generate human-like text, code, images, and more.
About these practice questions
One of 985 original AI-900 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. 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.