Skip to content

Commit a8282ce

Browse files
authored
Merge pull request #274526 from PatrickFarley/content-safety-build
Content safety build
2 parents 3692483 + 98d43b7 commit a8282ce

20 files changed

+1415
-66
lines changed
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
---
2+
title: "Custom categories in Azure AI Content Safety"
3+
titleSuffix: Azure AI services
4+
description: Learn about custom content categories and how you can use Azure AI Content Safety to handle them on your platform.
5+
#services: cognitive-services
6+
author: PatrickFarley
7+
manager: nitinme
8+
ms.service: azure-ai-content-safety
9+
ms.custom: build-2024
10+
ms.topic: conceptual
11+
ms.date: 04/11/2024
12+
ms.author: pafarley
13+
---
14+
15+
# Custom categories
16+
17+
The Azure AI Content Safety custom category feature lets you create and manage your own content categories for enhanced moderation and filtering. This feature enables customers to define categories specific to their needs, provide sample data, train a custom machine learning model, and use it to classify new content according to the predefined categories.
18+
19+
## Types of analysis
20+
21+
| API | Functionality |
22+
| :--------- | :------------ |
23+
| Customized categories | Create, get, and delete a customized category or list all customized categories for further annotation tasks |
24+
25+
## How it works
26+
27+
The Azure AI Content Safety custom category feature provides a streamlined process for creating, training, and using custom content classification models. Here's a look at the underlying workflow:
28+
29+
### Step 1: Definition and setup
30+
31+
When you define a custom category, you need to teach the AI what type of content you want to identify. This involves providing a clear **category name** and a detailed **definition** that encapsulates the content's characteristics.
32+
33+
Then, you collect a balanced dataset with **positive** and (optionally) **negative examples** to help the AI to learn the nuances of your category. This data should be representative of the variety of content that the model will encounter in a real-world scenario.
34+
35+
### Step 2: Model training
36+
37+
Once your dataset is ready, the Azure AI Content Safety service uses it to train a new model. During training, the AI analyzes the data and learns to distinguish between content that matches the category and content that doesn't.
38+
39+
### Step 3: Model inferencing
40+
41+
After training, you need to evaluate the model to ensure it meets your accuracy requirements. Test the model with new content that it hasn't received before. The evaluation phase helps you identify any potential adjustments you need to make deploying the model into a production environment.
42+
43+
## Limitations
44+
45+
### Input limitations
46+
47+
See the following table for the input limitations of the service.
48+
49+
| Object | Limitation |
50+
| ---------------- | ------------ |
51+
| Supported languages | English only |
52+
| Number of categories per user | 5 |
53+
| Number of versions per category | 5 |
54+
| Number of concurrent builds (processes) per category | 1 |
55+
| Inference operations per second | 10 |
56+
| Number of custom categories in one text analyze request | 5 |
57+
| Number of samples in a category version | minimum 50, maximum 10K (no duplicate samples allowed) |
58+
| Sample file size | maximum 128000 bytes |
59+
| Length of a text sample | maximum 125K characters |
60+
| Length of a category definition | maximum 1000 characters |
61+
| Length of a category name | maximum 128 characters |
62+
| Length of a blob url | maximum 500 characters |
63+
64+
65+
### Region availability
66+
67+
To use this API, you must create your Azure AI Content Safety resource in one of the supported regions:
68+
- East US
69+
70+
71+
## Next steps
72+
73+
Follow the how-to guide to create custom categories in Azure AI Content Safety.
74+
75+
* [Use custom category API](../how-to/custom-categories.md)
76+
77+
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
---
2+
title: "Incident response in Azure AI Content Safety"
3+
titleSuffix: Azure AI services
4+
description: Learn about content incidents and how you can use Azure AI Content Safety to handle them on your platform.
5+
#services: cognitive-services
6+
author: PatrickFarley
7+
manager: nitinme
8+
ms.service: azure-ai-content-safety
9+
ms.custom: build-2024
10+
ms.topic: conceptual
11+
ms.date: 04/11/2024
12+
ms.author: pafarley
13+
---
14+
15+
# Incident response
16+
17+
In content moderation scenarios, incident response is the process of identifying, analyzing, containing, eradicating, and recovering from cyber incidents that involve inappropriate or harmful content on online platforms.
18+
19+
An incident may involve a set of emerging content patterns (text, image, or other modalities) that violate Microsoft community guidelines or the customers' own policies and expectations. These incidents need to be mitigated quickly and accurately to avoid potential live site issues or harm to users and communities.
20+
21+
## Incident response API features
22+
23+
One way to deal with emerging content incidents is to use [Blocklists](/azure/ai-services/content-safety/how-to/use-blocklist), but that only allows exact text matching and no image matching. The Azure AI Content Safety incident response API offers the following advanced capabilities:
24+
- semantic text matching using embedding search with a lightweight classifier
25+
- image matching with a lightweight object-tracking model and embedding search.
26+
27+
## How it works
28+
29+
First, you use the API to create an incident object with a description. Then you add any number of image or text samples to the incident. No training step is needed.
30+
31+
Then, you can include your defined incident in a regular text analysis or image analysis request. The service will indicate whether the submitted content is an instance of your incident. The service can still do other content moderation tasks in the same API call.
32+
33+
## Limitations
34+
35+
### Language availability
36+
37+
The text incident response API supports all languages that are supported by Content Safety text moderation. See [Language support](/azure/ai-services/content-safety/language-support).
38+
39+
### Input limitations
40+
41+
See the following table for the input limitations of the incident response API:
42+
43+
| Object | Limitation |
44+
| :------------ | :----------- |
45+
| Maximum length of an incident name | 100 characters |
46+
| Maximum number of text/image samples per incident | 1000 |
47+
| Maximum size of each sample | Text: 500 characters<br>Image: 4 MB  |
48+
| Maximum number of text or image incidents per resource| 100 |
49+
| Supported Image formats | BMP, GIF, JPEG, PNG, TIF, WEBP |
50+
51+
### Region availability
52+
53+
To use this API, you must create your Azure AI Content Safety resource in one of the supported regions:
54+
- East US
55+
- Sweden Central
56+
57+
## Next steps
58+
59+
Follow the how-to guide to use the Azure AI Content Safety incident response API.
60+
61+
* [Use the incident response API](../how-to/incident-response.md)

articles/ai-services/content-safety/faq.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ sections:
3737
- Azure AI Content Safety offers more accurate and granular detection of harmful content in text and images using state-of-the-art AI models.
3838
- Azure AI Content Safety supports multilingual content moderation in English, Japanese, German, Spanish, French, Portuguese, Italian, and Chinese.
3939
- Azure AI Content Safety enables responsible AI practices by monitoring both user-generated and AI-generated content.
40+
- question: |
41+
Can I detect harmful content in custom categories that I define myself?
42+
answer: |
43+
Yes, you can use the Azure AI Content Safety custom categories API to create categories, upload examples, and train the service to detect similar content. Custom categories are available for both text and image moderation.
4044
- question: |
4145
How does billing work for the Azure AI Content Safety service?
4246
answer: |

0 commit comments

Comments
 (0)