Skip to content

Policies & Guardrails#

Open Policies & Guardrails to enforce AI safety, compliance, and content controls on request traffic. Define reusable guardrail checks (for example PII detection) and attach them to policies that decide when and how those checks run.

Use this page when you need to:

  • Meet compliance or data-protection requirements for Chat and API traffic.
  • Block, redact, or flag unsafe or sensitive content before it reaches a model or a user.
  • Reuse the same guardrail across multiple policies or evaluation stages.
  • Review whether policies are matching traffic and how often they violate or bypass.

From this page you can see which policies and guardrails are active, how requests are evaluated, and (on detail pages) recent violation, match, and latency signals.

Next: Create a guardrail and link it to a policy. For a complete workflow, see the end-to-end example. After deployment, monitor policy and guardrail activity on Dashboards and inspect affected requests on Traces.

The page has two tabs:

  • Policies — Evaluation scope, conditions, and linked guardrails. See Policies tab.
  • Guardrails — Reusable check definitions. See Guardrails tab.

For architecture, limitations, and patterns, see Architecture Overview — Policies and guardrails.

Policies tab#

Use the Policies tab to review how requests are evaluated across the organization and to edit or delete policies. Each row shows the policy name, description, evaluation stage, sampling rate, timeout, request type, and the number of linked guardrails. Click a policy name to open its detail page.

Policy detail page#

Click a policy name to get configuration details, evaluation settings, linked guardrails, and policy activity metrics. Use EDIT to modify the policy configuration.

Summary cards at the top of the page provide a 24-hour activity snapshot, including the number of requests evaluated by the policy, violation rate, bypass rate, match rate, average evaluation latency, and the number of linked guardrails. Metrics may display 0 or - when little or no traffic has been evaluated during the selected period.

Policy overview#

The OVERVIEW tab displays the policy definition and evaluation settings. General information includes the policy description, policy identifier, organization identifier, policy name, current state, and creation date.

The Summary section contains general policy metadata, including the policy identifier, organization identifier, policy name, current state, and creation date. Copy controls are available for the identifiers.

The Evaluation Scope shows when and how the policy is applied, including the evaluation stage, sampling rate, timeout, request type, timeout behavior, and the number of linked guardrails.

The Conditions section defines when the policy applies. Conditions may be displayed as expressions or as rules configured through the policy editor and determine which requests are evaluated by the policy.

Linked Guardrails#

The LINKED GUARDRAILS tab displays all guardrails attached to the policy. For each guardrail, the table shows its name, type, execution stage, and configuration details.

The Name column links to the guardrail definition. The Type column identifies the guardrail engine; see Guardrail types for the full list. The Stage column indicates when the guardrail runs during request processing. The Configuration column summarizes guardrail-specific settings such as threshold values, policy actions, PII fields, and custom patterns.

Usage Statistics#

The Usage Statistics tab provides visibility into policy activity, evaluation latency, violation trends, and guardrail execution results for requests evaluated by the policy.

The Aggregated Metrics section summarizes policy performance and coverage, including the total number of evaluations, requests evaluated during the last 24 hours, match rates, violation rates, latency measurements, and bypass rates. Metrics are displayed for both the last 24 hours and the overall policy lifetime where applicable.

Additional panels provide detailed breakdowns of policy activity:

  • Violations by Day — Time-series chart showing the number of violations over time.
  • Top Scopes — Distribution of evaluated requests across common dimensions such as Request type, Provider, Model, User, or other available scope values.
  • Violations by Type — Breakdown of evaluation outcomes grouped by violation category, such as Score, Timeout, or Skipped.
  • Guardrail Invocations — Statistics for linked guardrails, including evaluation and violation counts. Guardrail names link to the corresponding guardrail definitions.

Use the Usage Statistics tab to verify that policy conditions match the intended requests, monitor evaluation latency, and analyze violation patterns and guardrail effectiveness.

Guardrails tab#

Use the Guardrails tab to create and review reusable checks that policies can attach—PII detection, custom patterns, and other engines. Open a guardrail to inspect configuration, invocation counts, and which policies use it.

Click + ADD to create a guardrail (see First Steps — Add guardrail). For supported engines and thresholds, see Guardrail types and Guardrail thresholds.

Each row shows the guardrail name, type, execution stage, description, usage statistics, creation date, and actions. Click a name to open the detail page.

Guardrail detail page#

The guardrail detail page displays the guardrail definition, configuration, usage statistics, and policy associations. Use EDIT to modify the guardrail configuration.

Summary cards at the top of the page show how many policies use the guardrail, the total number of guardrail invocations, and the violation rate. The violation rate is displayed as - until evaluation data becomes available.

The Description section provides a human-readable summary of the guardrail purpose and intended behavior.

The Overview section contains general guardrail metadata, including the guardrail name, type, execution stage, and creation date. The Type field identifies the guardrail engine; see Guardrail types for the full list of supported guardrails. The Stage field indicates when the guardrail runs during request processing.

The Configuration section displays guardrail-specific settings. Depending on the guardrail type, these settings can include the threshold value, policy action, selected PII fields, and custom patterns. Threshold values determine when a violation is triggered; see Guardrail thresholds for additional information. Fields that are not configured display None.

Guardrails are attached to policies through the Linked Guardrails section when creating or editing a policy. Use the Policies using this guardrail metric to identify where the guardrail is currently enforced.