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?
Increases token budget for response.
Why this answer
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.
Exam trap
The trap here is that candidates 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.
How to eliminate wrong answers
Option B is wrong because removing the `stop` parameter would not fix mid-sentence truncation; the `stop` parameter defines sequences that halt generation early, and removing it could actually make responses longer but does not address a hard token limit. Option C is wrong because increasing `temperature` to 1.0 increases randomness and creativity in the output, but does not affect the maximum length of the response; it could even lead to more verbose or erratic completions. Option D is wrong because increasing `top_p` to 1.0 enables nucleus sampling with all tokens considered, which may alter the diversity of the output but does not extend the token budget; the model will still stop when `max_tokens` is exhausted.