Mitigating Prompt Injection in Multimodal AI with Foundry

Manage, monitor, and secure AI systems
Answer Correct answer: A — Configuring Prompt Shields for Documents detects and blocks malicious instructions embedded in text extracted from uploaded images, mitigating the indirect prompt injection risk.

Note: This section contains one or more sets of questions with the same scenario and problem. Each question presents a unique solution to the problem. You must determine whether the solution meets the stated goals. More than one solution in the set might solve the problem. It is also possible that none of the solutions in the set solve the problem. After you answer a question in this section, you will NOT be able to return. As a result, these questions do not appear on the Review Screen. You have a multimodal AI generative model that accepts image uploads and uses extracted image text to generate responses. You discover that users can upload unsafe images and embed hidden instructions into images to manipulate the model. You need to implement controls to mitigate the risk. Solution: You configure a prompt shield for documents. Does this meet the goal?

  1. Yes Correct Answer
  2. No

Community Insight

The exam tests the distinction between visual content moderation and semantic prompt protection; the trap is assuming image moderation covers hidden text-based injections.

This question tests the application of Azure AI Content Safety features to mitigate indirect prompt injection attacks in multimodal generative models. The correct answer identifies that Prompt Shields for Documents is the specific control required to detect malicious instructions embedded in image-extracted text.

Many candidates vote 'No' (B) because they believe Image Moderation is also required to fully meet safety goals, overlooking that Prompt Shields specifically addresses the injection vector described.

Community Discussion (13 comments)

AzureGeek79 👍 1 Selected: A
There is not a single answer to this question. It should be: a) You configure a prompt shield for documents. b) You configure image moderation to block unsafe content before processing the images.
a5f05ea 👍 2 Selected: B
For unsafe images it should be Image moderation and for embed text prompt shield, since prompt shield aloe cannot solve both the issue.
VimalChauhan 👍 1 Selected: A
The threat described is: Users upload images. The model extracts text from those images (OCR or multimodal processing). Hidden instructions in the extracted text attempt to manipulate the model. In Azure AI Foundry, Prompt Shields for Documents are designed to protect against indirect prompt injection attacks originating from external content, including: Documents Web pages Files Images containing embedded text When the model processes text extracted from an image, Prompt Shields for Documents can detect and mitigate malicious instructions embedded in that content before it influences the model's behavior.
Srikantha 👍 3 Selected: B
Correct Solution: To mitigate both risks, you must use: Azure AI Content Safety Image Moderation to scan uploaded images for unsafe visual content (Adult, Violence, Hate, Self-harm). Prompt Shields for User Input / Images (or running OCR text through Prompt Shields) to detect embedded prompt injection instructions hidden inside the image text.
JoaoCA 👍 2 Selected: B
B. No - Prompt Shields for documents catches the hidden-instruction (indirect injection) half, but doesn't block unsafe image content. Still only half the goal, so it doesn't fully meet it.
Jedi 👍 1 Selected: A
I'm going with A, See prompt shields for documents: https://learn.microsoft.com/en-us/azure/foundry/openai/concepts/content-filter-prompt-shields
Dinesh_87 👍 2 Selected: A
Prompt Shields for Documents, applied to the OCR/extracted text before it reaches the LLM
Mattt 👍 3 Selected: A
A is correct. Here, “unsafe images” refers to images containing hidden malicious instructions. Prompt Shields for Documents can analyze the extracted text and detect these indirect prompt-injection attacks.
7e4a230 👍 1 Selected: A
Prompt Shields for Documents detect hidden or malicious instructions embedded in uploaded content. Because the model extracts the image’s text before processing it, the shield can analyze that extracted text for indirect prompt-injection attacks.
cloudera 👍 2 Selected: B
Two problem that need solving: 1) Upload Unsafe Image Content (eg. visually inappropriate, illegal, or violent imagery). 2) Indirect hidden prompt instructions. Prompt Shield for documents can address the second part (hidden text). For the Upload unsafe image (#1 above) content, you will need Image moderation / Analyze image API. So the answer is B.
RICHARDALEX007 👍 1 Selected: B
Same as the 23 question. The threat is hidden instructions embedded in uploaded IMAGES (indirect/document attack) plus unsafe image content. A prompt shield for USER PROMPTS addresses direct jailbreak text from the user, not injected content extracted from images, so it does not meet the goal.
RICHARDALEX007 👍 2
Apologies, this should be A. Prompt Shields for Documents detects malicious instructions embedded in third-party content such as text extracted from images, which directly mitigates the hidden-instruction (indirect injection) risk.
cloudera 👍 1 Selected: B
B No. Prompt shield for documents helps with the hidden instruction problem. But doesn't handle unsafe image content.

Comments & Corrections

No comments yet — spotted an error or have a note? Share it below.

Log in to comment, report an error, or add a note about this question.

Submitted for moderation before publishing. Keep it helpful and respectful.

Expert Analysis

Why the Answer Is Correct

The scenario describes an indirect prompt injection attack where hidden instructions are embedded within uploaded images. When the model extracts text from these images (via OCR or multimodal processing), that text acts as a prompt. Prompt Shields for Documents is explicitly designed to scan external content, including text extracted from images, for malicious intent and jailbreak patterns before it reaches the LLM. Therefore, configuring this shield directly mitigates the risk of manipulation via embedded instructions.

Why the Other Options Are Wrong

Option B ('No') is incorrect because while Image Moderation is useful for blocking unsafe visual content (e.g., violence, nudity), it does not analyze the semantic meaning of text hidden inside images. The primary threat described is manipulation via instructions, not visual harm. Since the solution provided (Prompt Shields) directly addresses the injection mechanism, it meets the stated goal of mitigating the manipulation risk.

Community Comment Notes

Several users initially voted 'No', arguing that Image Moderation was also needed to handle "unsafe images." However, as Srikantha noted, "To mitigate both risks, you must use... Image Moderation... [and] Prompt Shields," implying that if only one is configured, it might be incomplete. Conversely, AzureGeek79 correctly pointed out that the question focuses on the injection aspect: "There is not a single answer... b) You configure image moderation..." but acknowledged that for the specific injection threat, Prompt Shields is the key. VimalChauhan clarified that Prompt Shields for Documents protects against indirect injection from "Images containing..." text, confirming its applicability here.

Official Reference

Exam Strategy

Focus on the specific type of security threat described. If the threat is 'malicious instructions' or 'jailbreaking' coming from untrusted data (like documents or image text), choose Prompt Shields. If the threat is 'inappropriate visual content', choose Image Moderation. Do not assume you need multiple controls unless the question asks for a comprehensive solution to distinct problems.

Frequently Asked Questions

Why isn't Image Moderation the correct answer for hidden instructions?

Image Moderation scans pixels for inappropriate visuals (violence, nudity). It cannot read or analyze text hidden inside an image for semantic malicious intent.

Can Prompt Shields for Documents analyze images directly?

Yes, when text is extracted from images (via OCR or multimodal processing), Prompt Shields treats that text as document input and scans it for injection patterns.

More AI-103 FAQ →

Related Analysis

Practice All AI-103 Questions

Access 88 questions with complete answers and detailed explanations.

View Full AI-103 Practice Test →

← Back to AI-103 Study Guide