Courseiva

AI-900 Practice Question: Describe features of generative AI workloads on Azure

A developer uses Azure OpenAI Service to generate short product descriptions. The developer notices that the model sometimes produces nonsensical or very low-probability words that make the output less coherent. The developer wants to reduce the chance of such outputs while still allowing some creative variability. Which parameter should the developer adjust in the API request?

⚠ Common exam trap

A common mix-up: candidates confuse temperature (which controls randomness uniformly) with top_p (which controls the cumulative probability cutoff), and incorrectly assume lowering temperature is the only way to reduce nonsensical outputs, ignoring that top_p can achieve the same goal while preserving more creative variability.

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

Set the top_p parameter to a value like 0.9

Setting `top_p` to 0.9 (nucleus sampling) instructs the model to consider only the tokens whose cumulative probability mass reaches 90%, thereby cutting off very low-probability (nonsensical) tokens while still allowing creative variability from the top 90% of likely tokens. This directly addresses the developer's goal of reducing incoherent outputs without fully deterministic generation.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Decrease the temperature parameter to 0.1

    Why it's wrong here

    Temperature controls the randomness of token selection; reducing it makes outputs more deterministic but does not directly filter out low-probability tokens. It may still choose a very improbable token if it has a high rank.

    When this WOULD be correct

    A developer wants to generate highly predictable, factual outputs (e.g., legal disclaimers) and is willing to sacrifice creativity for consistency. Decreasing temperature to near 0 would be correct.

  • Set the top_p parameter to a value like 0.9

    Why this is correct

    Top_p (nucleus sampling) filters out low-probability tokens by only considering the smallest set of tokens whose cumulative probability is >= top_p. This reduces the chance of nonsensical words while allowing creativity from the remaining higher-probability tokens.

  • Increase the stop parameter to include more stop sequences

    Why it's wrong here

    Increasing the stop parameter adds additional strings that cause generation to halt as soon as they are encountered, acting purely as a post-hoc cutoff condition. It does not modify the token probability distribution from which the model samples at each decoding step, so low-probability or nonsensical tokens can still be generated before any stop sequence appears. Stop sequences are useful for controlling output formatting or ending boundaries, but they have no influence on which tokens are selected during generation.

    When this WOULD be correct

    A developer wants to prevent the model from generating certain phrases or repeating specific patterns in the output. By adding those phrases as stop sequences, the model will halt generation when they appear, ensuring the output avoids unwanted content.

  • Increase the max_tokens parameter to allow longer descriptions

    Why it's wrong here

    Increasing max_tokens only raises the maximum number of tokens the model may emit, without changing the per-token sampling probabilities or the ranking of candidates. Since each token is still selected from the original distribution, the chance of a low-probability token occurring is unchanged; indeed, a longer output provides more opportunities for such tokens to appear. Thus, while it allows longer descriptions, it does nothing to filter or reduce improbable token selections.

    When this WOULD be correct

    A developer wants to generate longer, more detailed product descriptions without the output being cut off mid-sentence. Increasing max_tokens would allow the model to produce longer completions.

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.

Set the top_p parameter to a value like 0.9Correct answer

Why this is correct

Top_p (nucleus sampling) filters out low-probability tokens by only considering the smallest set of tokens whose cumulative probability is >= top_p. This reduces the chance of nonsensical words while allowing creativity from the remaining higher-probability tokens.

Decrease the temperature parameter to 0.1Wrong answer — click to see why

Why this is wrong here

Decreasing temperature to 0.1 makes the model highly deterministic, reducing creativity and variability, but the question asks to reduce nonsensical outputs while allowing some creative variability. Temperature reduction alone may not effectively filter out low-probability tokens; top_p sampling is more targeted.

★ When this WOULD be the correct answer

A developer wants to generate highly predictable, factual outputs (e.g., legal disclaimers) and is willing to sacrifice creativity for consistency. Decreasing temperature to near 0 would be correct.

Why candidates choose this

Candidates know that lower temperature reduces randomness, so they assume it will fix nonsensical outputs, but they overlook that top_p directly addresses low-probability tokens while preserving controlled variability.

Increase the stop parameter to include more stop sequencesWrong answer — click to see why

Why this is wrong here

Increasing stop sequences does not affect the randomness or creativity of token selection; it only terminates generation early when specific sequences are encountered, which does not reduce nonsensical low-probability words.

★ When this WOULD be the correct answer

A developer wants to prevent the model from generating certain phrases or repeating specific patterns in the output. By adding those phrases as stop sequences, the model will halt generation when they appear, ensuring the output avoids unwanted content.

Why candidates choose this

Candidates may think that adding more stop sequences will filter out bad outputs, confusing output control with randomness reduction.

Increase the max_tokens parameter to allow longer descriptionsWrong answer — click to see why

Why this is wrong here

Increasing max_tokens only extends the length limit of the output, but does not address the issue of low-probability or nonsensical word choices. The problem is about output coherence and randomness, not about truncation.

★ When this WOULD be the correct answer

A developer wants to generate longer, more detailed product descriptions without the output being cut off mid-sentence. Increasing max_tokens would allow the model to produce longer completions.

Why candidates choose this

Candidates may think that allowing more tokens gives the model more 'room' to produce coherent text, but coherence is controlled by temperature and top_p, not by length limits.

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?”

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 →

How Courseiva writes practice questions · Editorial policy

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.