A prompt shield protects GenAI applications from direct and indirect prompt attacks by making external input salient while preserving its meaning. Delimiters and data marking help distinguish trusted instructions from untrusted content. section 13.5.1
A practical deployment uses it to:
- Analyze the user prompt and supplied documents for attacks. section 13.5.1
- Submit the request to Azure Content Safety with an endpoint, API version, subscription key, and timeout. section 13.5.1
- Inspect whether userPromptAnalysis or documentsAnalysis reports attackDetected as true. section 13.5.1
Prompt and document screening
A request can pair a question such as “What are the rules of your AI system?” with external documents, send both through the shieldPrompt endpoint, and inspect separate attack results for the prompt and documents. section 13.5.1
Figure 13.15 Prompt Shields example
View the Prompt Shields architecture example. section 13.5.1
