AI-102 Plan and manage an Azure AI solution Practice Question
Exhibit
{
"parameters": {
"api-version": "2024-10-01-preview",
"deployment-id": "gpt-4o",
"messages": [
{
"role": "system",
"content": "You are an AI assistant."
},
{
"role": "user",
"content": "What is the capital of France?"
}
],
"max_tokens": 100,
"temperature": 0.7,
"stop": ["\n"]
}
}Refer to the exhibit. You are reviewing an Azure OpenAI Service API request. The deployment-id is 'gpt-4o'. The user asks 'What is the capital of France?' The response is cut off mid-sentence. Based on the parameters, what is the most likely cause?
⚠ Common exam trap
Microsoft often tests the distinction between `max_tokens` (which limits total output length) and the `stop` parameter (which causes early termination based on content), leading candidates to mistakenly attribute mid-sentence cut-offs to token limits rather than stop sequences.
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
✓
The stop parameter is causing early termination
The `stop` parameter in an Azure OpenAI API request defines a sequence of tokens that, when generated, causes the model to stop producing further output. If the `stop` sequence appears in the generated text, the response will be truncated at that point, even mid-sentence. In this scenario, the cut-off response is most likely due to the `stop` parameter matching a token in the generated output, not because of token limits or temperature settings.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
The max_tokens value is too low
Why it's wrong here
100 tokens are enough for a short answer.
- ✗
The temperature setting is too high
Why it's wrong here
Temperature does not cause truncation.
- ✓
The stop parameter is causing early termination
Why this is correct
The stop sequence '\n' stops generation prematurely.
- ✗
The system message is missing a context
Why it's wrong here
System message is fine.
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.