Courseiva

AI-102 Implement generative AI solutions Practice Question

You are developing a generative AI application using Azure OpenAI Service. The application must generate summaries of customer emails and then extract action items. You want to minimize the number of API calls and ensure the model outputs structured JSON. What should you do?

⚠ Common exam trap

The trap here is assuming that function calling or fine-tuning is needed for structured output, when prompt engineering with JSON instructions suffices.

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

✓

Use a single prompt that asks the model to summarize the email and extract action items, and specify the output format as JSON in the prompt.

The most efficient method is to use a single prompt that instructs the model to both summarize the email and extract action items, with the output specified as JSON. This reduces API calls to one, lowers latency, and provides structured data for easy parsing. It leverages the model's ability to handle multiple instructions and format outputs as requested.

Answer analysis

Option-by-option breakdown

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

  • ✗

    Fine-tune the model to output JSON with both summary and action items.

    Why it's wrong here

    Fine-tuning is overkill and time-consuming for this task. The model can already follow instructions to output JSON without fine-tuning. Fine-tuning would require a labeled dataset and may not guarantee structured output. It also does not minimize API calls compared to a single prompt. This approach is inefficient and unnecessary.

  • ✗

    Use the Azure OpenAI function calling feature to define a function that returns both summary and action items.

    Why it's wrong here

    Function calling is useful for invoking external APIs, but here the model itself can generate the summary and action items. Using function calling adds unnecessary complexity and may still require parsing. It does not inherently minimize API calls unless combined with a single prompt, but the requirement is about output structure, not external calls.

  • ✓

    Use a single prompt that asks the model to summarize the email and extract action items, and specify the output format as JSON in the prompt.

    Why this is correct

    Combining both tasks into one prompt reduces API calls and latency. By instructing the model to output JSON, you get structured data that is easy to parse. This approach leverages the model's ability to handle multiple instructions in one request, which is efficient and meets the requirement for structured output.

  • ✗

    Use two separate prompts: one for summarization and one for action item extraction, and combine the results in code.

    Why it's wrong here

    Two separate prompts require two API calls, increasing cost and latency. While it separates concerns, it does not minimize API calls as required. This approach is less efficient and does not leverage the model's capability to perform multiple tasks in one prompt. It also complicates orchestration.

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.