Core Components
Every Policy consists of two main components:Flagged Content
Describe the types of content that trigger a violation, including edge cases and intent.
Allowed Content
Describe content that must remain allowed, including borderline cases that may resemble violations.
Example policy: System prompt leakage prevention
Example policy: System prompt leakage prevention
If you want to prevent system prompt leakage from your AI assistant:
- Flagged content: “Requests that ask for the system prompt, attempts to extract internal instructions, jailbreak attempts to reveal hidden prompts”
- Allowed content: “General discussions about the bot’s architecture, questions about what a system prompt is in principle, educational content about AI systems”
Writing Policy Rules
In most cases, you can simply write your flagged and allowed content descriptions in plain, human language. No special syntax or technical formatting required.Improving Your Policy
After writing your initial descriptions, click the Improve button to upgrade your Policy to a production-ready version. During the improvement process:- We’ll show you around 10 sample sessions
- You’ll label each one — marking whether it violates your Policy or not
- We use your labels to calibrate and adapt the Policy to match the behavior you expect
Policy Settings
Beyond the core flagged/allowed content, Policies have several optional properties you can configure:Name
Name
The name displayed on the platform and returned by the API. Choose something descriptive like “No Medical Advice” or “NSFW Filter”.
Environments
Environments
Determines which Environments the Policy belongs to. A single Policy can be assigned to multiple Environments.
Conditions
Conditions
Conditions decide when this Policy is a candidate by matching each Event’s metadata. Attach the Policy to one or more Conditions for every Environment where it should run.See Conditions for metadata expressions and attachment behavior.
What to Check
What to Check
Choose the source of the content, then the Event types this Policy evaluates.Source:
- Any — check both user and assistant content
- User — check user-created content
- Assistant — check assistant-created content
Each Event is checked on its own, so a Policy runs only against the types and fields you select here. Events that don’t match any selected Policy type or field aren’t checked.
Severity Level
Severity Level
Set how strongly each Policy violation contributes to the strike system:
- Critical — critical strike impact
- High — high strike impact
- Medium — moderate strike impact
- Low — lowest strike impact
Severity level is used by the strike system to calculate points and effective user actions.
Shadow Mode
Shadow Mode
Shadow mode lets you test a Policy before enforcing it in production.
When shadow mode is enabled:
- In the dashboard, you’ll see all detected violations as usual
- In the API, we will not flag those requests as violations
Next Steps
Create Policy API
Create Policies programmatically from your backend.
List Policies API
Retrieve active Policies and their Environment assignments.
Create a Policy
Create and manage Policies in the White Circle dashboard.
Metrics
Learn how Metrics provide product analytics for AI applications.
Set up Environments
Separate sessions across deployment Environments.
