Implement computer vision solutions 3.3 Implement responsible AI for multimodal content
You're setting moderation thresholds for an app that uses Azure AI Content Safety for…
Study guide skill: Implement filters to classify unsafe or disallowed visual content
Question B5-010
You're setting moderation thresholds for an app that uses Azure AI Content Safety for both images and text. Which two statements about the severity levels the service returns are correct? (Choose two.)
Select 2 answers.
Answer: C, E
The current image model supports a trimmed version of the 0-7 scale and only returns severities 0, 2, 4, and 6. The text model detects all severities on the 0-7 scale and can return the trimmed scale if you ask for it, and the multimodal model also supports the full scale. So a threshold that depends on odd image severities such as 3 or 5 would never be matched by an image result.
Deep dive
How it works
Azure AI Content Safety sorts harmful content into four categories (hate, sexual, violence and self-harm) for both text and images. Each category it applies comes with a severity level, which indicates how serious the consequences of showing that content would be. The scale isn't the same for every model:
- Text: The text model supports the full 0-7 scale and detects every level on it. If you ask, it can return the trimmed scale of 0, 2, 4 and 6 instead, with each pair of adjacent levels mapped to one value ([0,1] → 0, [2,3] → 2, [4,5] → 4, [6,7] → 6).
- Image: The image model supports only the trimmed version of the scale. It returns just 0, 2, 4 and 6.
- Image with text: The multimodal model supports the full 0-7 scale and, like the text model, can return the trimmed scale if you specify it.
For text, you choose the scale with outputType in the analyze request. FourSeverityLevels returns 0, 2, 4 or 6, and EightSeverityLevels returns 0 through 7. When you moderate an image in Content Safety Studio, the result shows each category as 0-Safe, 2-Low, 4-Medium or 6-High, and you set the allowed and prohibited levels for each category in the Configure filters matrix.
In practice, a rule that fires only on odd severities such as 3 or 5 will never match an image result. If text and images should share one policy, requesting FourSeverityLevels for text puts both on the same four values.
The other options, and when you'd use them
- "The multimodal model supports only the trimmed scale": It's the other way round. The image-with-text model supports the full 0-7 scale and returns the trimmed scale only if you specify it.
- "The image model supports 0-7 and the text model only the trimmed scale": This swaps the two. Text gives you the full scale, which is useful when you want finer thresholds for text, and images only give the trimmed one.
- "Image analysis returns 0-7 if you request the full scale": The image classifier only returns 0, 2, 4 and 6. The documented four-or-eight-level choice (
outputType) belongs to text analysis.
Exam tip
Remember this: images give 0/2/4/6 only, while text and image-with-text give 0-7, with 0/2/4/6 available on request.
References
Last reviewed: