- Overview of Responsible AI practices for AOAI models
- AOAI Content filtering categories
- Apply for unrestricted content filters via this form
Azd automatically creates content filters profile with default severity threshold (Medium) for all content harms categories (Hate, Violence, Sexual, Self-Harm) and assignes it to provisioned AOAI model through post deployment script. However, if you want to customize them to be more or less restrictive, you can make changes to raipolicies.json file.
Example: Changing filters threshold for violence (prompt) and self-harm (completion) categories
{
"name": "violence",
"blocking": true,
"enabled": true,
"allowedContentLevel": "high",
"source": "prompt"
},
{
"name": "selfharm",
"blocking": true,
"enabled": true,
"allowedContentLevel": "low",
"source": "completion"
}
(Optional) Content filters also support additional safety models (Jailbreak, Material Protection for Text or Code) that can be run on top of the main content filters.
Example: Enabling Jailbreak and Text Material protection
{
"name": "jailbreak",
"blocking": true,
"source": "prompt",
"enabled": true
},
{
"name": "protected_material_text",
"blocking": true,
"source": "completion",
"enabled": true
},
{
"name": "protected_material_code",
"blocking": false,
"source": "completion",
"enabled": false
}
Then, follow regular installation & deployment process.
Note: You need to make changes in raipolicies.json file before executting
azd up
command, if you want to provision and deploy all in once.
In order you update content filters policies for already deployed model, run the following command.
azd provision