Restrictions are the highest-priority guardrails — absolute limits on what your agent cannot do or say.Documentation Index
Fetch the complete documentation index at: https://docs.duckie.ai/llms.txt
Use this file to discover all available pages before exploring further.
What are Restrictions?
Restrictions define forbidden actions or topics. Unlike escalation rules (which hand off to humans), restrictions typically redirect the conversation or provide an alternative response. Examples:- Cannot promise refunds without approval
- Cannot discuss competitor products
- Cannot share internal pricing
- Cannot provide medical or legal advice
Restrictions vs Escalation
| Restrictions | Escalation Rules |
|---|---|
| Block and redirect | Hand off to human |
| Agent continues conversation | Agent stops |
| Prevents specific actions | Transfers responsibility |
| ”I can’t do X, but I can do Y" | "Let me connect you with someone” |
Creating Restrictions
Name the Restriction
Give it a clear name:
- Good: “No Refund Promises”, “No Competitor Discussion”
- Avoid: “Restriction 1”, “Don’t”
Detection Methods
Same as escalation rules:AI-Based
Describe the forbidden topic:Keyword
Trigger on specific terms:Regex
Match specific patterns:Configuring Restriction Response
When a restriction triggers, the agent should:- Acknowledge the request (don’t ignore it)
- Explain it can’t fulfill this specific request
- Redirect to an appropriate alternative
- Continue helping with other matters
Good Response Templates
No Refund Promises:Example Restrictions
No Unauthorized Discounts
| Setting | Value |
|---|---|
| Name | No Unauthorized Discounts |
| Detection | AI + Keyword |
| Keywords | discount, coupon, promo code, special price |
| Description | Cannot offer discounts or promotional pricing |
| Response | ”I don’t have the ability to offer special pricing, but our sales team might be able to help. Want me to connect you?” |
No Competitor Comparison
| Setting | Value |
|---|---|
| Name | No Competitor Discussion |
| Detection | Keyword + AI |
| Keywords | [list of competitor names] |
| Description | Cannot discuss or compare competitor products |
| Response | ”I’m focused on helping you succeed with our product. What specific need are you trying to address?” |
No Security Information
| Setting | Value |
|---|---|
| Name | No Security Details |
| Detection | AI |
| Description | Cannot share internal security architecture, vulnerabilities, or detailed implementation |
| Response | ”For security questions, please contact security@example.com or request our security documentation through your account manager.” |
No Data Deletion Promises
| Setting | Value |
|---|---|
| Name | No Data Deletion Promises |
| Detection | Keyword + AI |
| Keywords | delete my data, GDPR, right to be forgotten, data removal |
| Description | Cannot promise or perform data deletion without proper process |
| Response | ”Data deletion requests need to go through our privacy team to ensure we handle them properly. I can submit a request on your behalf — would you like me to do that?” |
Testing Restrictions
Use the built-in playground:- Open the restriction
- Enter messages that might trigger it
- Verify detection works correctly
- Test edge cases
- Direct requests (e.g., “Give me a refund”)
- Indirect requests (e.g., “I’m unhappy with my purchase”)
- False positives (e.g., “What’s your refund policy” should NOT trigger “No Refund Promises”)
Priority
Restrictions are the highest priority in the guardrail system:Assigning to Agents
Best Practices
- Be specific about what’s forbidden
- Provide helpful alternatives in responses
- Test for false positives — don’t over-restrict
- Review regularly — update as policies change
- Keep responses friendly — restrictions shouldn’t feel like rejections
Next Steps
Escalation Rules
Define when to hand off to humans
Guardrails Overview
Back to overview