Skip to content

Commit b64e374

Browse files
authored
Merge pull request #275710 from eric-urban/eur/build-ai-studio-follow-5
evaluator library compute content filter
2 parents f248dd7 + 1f5de55 commit b64e374

24 files changed

+86
-37
lines changed

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

Lines changed: 51 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ manager: nitinme
66
ms.service: azure-ai-studio
77
ms.custom:
88
- ignite-2023
9-
ms.topic: conceptual
9+
ms.topic: how-to
1010
ms.date: 5/21/2024
1111
ms.reviewer: eur
1212
ms.author: pafarley
@@ -29,17 +29,60 @@ The content filtering models have been trained and tested on the following langu
2929
You can create a content filter or use the default content filter for Azure OpenAI model deployment, and can also use a default content filter for other text models curated by Azure AI in the [model catalog](../how-to/model-catalog-overview.md). The custom content filters for those models aren't yet available. Models available through Models as a Service have content filtering enabled by default and can't be configured.
3030

3131
## How to create a content filter?
32-
For any model deployment in [Azure AI Studio](https://ai.azure.com), you could directly use the default content filter, but when you want to have more customized setting on content filter, for example set a stricter or looser filter, or enable more advanced capabilities, like jailbreak risk detection and protected material detection. To create a content filter, you could go to **Build**, choose one of your projects, then select **Content filters** in the left navigation bar, and create a content filter.
32+
For any model deployment in [Azure AI Studio](https://ai.azure.com), you could directly use the default content filter, but when you want to have more customized setting on content filter, for example set a stricter or looser filter, or enable more advanced capabilities, like jailbreak risk detection and protected material detection.
3333

34-
:::image type="content" source="../media/content-safety/content-filter/create-content-filter.png" alt-text="Screenshot of create content filter." lightbox="../media/content-safety/content-filter/create-content-filter.png":::
34+
Follow these steps to create a content filter:
3535

36-
### Content filtering categories and configurability
36+
1. Go to [AI Studio](https://ai.azure.com) and select a project.
37+
1. Select **Content filters** from the left pane and then select **+ New content filter**.
3738

38-
The content filtering system integrated in Azure AI Studio contains neural multi-class classification models aimed at detecting and filtering harmful content; the models cover four categories (hate, sexual, violence, and self-harm) across four severity levels (safe, low, medium, and high). Content detected at the 'safe' severity level is labeled in annotations but isn't subject to filtering and isn't configurable.
39+
:::image type="content" source="../media/content-safety/content-filter/create-content-filter.png" alt-text="Screenshot of the button to create a new content filter." lightbox="../media/content-safety/content-filter/create-content-filter.png":::
40+
41+
1. On the **Basic information** page, enter a name for your content filter. Select a connection to associate with the content filter. Then select **Next**.
42+
43+
:::image type="content" source="../media/content-safety/content-filter/create-content-filter-basic.png" alt-text="Screenshot of the option to select or enter basic information such as the filter name when creating a content filter." lightbox="../media/content-safety/content-filter/create-content-filter-basic.png":::
44+
45+
1. On the **Input filters** page, you can set the filter for the input prompt. For example, you can enable prompt shields for jailbreak attacks. Then select **Next**.
46+
47+
:::image type="content" source="../media/content-safety/content-filter/configure-threshold.png" alt-text="Screenshot of the option to select input filters when creating a content filter." lightbox="../media/content-safety/content-filter/configure-threshold.png":::
48+
49+
Content will be annotated by category and blocked according to the threshold you set. For the violence, hate, sexual, and self-harm categories, adjust the slider to block content of high, medium, or low severity.
50+
51+
1. On the **Output filters** page, you can set the filter for the output completion. For example, you can enable filters for protected material detection. Then select **Next**.
52+
53+
Content will be annotated by each category and blocked according to the threshold. For violent content, hate content, sexual content, and self-harm content category, adjust the threshold to block harmful content with equal or higher severity levels.
54+
55+
1. Optionally, on the **Deployment** page, you can associate the content filter with a deployment. You can also associate the content filter with a deployment later. Then select **Create**.
56+
57+
:::image type="content" source="../media/content-safety/content-filter/create-content-filter-deployment.png" alt-text="Screenshot of the option to select a deployment when creating a content filter." lightbox="../media/content-safety/content-filter/create-content-filter-deployment.png":::
58+
59+
Content filtering configurations are created at the hub level in AI Studio. Learn more about configurability in the [Azure OpenAI docs](/azure/ai-services/openai/how-to/content-filters).
60+
61+
1. On the **Review** page, review the settings and then select **Create filter**.
62+
63+
64+
## How to apply a content filter?
65+
66+
A default content filter is set when you create a deployment. You can also apply your custom content filter to your deployment.
67+
68+
Follow these steps to apply a content filter to a deployment:
3969

40-
:::image type="content" source="../media/content-safety/content-filter/configure-threshold.png" alt-text="Screenshot of configuring the threshold." lightbox="../media/content-safety/content-filter/configure-threshold.png":::
70+
1. Go to [AI Studio](https://ai.azure.com) and select a project.
71+
1. Select **Deployments** and choose one of your deployments, then select **Edit**.
4172

42-
#### Categories
73+
:::image type="content" source="../media/content-safety/content-filter/deployment-edit.png" alt-text="Screenshot of the button to edit a deployment." lightbox="../media/content-safety/content-filter/deployment-edit.png":::
74+
75+
1. In the **Update deployment** window, select the content filter you want to apply to the deployment.
76+
77+
:::image type="content" source="../media/content-safety/content-filter/apply-content-filter.png" alt-text="Screenshot of apply content filter." lightbox="../media/content-safety/content-filter/apply-content-filter.png":::
78+
79+
Now, you can go to the playground to test whether the content filter works as expected!
80+
81+
## Content filtering categories and configurability
82+
83+
The content filtering system integrated in Azure AI Studio contains neural multi-class classification models aimed at detecting and filtering harmful content; the models cover four categories (hate, sexual, violence, and self-harm) across four severity levels (safe, low, medium, and high). Content detected at the 'safe' severity level is labeled in annotations but isn't subject to filtering and isn't configurable.
84+
85+
### Categories
4386

4487
|Category|Description|
4588
|--------|-----------|
@@ -48,7 +91,7 @@ The content filtering system integrated in Azure AI Studio contains neural multi
4891
| Violence | The violence category describes language related to physical actions intended to hurt, injure, damage, or kill someone or something; describes weapons, etc. |
4992
| Self-Harm | The self-harm category describes language related to physical actions intended to purposely hurt, injure, or damage one's body, or kill oneself.|
5093

51-
#### Severity levels
94+
### Severity levels
5295

5396
|Category|Description|
5497
|--------|-----------|
@@ -70,22 +113,8 @@ The default content filtering configuration for the GPT model series is set to f
70113

71114
<sup>1</sup> For Azure OpenAI models, only customers who have been approved for modified content filtering have full content filtering control, including configuring content filters at severity level high only or turning off content filters. Apply for modified content filters via this form: [Azure OpenAI Limited Access Review: Modified Content Filters and Abuse Monitoring (microsoft.com)](https://customervoice.microsoft.com/Pages/ResponsePage.aspx?id=v4j5cvGGr0GRqy180BHbR7en2Ais5pxKtso_Pz4b1_xURE01NDY1OUhBRzQ3MkQxMUhZSE1ZUlJKTiQlQCN0PWcu)
72115

73-
Content filtering configurations are created within a Resource in Azure AI Studio and can be associated with Deployments. Learn more about configurability in the [Azure OpenAI docs](/azure/ai-services/openai/how-to/content-filters).
74-
75116
Customers are responsible for ensuring that applications integrating Azure OpenAI comply with the [Code of Conduct](/legal/cognitive-services/openai/code-of-conduct?context=%2Fazure%2Fai-services%2Fopenai%2Fcontext%2Fcontext).
76117

77-
### More filters for generative AI scenarios
78-
You could also enable filters for generative AI scenarios: jailbreak risk detection and protected material detection.
79-
80-
:::image type="content" source="../media/content-safety/content-filter/additional-models.png" alt-text="Screenshot of additional models." lightbox="../media/content-safety/content-filter/additional-models.png":::
81-
82-
## How to apply a content filter?
83-
84-
A default content filter is set when you create a deployment. You can also apply your custom content filter to your deployment. Select **Deployments** and choose one of your deployments, then select **Edit**, a window of updating deployment will open up. Then you can update the deployment by selecting one of your created content filters.
85-
86-
:::image type="content" source="../media/content-safety/content-filter/apply-content-filter.png" alt-text="Screenshot of apply content filter." lightbox="../media/content-safety/content-filter/apply-content-filter.png":::
87-
88-
Now, you can go to the playground to test whether the content filter works as expected!
89118

90119
## Next steps
91120

articles/ai-studio/how-to/create-manage-compute.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ To create a compute instance in Azure AI Studio:
5050

5151
For more information on configuration details such as CPU and RAM, see [Azure Machine Learning pricing](https://azure.microsoft.com/pricing/details/machine-learning/) and [virtual machine sizes](/azure/virtual-machines/sizes).
5252

53-
1. On the **Scheduling** page under **Auto shut down** make sure idle shutdown is enabled by default. You can opt to automatically shutdown compute after the instance has been idle for a set amount of time. If you disable auto shutdown costs continue to accrue even during periods of inactivity. For more information, see [Configure idle shutdown](#configure-idle-shutdown).
53+
1. On the **Scheduling** page under **Auto shut down** make sure idle shutdown is enabled by default. You can opt to automatically shut down compute after the instance has been idle for a set amount of time. If you disable auto shutdown costs continue to accrue even during periods of inactivity. For more information, see [Configure idle shutdown](#configure-idle-shutdown).
5454

5555
:::image type="content" source="../media/compute/compute-scheduling.png" alt-text="Screenshot of the option to enable idle shutdown and create a schedule." lightbox="../media/compute/compute-scheduling.png":::
5656

@@ -76,9 +76,6 @@ To create a compute instance in Azure AI Studio:
7676

7777
To avoid getting charged for a compute instance that is switched on but inactive, configure when to shut down your compute instance due to inactivity.
7878

79-
> [!IMPORTANT]
80-
> The compute won't be idle if you have a [prompt flow compute session](./create-manage-compute-session.md) in **Running** status on the compute. You need to delete any active compute sessions to make the compute instance eligible for idle shutdown. You also can't have any active [VS Code (Web)](./develop/vscode.md) sessions hosted on the compute instance.
81-
8279
The setting can be configured during compute instance creation or modified for existing compute instances.
8380

8481
For a new compute instance, configure idle shutdown during compute instance creation. For more information, see [Create a compute instance](#create-a-compute-instance) earlier in this article.
@@ -91,6 +88,9 @@ To configure idle shutdown for an existing compute instance follow these steps:
9188

9289
:::image type="content" source="../media/compute/compute-schedule-update.png" alt-text="Screenshot of the option to change the idle shutdown schedule for a compute instance." lightbox="../media/compute/compute-schedule-update.png":::
9390

91+
> [!IMPORTANT]
92+
> The compute won't be idle if you have a [prompt flow compute session](./create-manage-compute-session.md) in **Running** status on the compute. You need to delete any active compute sessions to make the compute instance eligible for idle shutdown. You also can't have any active [VS Code (Web)](./develop/vscode.md) sessions hosted on the compute instance.
93+
9494
1. Update or add to the schedule. You can have a total of four schedules per compute instance. Then select **Update** to save your changes.
9595

9696
## Start or stop a compute instance

0 commit comments

Comments
 (0)