Courseiva

AI-102 Implement generative AI solutions Practice Question

You are deploying a generative AI feature that drafts marketing copy with an Azure OpenAI GPT-4o deployment. The application must stream partial responses to the browser so users see text as it is generated, rather than waiting for the full completion. What should you enable in your API call?

⚠ Common exam trap

It's easy for candidates to confuse throughput tuning, such as raising quota or max tokens, with response delivery mode, which only the stream parameter changes.

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

✓

Set the stream parameter to true and consume the server-sent event chunks returned by the chat completions endpoint.

Streaming in Azure OpenAI is opt-in per request: setting the stream flag makes the chat completions endpoint return incremental deltas over server-sent events, which the browser can render progressively. Polling, batch processing, and quota changes all describe non-interactive or throughput-oriented behaviors that do not deliver partial tokens as they are generated.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✓

    Set the stream parameter to true and consume the server-sent event chunks returned by the chat completions endpoint.

    Why this is correct

    The chat completions API supports streaming by setting stream to true, after which the service returns incremental server-sent event chunks containing delta content. The client renders each delta as it arrives, which produces the typewriter effect the scenario requires. This is the standard, supported mechanism for partial response delivery in Azure OpenAI.

  • ✗

    Enable the asynchronous batch API and retrieve results from the output file once the job finishes.

    Why it's wrong here

    The Batch API is designed for large offline workloads with a separate turnaround window, and results arrive as files after the job completes. It is fundamentally not interactive and cannot push partial text to a browser. Using it for a live copywriting feature would make latency far worse and does not address streaming at all.

  • ✗

    Set a high max_tokens value and poll the operation status endpoint until the completion is marked complete.

    Why it's wrong here

    Chat completions are synchronous unless streaming is requested; there is no completion status endpoint to poll for a normal chat call. Raising max_tokens only allows longer final output, not earlier delivery. This approach would still make users wait for the entire response, failing the streaming requirement entirely.

  • ✗

    Increase the deployment's tokens-per-minute quota so responses are generated faster.

    Why it's wrong here

    Quota governs throughput and rate limiting, not the delivery model of a single response. Even with ample quota, a non-streaming call returns the whole completion at once. Raising quota can reduce throttling under load, but it does not create incremental chunk delivery to the browser, so it cannot satisfy the stated requirement.

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 and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official Microsoft exam blueprint

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.