Your team screens patient-uploaded PDF documents before a clinical agent processes them. The application calls the Azure AI Content Safety Prompt Shields API (shieldPrompt) directly, and no Foundry guardrail is assigned to the agent. The live user message is screened separately.
Requirements:
- Analyze the extracted document text for document attacks, such as hidden instructions that try to hijack the model session.
- Ensure a document classified as an attack is not passed to the agent.
Which design meets both requirements?
Choose one answer.
- Send the text in
documents; the API withholds the document whenattackDetectedis true. - Send the text in
documents; the application withholds the document when attack severity is 4 or higher. - Send the text in
documents; the application withholds the document whenattackDetectedis true. - Send the text in
userPrompt; the application withholds the document whenattackDetectedis true.