From the course: A Start to Using Generative AI in .NET

Unlock the full course today

Join today to access over 23,400 courses taught by industry experts.

Using Azure content filters

Using Azure content filters

- [Instructor] When it comes to content filtering, Azure has a different approach compared to OpenAI. The user's prompt goes through an input filter even before it reaches the language model. Then the language model does its thing, but the output of the language model also goes through an output filter before being sent back to your application. The input and output filters can be defined together as content filters. Once you have one or more content filters defined, you can use any of them for each of your deployments. This approach, while more complex than OpenAI's, gives you way more control over what is allowed. Let's create a new content filter, and I'll walk you through what it can do. To define a filter, we need to go to Azure AI Studio. Once you're logged in, find the hub you want to define the filter in and click on it. Associating the filter with hubs allows us to reuse the same filter for multiple projects, although it is usually a better practice to keep filters separate…

Contents