Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The configurable content filters are sufficient for most content moderation needs. However, you might need to create custom blocklists in the Microsoft Foundry portal as part of your content filtering configurations to filter terms specific to your use case. This article shows how to create custom blocklists as part of your content filters in the Foundry portal.
Prerequisites
An Azure subscription. If you're using GitHub Models, you can upgrade your experience and create an Azure subscription in the process. For more information, see Upgrade from GitHub Models to Foundry Models.
A Foundry services resource. For more information, see Create a Foundry Services resource.
A Foundry project connected to your Foundry services resource.
A model deployment. For more information, see Add and configure models to Foundry services.
Note
Blocklist (preview) support is limited to Azure OpenAI models.
Note
This document refers to the Microsoft Foundry (classic) portal.
🔄 Switch to the Microsoft Foundry (new) documentation if you're using the new portal.
Note
This document refers to the Microsoft Foundry (new) portal.
Create a blocklist
Go to Microsoft Foundry and navigate to your project. Then select the Guardrails + controls page in the left navigation and select the Blocklists tab.
Select Create a blocklist. Enter a name for your blocklist, add a description, and select an Azure OpenAI resource to connect it to. Then select Create Blocklist.
Select your new blocklist. On the blocklist's page, select Add new term.
Enter the term that you want to filter and select Add term. You can also use a regex. You can delete each term in your blocklist.
Attach a blocklist to a content filter configuration
After you create the blocklist, return to the Guardrails + controls page and select the Content filters tab. Create a new content filter configuration. A wizard opens with several AI content safety components.
On the Input filter and Output filter screens, turn on the Blocklist toggle. You can then select a blocklist from the list. There are two types of blocklists: the custom blocklists you created, and prebuilt blocklists that Microsoft provides—in this case a Profanity blocklist (English).
Decide which of the available blocklists you want to include in your content filtering configuration. Review and finish the content filtering configuration by selecting Next. You can always go back and edit your configuration. When it's ready, select Create content filter. You can now apply the new configuration that includes your blocklists to a deployment.
Go to Foundry and navigate to your project. Then select the Guardrails + controls page in the left navigation. Select the Create a custom blocklist link, and follow the instructions