|
| 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 | + |
0 commit comments