An Azure service that enables users to identify content that is potentially offensive, risky, or otherwise undesirable. Previously known as Azure Content Moderator.
Thank you for raising this — your observation is valid, and this behavior can indeed be confusing at first
What’s happening
In Azure OpenAI, content filtering is not a single-step process. It includes multiple safety layers, and some of these run before the standard category classifiers (Hate, Violence, etc.).
Specifically, features like Prompt Shields (jailbreak / prompt injection detection) can block a request early in the pipeline. When that happens:
- The response returns:
finish_reason: content_filter
But category metadata (hate, violence, etc.) may be null or empty
This is expected because the request was filtered before category-level evaluation was executed, so there’s no category result to return.
Microsoft documentation confirms that Prompt Shields analyze inputs for adversarial or jailbreak-style prompts and operate independently of standard category classifiers.
Why Content Safety Studio shows “Safe”
This discrepancy is also expected.
Azure AI Content Safety Studio uses standalone moderation models
Azure OpenAI uses a broader, integrated filtering pipeline (including prompt shields and policy checks)
Because of this, the same prompt can:
Pass in Content Safety Studio
Still be blocked in Azure OpenAI
The filtering system combines multiple classifiers and policies beyond just the four harm categories.
How to investigate
Here are a few practical steps to narrow this down:
- Check Prompt Shield configuration
- In Azure AI Foundry → Deployment → Content Filters
- Verify if Prompt Shields (jailbreak / indirect attack detection) are enabled
- Review full content filter policy
- Look beyond Hate/Violence categories
- Check for:
- Jailbreak detection
- Indirect prompt injection
- Protected content filters
- Test in the Chat Playground (same deployment)
- This ensures you're testing against the actual OpenAI pipeline, not the standalone safety service
- Log full API response
- Inspect
content_filter_resultscarefully - Sometimes signals appear under non-standard keys (e.g., jailbreak-related flags)
- About recent changes / regression
- Inspect
You mentioned this worked earlier — that’s important.
Microsoft periodically updates filtering behavior and models as part of safety improvements. These changes can affect:
Sensitivity thresholds
Detection behavior
Upstream filtering layers
So a regression without changes on your side is possible.
Conclusion
- This behavior is expected in certain scenarios, especially when pre-classification filters (like Prompt Shields) are triggered
- That’s why you see
content_filterwith no category metadata - The issue is likely not a bug in your implementation, but part of the filtering pipeline design
Reference Documentation
- Azure OpenAI Content Filtering Overview https://learn.microsoft.com/azure/ai-services/openai/concepts/content-filter
- Prompt Shields (Jailbreak / Injection Detection) https://learn.microsoft.com/azure/ai-services/openai/concepts/content-filter-prompt-shields
- Configure Content Filters https://learn.microsoft.com/azure/ai-services/openai/how-to/content-filters
- Azure AI Content Safety Overview https://learn.microsoft.com/azure/ai-services/content-safety/overview
Hope this helps. If you have any follow-up questions, please let me know. I would be happy to help.
Please do not forget to "Accept Answer" and "up-vote" wherever the information provided helps you, as this can be beneficial to other community members.