Azure AI Content Safety – Blocklist Management in Optimizely CMS – List All Blocklists

In this article, I show how the blocklist management feature, offered by the Azure AI Content Safety service, can be used to retrieve blocklists within Optimizely CMS.

The main purpose of these blocklists is to help identify specific text that could be harmful or unnecessary. They are customised to fit the specific needs and type of the website. Unlike the Azure AI Content Safety Text Detection API, these blocklists can find content that may not be immediately recognised as harmful, so it’s more personalised to the user.

This feature can easily be added to the Optimizely CMS to improve the content moderation process. Its integration ensures that the published content meets the required standards and accurately conveys the business’s intended message.

Creating new Blocklist items can be achieved using a custom Add-On included in the NuGet Package “Patel.AzureAIContentSafety.Optimizely”. This Add-On can be obtained from the Optimizely NuGet Feed or at the NuGet Feed. The screenshot above shows this section within the Custom Add-On.

Blocklist items can also be added by using the Azure Content Safety Studio. However, it is necessary to create an AI Content Safety resource as a prerequisite before applying this method.

The following screenshot illustrates the code used to retrieve blocklists from the Azure Content Safety API.

Response from the API via the Console

Azure AI Content Safety – Blocklists Retrieval operation complete
Blocklist Name: DemoTest
Blocklist Description: Description
BlockList Name: KnightFrank
Blocklist Description: Blocklist which is used for KnightFrank content
BlockList Name: Test
Blocklist Description: Test BlockList
BlockList Name: StandardPage
Blocklist Description: Standard Page Blocklist
BlockList Name: OptimizelyBlocklist
Blocklist Description: OptimizelyDescription

When the blocklists have been fetched, The blocklists section within the Add-On will be populated with the blocklists associated with the Azure AI Content Safety resource. The main article image shows an example of this.