🎊Creating Azure OpenAI Instances and Content Filter

Azure OpenAI is a Platform-as-a-Service (PaaS) on Azure Cloud. In Azure, you can deploy your own models and integrate them into your applications. Like any other PaaS service, you don’t need to manage the underlying infrastructure such as VMs and networks. Instead, you manage model deployments, rate limits, token limits, model versions, and responsible AI policies. Azure OpenAI can be considered the enterprise version of OpenAI. It also allows for scaling and improving reliability by deploying multiple models in different regions. Azure OpenAI offers private networking, regional availability, and responsible AI content filtering.

Azure OpenAI Content Filtering

Azure OpenAI Service includes a content filtering system designed to prevent harmful content in both prompts and outputs. This system uses classification models to detect harmful categories like hate, sexual content, violence, and self-harm. It’s primarily trained in languages like English, German, Japanese, Spanish, French, Italian, Portuguese, and Chinese, but it can work in others with varying quality. Learn more here about content filtering.

Content Filtering Categories

The content filtering system in the Azure OpenAI Service includes:

  1. Neural Multi-Class Classification Models:

  • Detect and filter harmful content.

  • Cover four categories: hate, sexual, violence, and self-harm.

  • Include four severity levels: safe, low, medium, and high.

  • Content labeled as ‘safe’ is annotated but not filtered and is not configurable.

2. Optional Classification Models:

  • Detect jailbreak risk and known content for text and code.

  • Binary classifiers that flag user or model behavior as a jailbreak attack or match to known text/source code.

  • Optional use, except the protected material code model may be required for Customer Copyright Commitment coverage.

Creating Azure OpenAI Instances and Content Filter

There are numerous ways to create Azure OpenAI instances, such as using the UI, ARM/Bicep templates, CLI, or PowerShell. In this blog, we will explore the method using the Portal UI.

Steps:

Step 1: Create Azure OpenAI Service in your subscription

Step 3: Deploy GPT4o model. Here we will select the Microsoft Default Content Filter. In later step, I will show how to create your own filter, and update the deployment

Step 4: Try model in Playground. (You might need to wait for some time after the model deployment before trying it out)

Step 5: Create Custom Content Filter

Step 6: Update the content filter for your model deployment

Now the content filter is going to protect you from some known attacks.

Last updated