Skip to content

Commit 820dd86

Browse files
Merge pull request #2667 from ositanachi/patch-1
[Azure AI Svcs] Dedicated MaaS content safety overview page
2 parents 5868396 + 7bdf60b commit 820dd86

20 files changed

+177
-152
lines changed

articles/ai-studio/ai-services/content-safety-overview.md

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ ms.author: pafarley
1212
author: PatrickFarley
1313
---
1414

15-
# Content Safety in Azure AI Foundry portal
15+
# Content safety in the Azure AI Foundry portal
1616

1717
Azure AI Content Safety is an AI service that detects harmful user-generated and AI-generated content in applications and services. Azure AI Content Safety includes various APIs that allow you to detect and prevent the output of harmful content. The interactive Content Safety **try out** page in Azure AI Foundry portal allows you to view, explore, and try out sample code for detecting harmful content across different modalities.
1818

@@ -23,7 +23,7 @@ You can use Azure AI Content Safety for many scenarios:
2323
**Text content**:
2424
- Moderate text content: This feature scans and moderates text content, identifying and categorizing it based on different levels of severity to ensure appropriate responses.
2525
- Groundedness detection: This filter determines if the AI's responses are based on trusted, user-provided sources, ensuring that the answers are "grounded" in the intended material. Groundedness detection is helpful for improving the reliability and factual accuracy of responses.
26-
- Protected material detection for text: This feature identifies protected text material, such as known song lyrics, articles, or other content, ensuring that the AI doesnt output this content without permission.
26+
- Protected material detection for text: This feature identifies protected text material, such as known song lyrics, articles, or other content, ensuring that the AI doesn't output this content without permission.
2727
- Protected material detection for code: Detects code segments in the model's output that match known code from public repositories, helping to prevent uncredited or unauthorized reproduction of source code.
2828
- Prompt shields: This feature provides a unified API to address "Jailbreak" and "Indirect Attacks":
2929
- Jailbreak Attacks: Attempts by users to manipulate the AI into bypassing its safety protocols or ethical guidelines. Examples include prompts designed to trick the AI into giving inappropriate responses or performing tasks it was programmed to avoid.
@@ -37,25 +37,7 @@ You can use Azure AI Content Safety for many scenarios:
3737
- Custom categories: Allows users to define specific categories for moderating and filtering content, tailoring safety protocols to unique needs.
3838
- Safety system message: Provides a method for setting up a "System Message" to instruct the AI on desired behavior and limitations, reinforcing safety boundaries and helping prevent unwanted outputs.
3939

40-
## Understand harm categories
41-
42-
### Harm categories
43-
44-
| Category | Description |API term |
45-
| --------- | ------------------- | --- |
46-
| Hate and Fairness | Hate and fairness harms refer to any content that attacks or uses discriminatory language with reference to a person or identity group based on certain differentiating attributes of these groups. <br><br>This includes, but is not limited to:<ul><li>Race, ethnicity, nationality</li><li>Gender identity groups and expression</li><li>Sexual orientation</li><li>Religion</li><li>Personal appearance and body size</li><li>Disability status</li><li>Harassment and bullying</li></ul> | `Hate` |
47-
| Sexual | Sexual describes language related to anatomical organs and genitals, romantic relationships and sexual acts, acts portrayed in erotic or affectionate terms, including those portrayed as an assault or a forced sexual violent act against one’s will. <br><br> This includes but is not limited to:<ul><li>Vulgar content</li><li>Prostitution</li><li>Nudity and Pornography</li><li>Abuse</li><li>Child exploitation, child abuse, child grooming</li></ul> | `Sexual` |
48-
| Violence | Violence describes language related to physical actions intended to hurt, injure, damage, or kill someone or something; describes weapons, guns, and related entities. <br><br>This includes, but isn't limited to: <ul><li>Weapons</li><li>Bullying and intimidation</li><li>Terrorist and violent extremism</li><li>Stalking</li></ul> | `Violence` |
49-
| Self-Harm | Self-harm describes language related to physical actions intended to purposely hurt, injure, damage one’s body or kill oneself. <br><br> This includes, but isn't limited to: <ul><li>Eating Disorders</li><li>Bullying and intimidation</li></ul> | `SelfHarm` |
50-
51-
### Severity levels
52-
53-
| Level | Description |
54-
| --- | ---|
55-
|Safe |Content might be related to violence, self-harm, sexual, or hate categories but the terms are used in general, journalistic, scientific, medical, and similar professional contexts, which are appropriate for most audiences. |
56-
|Low |Content that expresses prejudiced, judgmental, or opinionated views, includes offensive use of language, stereotyping, use cases exploring a fictional world (for example, gaming, literature) and depictions at low intensity.|
57-
|Medium |Content that uses offensive, insulting, mocking, intimidating, or demeaning language towards specific identity groups, includes depictions of seeking and executing harmful instructions, fantasies, glorification, promotion of harm at medium intensity. |
58-
|High |Content that displays explicit and severe harmful instructions, actions, damage, or abuse; includes endorsement, glorification, or promotion of severe harmful acts, extreme or illegal forms of harm, radicalization, or nonconsensual power exchange or abuse. |
40+
[!INCLUDE [content-safety-harm-categories](../includes/content-safety-harm-categories.md)]
5941

6042
## Limitations
6143

articles/ai-studio/concepts/content-filtering.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Azure AI Foundry includes a content filtering system that works alongside core m
2626

2727
This content filtering system is powered by [Azure AI Content Safety](../../ai-services/content-safety/overview.md), and it works by running both the prompt input and completion output through an ensemble of classification models aimed at detecting and preventing the output of harmful content. Variations in API configurations and application design might affect completions and thus filtering behavior.
2828

29-
With Azure OpenAI model deployments, you can use the default content filter or create your own content filter (described later on). The default content filter is also available for other text models curated by Azure AI in the [model catalog](../how-to/model-catalog.md), but custom content filters aren't yet available for those models. Models available through **Models as a Service** have content filtering enabled by default and can't be configured.
29+
With Azure OpenAI model deployments, you can use the default content filter or create your own content filter (described later on). Models available through **serverless APIs** have content filtering enabled by default. To learn more about the default content filter enabled for serverless APIs, see [Content safety for models curated by Azure AI in the model catalog](model-catalog-content-safety.md).
3030

3131
## Language support
3232

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
title: Content safety for models curated by Azure AI in the model catalog
3+
titleSuffix: Azure AI Foundry
4+
description: Learn about content safety for models deployed using serverless APIs, using Azure AI Foundry.
5+
manager: scottpolly
6+
ms.service: azure-ai-foundry
7+
ms.topic: conceptual
8+
ms.date: 02/04/2025
9+
ms.author: mopeakande
10+
author: msakande
11+
ms.reviewer: ositanachi
12+
reviewer: ositanachi
13+
ms.custom:
14+
---
15+
16+
# Content safety for models curated by Azure AI in the model catalog
17+
18+
[!INCLUDE [feature-preview](../includes/feature-preview.md)]
19+
20+
In this article, learn about content safety capabilities for models from the model catalog deployed using serverless APIs.
21+
22+
23+
## Content filter defaults
24+
25+
Azure AI uses a default configuration of [Azure AI Content Safety](/azure/ai-services/content-safety/overview) content filters to detect harmful content across four categories including hate and fairness, self-harm, sexual, and violence for models deployed via serverless APIs. To learn more about content filtering (preview), see [Understand harm categories](#understand-harm-categories).
26+
27+
The default content filtering configuration for text models is set to filter at the medium severity threshold, filtering any detected content at this level or higher. For image models, the default content filtering configuration is set at the low configuration threshold, filtering at this level or higher. For models deployed using the [Azure AI model inference service](../../ai-foundry/model-inference/how-to/configure-content-filters.md), you can create configurable filters by selecting the **Content filters** tab within the **Safety + security** page of the Azure AI Foundry portal.
28+
29+
> [!TIP]
30+
> Content filtering (preview) isn't available for certain model types that are deployed via serverless APIs. These model types include embedding models and time series models.
31+
32+
Content filtering (preview) occurs synchronously as the service processes prompts to generate content. You might be billed separately according to [Azure AI Content Safety pricing](https://azure.microsoft.com/pricing/details/cognitive-services/content-safety/) for such use. You can disable content filtering (preview) for individual serverless endpoints either:
33+
34+
- When you first deploy a language model
35+
- Later, by selecting the content filtering toggle on the deployment details page
36+
37+
Suppose you decide to use an API other than the [Azure AI Model Inference API](/azure/ai-studio/reference/reference-model-inference-api) to work with a model that is deployed via a serverless API. In such a situation, content filtering (preview) isn't enabled unless you implement it separately by using Azure AI Content Safety. To get started with Azure AI Content Safety, see [Quickstart: Analyze text content](/azure/ai-services/content-safety/quickstart-text). You run a higher risk of exposing users to harmful content if you don't use content filtering (preview) when working with models that are deployed via serverless APIs.
38+
39+
[!INCLUDE [content-safety-harm-categories](../includes/content-safety-harm-categories.md)]
40+
41+
## How charges are calculated
42+
43+
Pricing details are viewable at [Azure AI Content Safety pricing](https://azure.microsoft.com/pricing/details/cognitive-services/content-safety/). Charges are incurred when the Azure AI Content Safety validates the prompt or completion. If Azure AI Content Safety blocks the prompt or completion, you're charged for both the evaluation of the content and the inference calls.
44+
45+
## Related content
46+
47+
- [How to configure content filters (preview) for models in Azure AI services](../../ai-foundry/model-inference/how-to/configure-content-filters.md)
48+
- [What is Azure AI Content Safety?](../../ai-services/content-safety/overview.md)
49+
- [Model catalog and collections in Azure AI Foundry portal](../how-to/model-catalog-overview.md)

articles/ai-studio/how-to/deploy-models-cohere-command.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -490,8 +490,8 @@ except HttpResponseError as ex:
490490
raise
491491
```
492492

493-
> [!TIP]
494-
> To learn more about how you can configure and control Azure AI content safety settings, check the [Azure AI content safety documentation](https://aka.ms/azureaicontentsafety).
493+
[!INCLUDE [content-safety-serverless-apis-note](../includes/content-safety-serverless-apis-note.md)]
494+
495495

496496
::: zone-end
497497

@@ -977,8 +977,8 @@ catch (error) {
977977
}
978978
```
979979
980-
> [!TIP]
981-
> To learn more about how you can configure and control Azure AI content safety settings, check the [Azure AI content safety documentation](https://aka.ms/azureaicontentsafety).
980+
[!INCLUDE [content-safety-serverless-apis-note](../includes/content-safety-serverless-apis-note.md)]
981+
982982
983983
::: zone-end
984984
@@ -1489,8 +1489,8 @@ catch (RequestFailedException ex)
14891489
}
14901490
```
14911491
1492-
> [!TIP]
1493-
> To learn more about how you can configure and control Azure AI content safety settings, check the [Azure AI content safety documentation](https://aka.ms/azureaicontentsafety).
1492+
[!INCLUDE [content-safety-serverless-apis-note](../includes/content-safety-serverless-apis-note.md)]
1493+
14941494
14951495
::: zone-end
14961496
@@ -2117,8 +2117,8 @@ The following example shows how to handle events when the model detects harmful
21172117
}
21182118
```
21192119

2120-
> [!TIP]
2121-
> To learn more about how you can configure and control Azure AI content safety settings, check the [Azure AI content safety documentation](https://aka.ms/azureaicontentsafety).
2120+
[!INCLUDE [content-safety-serverless-apis-note](../includes/content-safety-serverless-apis-note.md)]
2121+
21222122

21232123
::: zone-end
21242124

articles/ai-studio/how-to/deploy-models-deepseek.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -269,8 +269,8 @@ except HttpResponseError as ex:
269269
raise
270270
```
271271

272-
> [!TIP]
273-
> To learn more about how you can configure and control Azure AI content safety settings, check the [Azure AI content safety documentation](https://aka.ms/azureaicontentsafety).
272+
[!INCLUDE [content-safety-serverless-apis-note](../includes/content-safety-serverless-apis-note.md)]
273+
274274

275275
::: zone-end
276276

@@ -542,8 +542,8 @@ catch (error) {
542542
}
543543
```
544544
545-
> [!TIP]
546-
> To learn more about how you can configure and control Azure AI content safety settings, check the [Azure AI content safety documentation](https://aka.ms/azureaicontentsafety).
545+
[!INCLUDE [content-safety-serverless-apis-note](../includes/content-safety-serverless-apis-note.md)]
546+
547547
548548
::: zone-end
549549
@@ -835,8 +835,8 @@ catch (RequestFailedException ex)
835835
}
836836
```
837837
838-
> [!TIP]
839-
> To learn more about how you can configure and control Azure AI content safety settings, check the [Azure AI content safety documentation](https://aka.ms/azureaicontentsafety).
838+
[!INCLUDE [content-safety-serverless-apis-note](../includes/content-safety-serverless-apis-note.md)]
839+
840840
841841
::: zone-end
842842
@@ -1121,8 +1121,8 @@ The following example shows how to handle events when the model detects harmful
11211121
}
11221122
```
11231123

1124-
> [!TIP]
1125-
> To learn more about how you can configure and control Azure AI content safety settings, check the [Azure AI content safety documentation](https://aka.ms/azureaicontentsafety).
1124+
[!INCLUDE [content-safety-serverless-apis-note](../includes/content-safety-serverless-apis-note.md)]
1125+
11261126

11271127
::: zone-end
11281128

articles/ai-studio/how-to/deploy-models-gretel-navigator.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -266,8 +266,8 @@ except HttpResponseError as ex:
266266

267267
```
268268

269-
> [!TIP]
270-
> To learn more about how you can configure and control Azure AI content safety settings, check the [Azure AI content safety documentation](https://aka.ms/azureaicontentsafety).
269+
[!INCLUDE [content-safety-serverless-apis-note](../includes/content-safety-serverless-apis-note.md)]
270+
271271

272272
::: zone-end
273273

@@ -509,8 +509,8 @@ The following example shows how to handle events when the model detects harmful
509509
}
510510
```
511511

512-
> [!TIP]
513-
> To learn more about how you can configure and control Azure AI content safety settings, check the [Azure AI content safety documentation](https://aka.ms/azureaicontentsafety).
512+
[!INCLUDE [content-safety-serverless-apis-note](../includes/content-safety-serverless-apis-note.md)]
513+
514514

515515
::: zone-end
516516

articles/ai-studio/how-to/deploy-models-jais.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -272,8 +272,7 @@ except HttpResponseError as ex:
272272
raise
273273
```
274274

275-
> [!TIP]
276-
> To learn more about how you can configure and control Azure AI content safety settings, check the [Azure AI content safety documentation](https://aka.ms/azureaicontentsafety).
275+
[!INCLUDE [content-safety-serverless-apis-note](../includes/content-safety-serverless-apis-note.md)]
277276

278277
::: zone-end
279278

@@ -546,8 +545,8 @@ catch (error) {
546545
}
547546
```
548547
549-
> [!TIP]
550-
> To learn more about how you can configure and control Azure AI content safety settings, check the [Azure AI content safety documentation](https://aka.ms/azureaicontentsafety).
548+
[!INCLUDE [content-safety-serverless-apis-note](../includes/content-safety-serverless-apis-note.md)]
549+
551550
552551
::: zone-end
553552
@@ -836,8 +835,8 @@ catch (RequestFailedException ex)
836835
}
837836
```
838837
839-
> [!TIP]
840-
> To learn more about how you can configure and control Azure AI content safety settings, check the [Azure AI content safety documentation](https://aka.ms/azureaicontentsafety).
838+
[!INCLUDE [content-safety-serverless-apis-note](../includes/content-safety-serverless-apis-note.md)]
839+
841840
842841
::: zone-end
843842
@@ -1158,8 +1157,8 @@ The following example shows how to handle events when the model detects harmful
11581157
}
11591158
```
11601159

1161-
> [!TIP]
1162-
> To learn more about how you can configure and control Azure AI content safety settings, check the [Azure AI content safety documentation](https://aka.ms/azureaicontentsafety).
1160+
[!INCLUDE [content-safety-serverless-apis-note](../includes/content-safety-serverless-apis-note.md)]
1161+
11631162

11641163
::: zone-end
11651164

articles/ai-studio/how-to/deploy-models-llama.md

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -357,11 +357,8 @@ except HttpResponseError as ex:
357357
raise
358358
```
359359

360-
> [!TIP]
361-
> To learn more about how you can configure and control Azure AI content safety settings, check the [Azure AI content safety documentation](https://aka.ms/azureaicontentsafety).
360+
[!INCLUDE [content-safety-serverless-apis-note](../includes/content-safety-serverless-apis-note.md)]
362361

363-
> [!NOTE]
364-
> Azure AI content safety is only available for models deployed as serverless API endpoints.
365362

366363
::: zone-end
367364

@@ -705,11 +702,8 @@ catch (error) {
705702
}
706703
```
707704
708-
> [!TIP]
709-
> To learn more about how you can configure and control Azure AI content safety settings, check the [Azure AI content safety documentation](https://aka.ms/azureaicontentsafety).
705+
[!INCLUDE [content-safety-serverless-apis-note](../includes/content-safety-serverless-apis-note.md)]
710706
711-
> [!NOTE]
712-
> Azure AI content safety is only available for models deployed as serverless API endpoints.
713707
714708
::: zone-end
715709
@@ -1065,11 +1059,8 @@ catch (RequestFailedException ex)
10651059
}
10661060
```
10671061

1068-
> [!TIP]
1069-
> To learn more about how you can configure and control Azure AI content safety settings, check the [Azure AI content safety documentation](https://aka.ms/azureaicontentsafety).
1062+
[!INCLUDE [content-safety-serverless-apis-note](../includes/content-safety-serverless-apis-note.md)]
10701063

1071-
> [!NOTE]
1072-
> Azure AI content safety is only available for models deployed as serverless API endpoints.
10731064

10741065
::: zone-end
10751066

@@ -1449,11 +1440,8 @@ The following example shows how to handle events when the model detects harmful
14491440
}
14501441
```
14511442
1452-
> [!TIP]
1453-
> To learn more about how you can configure and control Azure AI content safety settings, check the [Azure AI content safety documentation](https://aka.ms/azureaicontentsafety).
1443+
[!INCLUDE [content-safety-serverless-apis-note](../includes/content-safety-serverless-apis-note.md)]
14541444
1455-
> [!NOTE]
1456-
> Azure AI content safety is only available for models deployed as serverless API endpoints.
14571445
14581446
::: zone-end
14591447

articles/ai-studio/how-to/deploy-models-mistral-codestral.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -466,8 +466,8 @@ except HttpResponseError as ex:
466466
raise
467467
```
468468

469-
> [!TIP]
470-
> To learn more about how you can configure and control Azure AI content safety settings, check the [Azure AI content safety documentation](https://aka.ms/azureaicontentsafety).
469+
[!INCLUDE [content-safety-serverless-apis-note](../includes/content-safety-serverless-apis-note.md)]
470+
471471

472472
::: zone-end
473473

@@ -929,8 +929,8 @@ catch (error) {
929929
}
930930
```
931931
932-
> [!TIP]
933-
> To learn more about how you can configure and control Azure AI content safety settings, check the [Azure AI content safety documentation](https://aka.ms/azureaicontentsafety).
932+
[!INCLUDE [content-safety-serverless-apis-note](../includes/content-safety-serverless-apis-note.md)]
933+
934934
935935
::: zone-end
936936
@@ -1414,8 +1414,8 @@ catch (RequestFailedException ex)
14141414
}
14151415
```
14161416
1417-
> [!TIP]
1418-
> To learn more about how you can configure and control Azure AI content safety settings, check the [Azure AI content safety documentation](https://aka.ms/azureaicontentsafety).
1417+
[!INCLUDE [content-safety-serverless-apis-note](../includes/content-safety-serverless-apis-note.md)]
1418+
14191419
14201420
::: zone-end
14211421
@@ -2025,8 +2025,8 @@ The following example shows how to handle events when the model detects harmful
20252025
}
20262026
```
20272027

2028-
> [!TIP]
2029-
> To learn more about how you can configure and control Azure AI content safety settings, check the [Azure AI content safety documentation](https://aka.ms/azureaicontentsafety).
2028+
[!INCLUDE [content-safety-serverless-apis-note](../includes/content-safety-serverless-apis-note.md)]
2029+
20302030

20312031
::: zone-end
20322032

0 commit comments

Comments
 (0)