AI-900 Practice Question: Describe features of generative AI workloads on Azure
A company uses Azure OpenAI Service to generate marketing copy. They notice that sometimes the generated text contains repetitive phrases or gets stuck in loops. They want to reduce this behavior without changing the overall creativity of the model. Which parameter should they adjust?
⚠ Common exam trap
Many candidates confuse frequency_penalty with presence_penalty, assuming both reduce repetition equally, but frequency_penalty specifically targets repeated occurrences while presence_penalty only discourages topic reuse.
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
✓
Increase the frequency_penalty parameter.
Increasing the frequency_penalty parameter reduces the likelihood of the model repeating the same phrases by penalizing tokens that have already appeared in the generated text. This directly addresses the repetitive loops without altering the overall creativity, as frequency_penalty specifically targets token frequency rather than randomness or diversity.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Increase the frequency_penalty parameter.
Why this is correct
Increasing the frequency_penalty parameter directly addresses repetitive loops by penalizing tokens proportionally to how often they have already appeared in the generated text. As the model assigns a logit score to each token, the penalty subtracts an amount that grows with each repetition, pushing it to choose less frequent alternatives. This count-based mechanism is the most precise way to break identical phrase loops while still allowing natural rephrasing. For marketing copy generation, a moderate frequency_penalty typically yields varied and engaging output.
- ✗
Decrease the temperature parameter.
Why it's wrong here
Lowering the temperature parameter makes the probability distribution sharper by scaling logits before softmax, causing the model to almost always select the most likely token. Because temperature is a static randomness control and has no memory of generated tokens, it cannot correct an ongoing repetition; the highest-probability next token in a loop is usually the one just produced. Reducing temperature can therefore freeze the model on the same sequence, whereas a higher temperature would at least allow occasional random sampling to escape the loop. It is useful for reducing randomness, not for penalizing repeated content.
When this WOULD be correct
In a scenario where the model generates overly random or nonsensical text and the goal is to make output more focused and predictable while preserving coherence, decreasing temperature would be correct. For example, when generating code or factual answers where creativity is not needed.
- ✗
Increase the presence_penalty parameter.
Why it's wrong here
Increasing the presence_penalty parameter applies a flat, one-time penalty to every token that appears anywhere in the generated text, regardless of count. This encourages the model to step away from already-mentioned topics and can somewhat reduce topical repetition, but it does not escalate the penalty for tokens seen many times. Both "premium" and "premium, premium, premium" receive the same presence penalty, so exact repeated phrases can persist unless the frequency penalty is also applied. In marketing copy, presence_penalty may introduce off-topic synonyms or tangents, making it less precise than frequency_penalty for eliminating loops.
When this WOULD be correct
A scenario where the model keeps introducing new topics or entities that are irrelevant to the prompt, and you want to discourage the model from mentioning any topic more than once, would make presence_penalty the correct choice.
- ✗
Decrease the top_p parameter.
Why it's wrong here
Decreasing the top_p parameter (nucleus sampling) restricts the candidate token pool to the smallest set whose cumulative probability exceeds the threshold. This makes the output more focused and deterministic, but it does not consider how many times a token has already been used, so identical high-probability tokens continue to be chosen. In a repetitive loop, shrinking top_p often makes the model even more likely to follow the same word path, because the probabilities of alternative tokens are simply cut off. Thus, this change can worsen repetition rather than resolve it.
When this WOULD be correct
A scenario where the model's output is too random or incoherent, and the goal is to make it more focused and deterministic without completely eliminating creativity. For example, 'The generated text is too diverse and often goes off-topic; which parameter should be decreased to make it more focused?'
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.
✓Increase the frequency_penalty parameter.Correct answer▾
Why this is correct
Increasing the frequency_penalty parameter directly addresses repetitive loops by penalizing tokens proportionally to how often they have already appeared in the generated text. As the model assigns a logit score to each token, the penalty subtracts an amount that grows with each repetition, pushing it to choose less frequent alternatives. This count-based mechanism is the most precise way to break identical phrase loops while still allowing natural rephrasing. For marketing copy generation, a moderate frequency_penalty typically yields varied and engaging output.
✗Decrease the temperature parameter.Wrong answer — click to see why▾
Why this is wrong here
Decreasing temperature reduces randomness, which can lower creativity and make text more deterministic, but it does not specifically target repetitive phrases or loops. The question asks to reduce repetition without changing overall creativity, so temperature adjustment is not appropriate.
★ When this WOULD be the correct answer
In a scenario where the model generates overly random or nonsensical text and the goal is to make output more focused and predictable while preserving coherence, decreasing temperature would be correct. For example, when generating code or factual answers where creativity is not needed.
Why candidates choose this
Candidates may confuse temperature with frequency penalty, thinking that lowering randomness will also reduce repetition, but temperature affects overall variability, not specifically penalizing repeated tokens.
✗Increase the presence_penalty parameter.Wrong answer — click to see why▾
Why this is wrong here
Increasing presence_penalty penalizes tokens based on whether they have appeared at all in the text, which reduces topic repetition but does not specifically target repetitive phrases or loops; frequency_penalty is designed for that.
★ When this WOULD be the correct answer
A scenario where the model keeps introducing new topics or entities that are irrelevant to the prompt, and you want to discourage the model from mentioning any topic more than once, would make presence_penalty the correct choice.
Why candidates choose this
Candidates may confuse 'presence' with 'frequency' or think that penalizing any repetition (presence) is equivalent to penalizing frequent repetition (frequency), but presence_penalty only cares about whether a token appears at all, not how often.
✗Decrease the top_p parameter.Wrong answer — click to see why▾
Why this is wrong here
Decreasing top_p reduces the set of tokens considered for sampling, which can make output less diverse but does not specifically penalize repetition; frequency_penalty directly reduces repetition by lowering the probability of tokens already generated.
★ When this WOULD be the correct answer
A scenario where the model's output is too random or incoherent, and the goal is to make it more focused and deterministic without completely eliminating creativity. For example, 'The generated text is too diverse and often goes off-topic; which parameter should be decreased to make it more focused?'
Why candidates choose this
Candidates may confuse top_p (nucleus sampling) with frequency_penalty, thinking that limiting the token pool will also reduce repetition, but top_p controls diversity, not repetition frequency.
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
Model
In IT and AI, a model is a trained mathematical representation that learns patterns from data to make predictions or decisions.
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.