Documentation Index
Fetch the complete documentation index at: https://docs.upsonic.ai/llms.txt
Use this file to discover all available pages before exploring further.
What is Safety Engine?
The Safety Engine is a powerful content filtering and policy enforcement system that helps you maintain safe, appropriate, and compliant AI interactions. Just like humans need guidelines and rules to ensure appropriate behavior, AI agents need safety policies to filter content, block inappropriate material, and protect sensitive information. The key benefits of the Safety Engine are:- Content Filtering: Automatically detect and block inappropriate content like adult material, hate speech, or sensitive topics
- Privacy Protection: Anonymize or redact sensitive information like phone numbers, emails, or personal data
- Compliance: Ensure your AI applications meet regulatory requirements and platform policies
- Customizable: Create your own policies or use pre-built ones for common use cases
- Dual Protection: Apply policies to both user input (user_policy) and agent output (agent_policy)
Quick Example: Banking Assistant with Safety Engine
Here’s a simple example of a banking assistant that blocks cryptocurrency content:Using Safety Policies
The Safety Engine offers flexibility in how you protect your AI applications. You can use pre-built policies for common use cases or create your own custom policies tailored to your specific needs. Pre-built Policies: Ready-to-use policies for common scenarios like blocking crypto content, anonymizing phone numbers, or filtering adult content. Custom Policies: Build your own policies with custom rules and actions to match your specific compliance requirements. Both approaches work the same way - simply pass them to your Agent’suser_policy or agent_policy parameters.
Need more advanced features?
The Safety Engine supports many powerful configuration options to meet your compliance and security needs:- Custom Policy Creation: Build your own policies with custom rules and actions tailored to your specific compliance requirements.
- Multiple Policy Types: Combine blocking, anonymization, and exception policies for comprehensive regulatory compliance.
- LLM-Enhanced Detection: Use AI-powered content detection for better accuracy in identifying risks and compliance violations.
- Privacy Protection: Automatically anonymize sensitive information like SSNs, account numbers, and personal data.
- Dual Protection: Apply different policies to user input (user_policy) and agent responses (agent_policy) for complete coverage.
- Multi-Language Support: Automatic language detection and localized responses for global applications.
- Audit Trail: Monitor policy triggers, confidence scores, and compliance actions for regulatory reporting and risk management.

