Skip to main content

Quickstart: Create a guardrail policy

In this quickstart, you create a policy in Microsoft Foundry to govern the use of guardrail controls for model deployments across your subscription. When you create a policy assignment in Foundry, the system creates a series of individual policies and associates them with a policy initiative. In the Foundry portal, you view the status of the policy initiative rather than individual policies. You can also review and manage these policies directly in Azure Policy via the Azure portal.

Prerequisites

This capability is available only in the Microsoft Foundry (new) portal.

Create the guardrail policy

  1. Sign in to Microsoft Foundry. Make sure the New Foundry toggle is on. These steps refer to Foundry (new).
  1. On the toolbar, select Operate.
  2. On the left pane, select Compliance.
  3. Select Create policy.
Screenshot of the Compliance pane of Foundry Control Plane.
  1. Select the controls to add to the policy. Guardrail controls include content safety filters, prompt shields, and groundedness checks that help ensure the safe and responsible operation of your AI models. These controls represent the minimum settings required for a model deployment to be considered compliant with the policy. As you configure each control, select Add control to add it to the policy.
Screenshot of the area for adding controls.
  1. Select Next to move to scope selection. You can scope your policy to a single subscription or a resource group. Select the desired scope, select the subscription or resource group that you want to apply to the policy, and then choose Select.
Screenshot of the area for selecting a scope.
  1. Select Next to add exceptions to the policy. The exception options depend on your scope selection:
    • If you scoped to a subscription, you can create exceptions for entire resource groups or individual model deployments within that subscription.
    • If you scoped to a resource group, you can create exceptions only for individual model deployments.
Screenshot of the area for configuring exceptions.
  1. Select Next to move to the review stage. Here, you name your policy and review the scope, exceptions, and controls that define the policy. When you’re ready, select Submit to create the policy.
Screenshot of the area for reviewing and submitting a guardrail policy.

Verify your policy

After you submit your policy, verify that it was created successfully:
  1. On the Compliance pane, select the Policies tab.
  2. Locate your newly created policy in the policy list.
  3. Check that the policy name, scope, and status are correct.
It takes some time for Azure Policy to perform a compliance scan. Initial compliance results might not appear immediately after policy creation.