AI-102 Implement generative AI solutions Practice Question
Exhibit
Refer to the exhibit. temperature: 0.7 top_p: 0.9 max_tokens: 50 frequency_penalty: 0 presence_penalty: 0
You are testing an Azure OpenAI model with the parameters shown in the exhibit. The model generates very short responses. Which parameter should you modify to allow longer responses?
⚠ Common exam trap
Many exam-takers confuse parameters that control output length (max_tokens) with those that control output diversity or creativity (temperature, top_p, frequency_penalty), leading them to incorrectly adjust the latter when the real issue is a token limit.
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 max_tokens
The max_tokens parameter controls the maximum number of tokens (words or subwords) the model can generate in a single response. When responses are very short, increasing max_tokens allows the model to produce longer completions up to the specified limit. The other parameters affect randomness, diversity, or probability distribution, not the length cap.
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 frequency_penalty
Why it's wrong here
frequency_penalty reduces repetition, not length.
- ✗
Increase top_p
Why it's wrong here
top_p does not affect length.
- ✗
Increase temperature
Why it's wrong here
Temperature does not affect length.
- ✓
Increase max_tokens
Why this is correct
max_tokens directly controls the maximum length of the response.
Go deeper
Related to this question
About these practice questions
One of 945 original AI-102 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-102 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-102 exam.