Example
“The customer’s inquiry email is hong@company.com and the card number is 1234-5678-9012-3456”
What is a Guardrail?
A guardrail combines rule-based detection and LLM-based judgment to ensure conversation safety.
Guardrails ensure AI conversation safety by combining rule-based detection and LLM judgment
Key Features
Use Cases
- PII protection: Prevent customer emails, phone numbers, and credit card info from being exposed to the AI
- Security hardening: Detect sensitive credentials like API keys, passwords, auth tokens
- Content filtering: Block inappropriate expressions or prohibited topics
- Compliance: Industry-specific regulations like GDPR, PIPA
Guardrail List
In Workspace > Guardrails, view all guardrails.
View created guardrails in Workspace > Guardrails
Creating a Guardrail
Enter basic info

Enter name and description, and set access permissions
Pick PII detection types
Set the processing strategy
Set application scope
Add custom patterns (optional)
Register blocked words (optional)
Test the guardrail (optional)
Save
Guardrail Execution Flow
When connected to an agent, the guardrail runs automatically in this order during a conversation.Internal Behaviors Worth Knowing
LLM Judge's safety-first principle
LLM Judge's safety-first principle
How output guardrails work
How output guardrails work
What happens with multiple guardrails?
What happens with multiple guardrails?
Are tool execution results scanned?
Are tool execution results scanned?
LLM-based Detection
The AI judges complex patterns difficult to detect with rules. Using LLM-as-a-Judge, a separate LLM model judges message appropriateness.Settings
Example Prompt
Testing Guardrails
You can test directly with text in the guardrail settings screen.
Enter test text to immediately see detection results and processed text
- Enter test text
- Click the Test button
- Review results: detected items, processed text, blocked or not
Applying Guardrails
Guardrails can be directly connected via two paths — the agent level and group level — and together with the admin-configured global guardrails, all applied guardrails are merged and run sequentially.Connect to an Agent
Open the agent edit screen
Pick guardrails
Save
Connect to a Group
Application Priority
When a user chats, guardrails from these 3 paths are all merged and applied:File Upload Guardrails
A separate security check on uploaded files. Independent from chat guardrails — automatically runs 4 stages of checks when a file is uploaded. Configure in the Admin Panel > Settings > Guardrails tab.Document Classification
The LLM analyzes document content and auto-classifies sensitivity. Default categories:Monitoring Integration
Auto-recorded in Tracing
When a guardrail detects sensitive info, the event is auto-recorded in the message trace.Guardrail Logs
In Admin Panel > Monitoring > Guardrail Logs, view all detection events as a dedicated log.Best Practices
- Phased rollout
- Per-role guardrails
- Periodic review
- Start with Log to gauge detection frequency
- Identify and adjust false-positive patterns
- Switch to Redact strategy
- After stabilizing, apply Block to required items
Troubleshooting
Many false positives
Many false positives
- Narrow the regex scope of custom patterns
- Refine the banned-words list (case-insensitive exact match)
- Add allow-case examples to the LLM Judge
- Identify false-positive patterns in guardrail logs and adjust rules
Detection misses
Detection misses
- Add missing PII types
- Register a new regex as a custom pattern
- Enable LLM Judge and add block examples
- Specify semantic patterns hard to catch with rules in the LLM Judge prompt
Slow responses
Slow responses
- Disable LLM Judge and use rule-based only (rule-based has near-zero latency)
- Disable output validation (input only)
- Choose a faster model as the Judge model
Cannot delete a guardrail
Cannot delete a guardrail
