Courseiva

AI-102 Implement generative AI solutions Practice Question

You are building a generative AI solution with Azure OpenAI Service. Prompts must be assembled from a system instruction, retrieved document chunks, and the user's question. You need a mechanism that automatically inserts the retrieved chunks into a designated placeholder in a prompt template before the request is sent to the model. What should you use?

⚠ Common exam trap

The trap here is assuming that any Azure OpenAI feature which touches prompts, such as content filtering, performs prompt assembly.

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

✓

Prompt flow with a Jinja prompt template node

Prompt flow's Jinja prompt template node is the supported way to author a reusable template whose placeholders are filled from flow inputs at runtime, which is exactly what injecting retrieved chunks requires. The other choices address safety filtering, authentication, or output length, none of which assemble prompt text. Using a template also keeps prompt logic versioned and testable within the flow.

Answer analysis

Option-by-option breakdown

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

  • ✗

    A content filter configured on the Azure OpenAI deployment

    Why it's wrong here

    Content filters evaluate prompts and completions for harmful categories and can block or annotate them, but they never merge retrieved text into a prompt template. They operate after the prompt has already been formed, so they cannot satisfy the requirement of inserting document chunks into a placeholder. Filtering is a safety control, not a templating or orchestration mechanism.

  • ✗

    A system-assigned managed identity on the Azure OpenAI resource

    Why it's wrong here

    A managed identity provides an automatically rotated credential so code can authenticate to Azure OpenAI without embedding keys. It governs authorization, not prompt construction, so it cannot place retrieved chunks into a template placeholder. The scenario already assumes the request can be made; the missing piece is prompt assembly, which identity does not perform.

  • ✗

    The max_tokens parameter on the chat completions request

    Why it's wrong here

    max_tokens caps how many tokens the model may generate in its completion, controlling cost and length. It has no effect on the prompt content sent to the model and cannot insert retrieved text into a placeholder. Adjusting this parameter changes output size only, so it does not address the prompt-assembly requirement described in the scenario.

  • ✓

    Prompt flow with a Jinja prompt template node

    Why this is correct

    Jinja templating in prompt flow renders placeholders such as {{context}} and {{question}} by substituting runtime inputs, so retrieved document chunks are injected into the template before the chat call executes. This provides deterministic prompt assembly, supports conditional logic, and keeps the orchestration inside a deployable flow, which matches the requirement to fill a designated placeholder automatically.

About these practice questions

One of 761 original AI-102 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. 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.