Mitigating Prompt Injection in Multimodal AI with Foundry
Short 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.
Question
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?
Key Takeaways
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.
Common mistake: 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.
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
https://learn.microsoft.com/en-us/azure/foundry/openai/concepts/content-filter-prompt-shields
This link opens the official vendor documentation in a new tab.
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?
Can Prompt Shields for Documents analyze images directly?
Discussion 14 contributions
Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.
From public community threads 14
-
Srikantha 👍 3 Answered BCorrect 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.
-
Mattt 👍 3 Answered AA 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.
-
cloudera 👍 2 Answered BTwo 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 👍 2Apologies, 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.
-
JoaoCA 👍 2 Answered BB. 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.
Show 9 more comments
-
a5f05ea 👍 2 Answered BFor unsafe images it should be Image moderation and for embed text prompt shield, since prompt shield aloe cannot solve both the issue.
-
Dinesh_87 👍 2 Answered APrompt Shields for Documents, applied to the OCR/extracted text before it reaches the LLM
-
VimalChauhan 👍 1 Answered AThe 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.
-
RICHARDALEX007 👍 1 Answered BSame 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.
-
7e4a230 👍 1 Answered APrompt 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.
-
AzureGeek79 👍 1 Answered AThere 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.
-
Jedi 👍 1 Answered AI'm going with A, See prompt shields for documents: https://learn.microsoft.com/en-us/azure/foundry/openai/concepts/content-filter-prompt-shields
-
cloudera 👍 1 Answered BB No. Prompt shield for documents helps with the hidden instruction problem. But doesn't handle unsafe image content.
-
ArindamPal 👍 1 Answered APrompt shields for Documents is the correct answer
Reader comments & corrections
No reader corrections yet — spotted an error or have a note? Share it below.
Related Analysis
Practice All AI-103 Questions
Access 88 questions with complete answers and detailed explanations.
View Full AI-103 Practice Test →