Simple Prompt Moderation
Overview
The Simple Prompt Moderation feature in AnswerAI allows you to implement a basic content filter for user inputs before they are processed by the language model. This feature helps maintain content safety and prevents potentially harmful or unwanted content from being processed.
Key Benefits
- Enhances content safety by filtering out unwanted or sensitive input
- Customizable deny list to suit your specific moderation needs
- Optional use of a language model for more advanced similarity detection
How to Use
- Add the Simple Prompt Moderation node to your AnswerAI workflow canvas.
-
Configure the node with the following settings:
a. Deny List: Enter the phrases or words you want to block, one per line. b. Chat Model (optional): Select a language model to use for similarity detection. c. Error Message (optional): Customize the error message displayed when moderation fails.
- Connect the Simple Prompt Moderation node between your input source and the language model in your workflow.
- Run your workflow. The Simple Prompt Moderation node will check user inputs against the deny list before allowing them to proceed to the language model.
Tips and Best Practices
- Start with a basic deny list and refine it over time based on your specific use case and user behavior.
- Use clear and specific phrases in your deny list to avoid false positives.
- If you're using the optional Chat Model for similarity detection, choose a model that balances accuracy and performance for your needs.
- Regularly review and update your deny list to ensure it remains effective and relevant.
- Consider using more advanced moderation techniques in combination with this simple approach for comprehensive content filtering.
Troubleshooting
-
Issue: Legitimate inputs are being blocked Solution: Review your deny list and remove or modify overly broad or common phrases that might cause false positives.
-
Issue: Unwanted content is still getting through Solution: Add more specific phrases to your deny list or consider using the optional Chat Model for more advanced detection.
-
Issue: Moderation is slowing down the workflow Solution: If you're using the Chat Model option, try a smaller or faster model. Alternatively, simplify your deny list to focus on the most critical terms.
-
Issue: Error message is not displaying correctly Solution: Check the "Error Message" field in the node configuration and ensure it contains the desired text.
Remember, while the Simple Prompt Moderation feature provides a good starting point for content filtering, it's important to continuously monitor and adjust your moderation strategy to ensure the best balance between safety and usability in your AnswerAI workflows.