Content safety ensures LLM outputs do not contain harmful, hateful, violent, sexual, or dangerous content. Azure AI Content Safety provides multi-category scoring (hate, violence, sexual, self-harm) at 4 severity levels (safe/low/medium/high). OpenAI's moderation API provides similar capability. Custom blocklists filter domain-specific terms. Responsible AI requires content safety as a non-negotiable layer before serving any LLM output to users.
Multiple layers of content safety.
Model providers implement content safety in training, but jailbreaks exist. Your application layer is the last line of defence. Azure AI Content Safety or OpenAI Moderation provides sub-100ms inline checking — there's no acceptable reason to skip it for public apps.
A children's educational app needs severity threshold 0 (block all potential harm). A security research tool may need severity 4+ for legitimate research. Misconfigured thresholds cause over-blocking (bad UX) or under-blocking (harm).
When your content safety blocks 1000 requests in an hour, it's likely a coordinated attack or a user discovering a jailbreak. Audit logs with content hashes let you identify patterns without storing PII and enable rapid response.
Sign in to share your feedback and join the discussion.