AI-102 Implement generative AI solutions Practice Question
Exhibit
{
"model": "gpt-4",
"messages": [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "What is the capital of France?"}
],
"max_tokens": 500,
"temperature": 0.7,
"top_p": 0.95,
"frequency_penalty": 0,
"presence_penalty": 0,
"stop": null
}Refer to the exhibit. You are troubleshooting an Azure OpenAI API call that is returning incomplete responses. The response stops mid-sentence. Which parameter should you adjust?
⚠ Common exam trap
Watch out — candidates often confuse parameters that control output length (`max_tokens`) with those that control output diversity (`temperature`, `top_p`) or early stopping (`stop`), leading them to pick options that change style rather than capacity.
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 to 1000.
The `max_tokens` parameter controls the maximum number of tokens the model can generate in a single response. When a response stops mid-sentence, it typically means the token limit was reached before the model could complete its output. Increasing `max_tokens` to 1000 provides more room for the model to finish its generation, resolving the truncation issue.
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 max_tokens to 1000.
Why this is correct
Increases token budget for response.
- ✗
Remove the stop parameter.
Why it's wrong here
Stop is null, so not causing issue.
- ✗
Increase temperature to 1.0.
Why it's wrong here
Temperature does not limit length.
- ✗
Increase top_p to 1.0.
Why it's wrong here
Top_p does not limit length.
Visual reference
Go deeper
Related to this question
About these practice questions
This AI-102 question is part of Courseiva's 945-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-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.