Courseiva
Implement Generative AI And Agentic SolutionseasyMultiple ChoiceObjective-mapped

AI-103 Implement Generative AI And Agentic Solutions Practice Question

You are creating a custom prompt template in Azure AI Foundry. You want to insert the user's input safely while preventing prompt injection vulnerabilities. How should you design the template structure?

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 explicit XML tags or markdown delimiters to separate system instructions from user inputs

Separating system instructions from user input using clear delimiters (such as markdown blockquotes or XML tags like <user_input>) helps the model distinguish instructions from data.

Answer analysis

Option-by-option breakdown

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

  • Remove all spaces and punctuation from the user input

    Why it's wrong here

    Stripping punctuation degrades user experience and does not prevent prompt injection.

  • Concatenate user input directly into the middle of the system prompt string

    Why it's wrong here

    Direct concatenation allows malicious user input to easily overwrite system instructions.

  • Use explicit XML tags or markdown delimiters to separate system instructions from user inputs

    Why this is correct

    Delimiters and XML tags clearly demarcate untrusted user input from system instructions.

  • Encode all user inputs using Base64 before sending to the model

    Why it's wrong here

    Models cannot reliably interpret raw Base64 strings without prompt instructions to decode them, breaking natural interaction.

About these practice questions

One of 510 original AI-103 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 August 2026 · checked against the official Microsoft exam blueprint

This AI-103 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-103 exam.