Courseiva

AI-102 Implement generative AI solutions Practice Question

You are developing a generative AI application that uses Azure OpenAI Service to summarize large documents. The application experiences high latency when processing requests. You need to reduce the latency without changing the model. What should you do?

⚠ Common exam trap

Watch out — candidates often confuse parameters that affect output length (max_tokens) with those that affect output diversity (temperature, top_p), mistakenly believing that adjusting randomness can speed up generation.

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

✓

Reduce the max_tokens parameter in the API request

Reducing the max_tokens parameter limits the length of the generated response, which directly reduces the processing time required by the Azure OpenAI Service to produce the output. Since latency is caused by the model generating a long sequence of tokens, capping the output tokens decreases the number of autoregressive decoding steps, thereby lowering response time without altering the underlying model.

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 temperature parameter

    Why it's wrong here

    Temperature scales the sampling distribution and does not alter how many tokens the model generates, so completion time is unaffected. It is tempting because it is the most familiar parameter to adjust; it would be correct when controlling randomness or determinism in outputs, not latency.

  • ✗

    Increase the top_p parameter

    Why it's wrong here

    Increasing top_p does not reduce latency.

  • ✓

    Reduce the max_tokens parameter in the API request

    Why this is correct

    max_tokens caps generated output length, so lowering it shortens generation time and reduces latency without altering the deployed model. The stem forbids changing the model, and this parameter is a per-request setting, making it the appropriate lever for summarisation workloads.

  • ✗

    Increase the max_tokens parameter

    Why it's wrong here

    max_tokens caps response length; raising it permits longer completions, which increases generation time rather than reducing it. It is tempting because truncation errors suggest a larger limit; it would be correct when summaries are being cut off prematurely, not when the service is slow.

About these practice questions

This AI-102 question is part of Courseiva's 761-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 →

How Courseiva writes practice questions · Editorial policy

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.