Documentation Index
Fetch the complete documentation index at: https://www.cometchat.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Rules Management allows you to define and manage moderation rules that automatically detect and handle inappropriate content. Configure rules once in the Dashboard, and they’re automatically applied to all messages sent through CometChat.Quick Start
Enable moderation in under 2 minutes:Open Rules Settings

Available Rules Summary
- Text Rules
- Image Rules
- Video Rules
- Audio Rules
- File Rules
- OpenAI Rules
| Rule | Description | Use Case |
|---|---|---|
| Profanity Filter | Blocks offensive language using keyword matching | General chat apps |
| Contact Details Filter | Blocks phone numbers | Marketplaces, dating apps |
| Email Filter | Blocks email addresses | Prevent off-platform contact |
| AI Toxicity Detection | AI-powered detection of toxic language | Community platforms |
| AI Spam Detection | Detects spam messages | High-traffic apps |
| AI Scam Detection | Identifies fraudulent messages | Marketplaces, finance apps |
| AI Platform Circumvention | Detects attempts to bypass rules | All apps |
Recommended Rules by Use Case
Social/Community App
Social/Community App
Marketplace/Classifieds
Marketplace/Classifieds
- Contact Details Filter
- Email Filter
- AI Scam Detection
- AI Platform Circumvention
- Profanity Filter
- AI Image Moderation
Dating App
Dating App
- Contact Details Filter
- Email Filter
- AI Image Moderation
- OpenAI Explicit Content
- AI Scam Detection
- OpenAI Privacy Data (Image)
Gaming/Entertainment
Gaming/Entertainment
- Profanity Filter
- AI Toxicity Detection
- AI Spam Detection
- OpenAI Hate & Harassment
- AI Image Moderation
Healthcare/Finance
Healthcare/Finance
- OpenAI Privacy & Sensitive Info
- OpenAI Privacy Data (Image)
- AI Scam Detection
- Malware & Virus Scanner
- Profanity Filter
- Contact Details Filter
Enterprise/Compliance
Enterprise/Compliance
- Malware & Virus Scanner
- OpenAI Privacy & Sensitive Info
- AI Scam Detection
- Profanity Filter
- AI Image Moderation
Best Practices
| Practice | Description |
|---|---|
| Start with Defaults | Enable default rules first, then customize based on your needs. Don’t try to configure everything at once. |
| Test Before Launch | Test rules in a staging environment. Send test messages to verify rules work as expected. |
| Monitor Regularly | Check the Blocked Messages dashboard regularly to catch false positives. |
| Iterate & Refine | Review Rule Revisions to track changes and refine rules over time. |
Tips for Effective Moderation
- Layer your rules - Use multiple rules together (e.g., Profanity Filter + AI Toxicity) for better coverage
- Adjust confidence levels - Lower confidence = more aggressive blocking, higher = fewer false positives
- Use Flag action for borderline content - Instead of blocking, flag messages for manual review
- Create custom keyword lists - Add industry-specific terms to the Lists Management
Default Rules
Default rules are pre-configured and ready to use. Simply toggle them on in the Dashboard.- Text Moderation
- Image Moderation
- Video Moderation
- Audio Moderation
- File Moderation
Profanity Filter
Profanity Filter

Contact Details Filter
Contact Details Filter

Email Filter
Email Filter

AI Message Toxicity
AI Message Toxicity

AI Platform Circumvention
AI Platform Circumvention

AI Scam Detection
AI Scam Detection

AI Spam Detection
AI Spam Detection

- OpenAI Text Rules
OpenAI: Hate and Harassment (All Languages)
OpenAI: Hate and Harassment (All Languages)

OpenAI: Privacy and Sensitive Info (All Languages)
OpenAI: Privacy and Sensitive Info (All Languages)

OpenAI: Explicit or Inappropriate Content (All Languages)
OpenAI: Explicit or Inappropriate Content (All Languages)

OpenAI: Spam and Scam (All Languages)
OpenAI: Spam and Scam (All Languages)

OpenAI: Violent or Terroristic Threats (All Languages)
OpenAI: Violent or Terroristic Threats (All Languages)

OpenAI: Non-Consensual Sexual Content (All Languages)
OpenAI: Non-Consensual Sexual Content (All Languages)

OpenAI: Impersonation or Fraud (All Languages)
OpenAI: Impersonation or Fraud (All Languages)

OpenAI: Self-Harm or Suicidal Content (All Languages)
OpenAI: Self-Harm or Suicidal Content (All Languages)

Rule Configuration
Filters
Filters narrow down which messages are checked by a rule based on sender or receiver attributes:| Filter Type | Properties |
|---|---|
| Sender | UID, Role, Name, Tags, Created date |
| Receiver | Name, GUID, Tags, Group type, Created date, Type (user/group) |
Conditions
Conditions define what content triggers the rule:| Content Type | Available Conditions |
|---|---|
| Text/Custom | Keyword list, Word patterns, Toxicity, Sentiment, Sentence similarity |
| Image/Video | Violence, Gambling, Alcohol, Drugs, Nudity, Hate symbols, Unsafe content |
Actions
Actions determine what happens when content matches the conditions:| Action | Description |
|---|---|
| Block | Message is not delivered (default) |
| Flag | Message is delivered but flagged for review |
| Ban User | User is banned from the group |
| Kick User | User is removed from the group |
| Block User | User is blocked platform-wide |
Managing Rules
Create Rule

- Click Add in the Rules tab
- Configure:
- Name: Descriptive name for the rule
- Rule ID: Unique identifier
- Description: Purpose of the rule
- Filter: Who the rule applies to
- Condition: What triggers the rule
- Action: What happens when triggered
- Click Save
- Enable the rule to start moderating
.*, .+, or unbounded quantifiers (\d+, \w+). Use bounded patterns instead (e.g., \d{3,10} instead of \d+) to prevent performance issues. See Lists Management for more details.List Rules
All configured rules are displayed in the Rules tab with their name, status, and actions.
Update Rule
- Click Edit in the action menu
- Modify the rule settings
- Click Save

Delete Rule
Click Delete in the action menu and confirm.
Rule Revisions
Track the history of changes made to a rule:- Click View in the action menu
- Navigate to Rule History











- Profanity Filter
- AI Toxicity Detection
- AI Image Moderation
- OpenAI Hate & Harassment
Recommended: