Define content moderation rules for your application
Policies are the foundation of White Circle’s platform — each one uses a set of rules to define what content should be flagged or allowed in your application.
Core Components
Each rule describes one type of content:
Flagged Rule
Describe the types of content that trigger a violation, including edge cases and intent.
Allowed Rule
Describe content that must remain allowed, including borderline cases that may resemble violations.
Every rule contains either flagged content or allowed content. A Policy can contain multiple rules, but at least one must be a flagged rule.
Example policy: System prompt leakage prevention
If you want to prevent system prompt leakage from your AI assistant:
- Flagged rule: “Requests that ask for the system prompt, attempts to extract internal instructions, jailbreak attempts to reveal hidden prompts”
- Allowed rule: “General discussions about the bot’s architecture, questions about what a system prompt is in principle, educational content about AI systems”
Writing Policy Rules
Write each rule in plain, human language. You don’t need special syntax or technical formatting.
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 rules, Policies have several optional properties you can configure:
Name
The name displayed on the platform and returned by the API. Choose something descriptive like “No Medical Advice” or “NSFW Filter”.
Environments
Determines which Environments the Policy belongs to. A single Policy can be assigned to multiple Environments.
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
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
Event types:
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
Shadow Mode
Shadow mode lets you test a Policy before enforcing it in production.
Next Steps
Create Policies programmatically from your backend.
Retrieve active Policies and their Environment assignments.
Create and manage Policies in the White Circle dashboard.
Learn how Metrics provide product analytics for AI applications.
Separate sessions across deployment Environments.