Edit

Share via


Use blocklists with Foundry Models in Microsoft Foundry

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

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

  1. Go to Microsoft Foundry and navigate to your project. Then select the Guardrails + controls page in the left navigation and select the Blocklists tab.

    Screenshot of the Blocklists page tab.

  2. 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.

  3. Select your new blocklist. On the blocklist's page, select Add new term.

  4. 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

  1. 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.

    Screenshot of the Create content filter button.

  2. 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).

  3. 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

Next step