Before integrating Azure Content Safety Guardrail, ensure you have the following:
API Key: A valid API key is required to access the Azure Content Safety service. This key authenticates your requests to the Azure Cognitive Services or Azure AI resource that provides content safety capabilities. You can obtain this API key from the Azure portal under your resource’s “Keys and Endpoint” section.
Resource Name: The unique name of your Azure resource (e.g., the Azure Cognitive Services or Azure AI resource) that provides the content safety capability. You can find this in the Azure portal under the resource’s overview page. This is required to authenticate and route requests to the correct Azure service instance.
To add Azure Content Safety Guardrail to your TrueFoundry setup, follow these steps:Fill in the Guardrails Group Form
Name: Enter a name for your guardrails group.
Collaborators: Add collaborators who will have access to this group.
Azure Content Safety Guardrail Config:
Name: Enter a name for the Azure Content Safety Guardrail configuration.
Resource Name: The unique name of your Azure resource (e.g., the Azure Cognitive Services or Azure AI resource) that provides the content safety capability. You can find this in the Azure portal under the resource’s overview page. This is required to authenticate and route requests to the correct Azure service instance.
API Version: The version of the Azure Content Safety API to use. (Default: 2024-09-01)
Blocklist Name (Optional): The name of the blocklist to use.
Severity: The severity threshold to use for blocking content. (Default: 2)
Categories: The categories of content to check against.
Azure Authentication Data:
API Key: The API key for the Azure Content Safety Guardrail service.
This key is required to authenticate requests to Azure’s Content Safety Guardrail API. You can obtain it from the Azure portal by navigating to your Cognitive Services or Azure AI resource, then selecting “Keys and Endpoint” in the resource menu. Ensure you keep this key secure, as it grants access to your Azure resource.
When you integrate Azure Content Safety Guardrail with TrueFoundry, the system sends the last message to the Azure Content Safety Guardrail API and receives a response that indicates whether the content violates any configured policies.
TrueFoundry relies on the Azure Content Safety Guardrail response to determine content safety:
TrueFoundry uses a configurable severity threshold to determine if content should be blocked.
If any category in the Azure Content Safety Guardrail response has a severity equal to or greater than the configured threshold, the content will be blocked.
If all detected severities are below the threshold, the content will be passed through as is.
TrueFoundry AI Gateway will respond with an error or block the content if the severity threshold is met or exceeded.