Overview
The ABC Bot is an employee assistance chatbot that:- Answers questions about company policies and employee handbook
- Implements input validation and output moderation
- Enforces topical boundaries to stay on topic
- Refuses to respond to inappropriate or off-topic queries
Complete Configuration
1
Define general instructions and sample conversation
2
Create topical rails to refuse off-topic requests
Define what topics the bot should refuse to discuss.
3
Add knowledge base
Create a knowledge base with your company documentation:
kb/employee-handbook.md
Usage Examples
Conversation Examples
1
Normal conversation
2
Off-topic rejection
3
Harmful content rejection
Guardrails Active in This Example
- Input Validation - Uses
self check inputto validate user messages before processing - Output Moderation - Uses
self check outputto ensure bot responses are appropriate - Topical Rails - Dialog flows that prevent discussing off-topic or harmful subjects
- Knowledge Base Integration - Retrieves information from company documentation
Colang 2.x Version
For the modern Colang 2.x syntax:Testing
Run the chatbot using the CLI:- “Hi!” - Should greet appropriately
- “What are the company benefits?” - Should provide information
- “How do I cook rice?” - Should refuse politely
- “Teach me bad words” - Should refuse firmly
Related Examples
- Custom Guardrails - Advanced rail implementations
- Customer Support - Production-ready support bot
- Basic RAG - Adding retrieval capabilities