Available Components
OpenAI Moderation Node
Leverages OpenAI’s content moderation API to analyze and filter potentially harmful content
Simple Prompt Moderation Node
Customizable content filtering based on user-defined rules and denied phrases
- User-defined deny lists
- Optional LLM-based similarity detection
- Customizable error messages
- Flexible rule configuration
- Preventing prompt injection attempts
- Filtering specific keywords or phrases
- Implementing custom content policies
Benefits
-
Enhanced Safety
- Protect against harmful or inappropriate content
- Prevent misuse of AI systems
- Maintain ethical guidelines
-
Policy Compliance
- Ensure adherence to API provider policies
- Meet regulatory requirements
- Maintain consistent content standards
-
Customizable Control
- Define specific moderation rules
- Adapt to project requirements
- Balance safety with functionality
-
Seamless Integration
- Works within existing AI workflows
- Compatible with various language models
- Easy to implement and maintain
Implementation Guide
-
Choose Your Moderation Approach:
- Use OpenAI Moderation for comprehensive content analysis
- Use Simple Prompt Moderation for custom rule-based filtering
- Combine both for layered protection
-
Configure Parameters:
- Set up appropriate credentials
- Define custom error messages
- Specify denied phrases or rules
-
Integration Points:
- Add moderation checks before processing user input
- Implement content filtering before model responses
- Monitor and log moderation results
-
Best Practices:
- Regularly update moderation rules
- Monitor false positives/negatives
- Maintain clear documentation of policies
- Test moderation effectiveness regularly