Microsoft Azure AI Engineer Associate AI-102 Practice Question
Your team is building a chat application that uses Azure OpenAI. Corporate policy requires that any incoming prompt with Hate or Sexual content whose severity score is 2 (Low) or higher be blocked before it can be forwarded to the model, and that jailbreak (prompt-injection) attacks be detected. Which action should you place at the very beginning of the request pipeline to meet this requirement?
Store the conversation in a database and run periodic batch reviews with Azure AI Content Safety after the session ends.
Prepend a strict system message instructing the model to refuse disallowed topics and run the chat at temperature 0.
Apply an llm-content-safety policy (or call the Content Safety text:analyze API) with shieldPrompt=true and category thresholds Hate=2 and Sexual=2, and reject the request if any rule is triggered.
Depend solely on the built-in Azure OpenAI completion content filter that runs after the model generates a response.
Apply Azure AI Content Safety to the user input in the inbound stage. An llm-content-safety policy (or a direct call to the text:analyze endpoint) lets you set category thresholds-Hate ≥ 2 and Sexual ≥ 2-and turn on shield-prompt=true. The policy blocks the request if the content exceeds the configured severity or if a prompt attack is detected, ensuring the model never sees disallowed content. Relying only on completion filters is too late, system-messages can be ignored, and batch reviews are not real-time.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is the llm-content-safety policy in Azure and how does it work?
Open an interactive chat with Bash
How does shieldPrompt=true enhance security in Azure OpenAI applications?
Open an interactive chat with Bash
What are prompt-injection attacks, and why are they a threat to AI systems?
Open an interactive chat with Bash
Microsoft Azure AI Engineer Associate AI-102
Plan and manage an Azure AI solution
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
Pass with Confidence.
IT & Cybersecurity Package
You have hit the limits of our free tier, become a Premium Member today for unlimited access.
Military, Healthcare worker, Gov. employee or Teacher? See if you qualify for a Community Discount.
Monthly
$19.99
$19.99/mo
Billed monthly, Cancel any time.
3 Month Pass
$44.99
$14.99/mo
One time purchase of $44.99, Does not auto-renew.
MOST POPULAR
Annual Pass
$119.99
$9.99/mo
One time purchase of $119.99, Does not auto-renew.
BEST DEAL
Lifetime Pass
$189.99
One time purchase, Good for life.
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .