Overview
Rule Groups are containers that organize multiple moderation rules for specific contexts within your application. They enable you to apply different moderation strategies to different types of content, ensuring appropriate and contextual moderation across your platform.Why Rule Groups?
Different areas of your application require different moderation approaches:Profile Images
May require stricter rules for inappropriate content, ensuring professional appearance
Forum Posts
May focus on hate speech, spam, and maintaining constructive discussions
Product Reviews
May emphasize authenticity, preventing fake reviews and promotional content
Private Messages
May have more lenient rules while still preventing harassment
Creating Rule Groups
Basic Setup
- Navigate to your site in the dashboard
- Click on “Rule Groups”
- Create your first rule group
- Give it a descriptive name (e.g., “Profile Images”, “Forum Posts”)
- Optionally set it as the default group
Rule Group Properties
Property | Description | Example |
---|---|---|
Name | Descriptive identifier | ”User Profile Images” |
Description | Purpose and context | ”Moderation rules for user avatar uploads” |
Is Default | Auto-applies to content without specified group | true / false |
Site ID | Associated site | Automatically set |
Working with Rules
Adding Rules to Groups
Each rule group can contain multiple rules that work together:Rule Templates
Pixel Patrol provides pre-configured rule templates that you can use or customize:NSFW Content Detection
NSFW Content Detection
Detects inappropriate or adult content in images
- Default confidence threshold: 0.85
- Evaluation type: Restriction
Violence Detection
Violence Detection
Identifies violent or disturbing imagery
- Default confidence threshold: 0.80
- Evaluation type: Restriction
Text Profanity Filter
Text Profanity Filter
Scans text for inappropriate language
- Default confidence threshold: 0.75
- Evaluation type: Restriction
Spam Detection
Spam Detection
Identifies potential spam content
- Default confidence threshold: 0.70
- Evaluation type: Restriction
Gender-Based Rules
Gender-Based Rules
Apply rules based on user’s stated gender
- Requires gender parameter in metadata
- Evaluation type: Conditional
Advanced Parameters
Some rule templates support advanced parameters that must be provided during media submission:Gender-Based Moderation Example
Rule configuration with advanced parameters:Using Rule Groups in API Calls
Specifying a Rule Group
When submitting content for moderation, specify which rule group to use:Default Rule Group
If no rule group is specified, the default rule group for the site will be used:Best Practices
Organization Strategies
-
Context-Based Groups: Create groups based on where content appears
- User Profiles
- Public Posts
- Private Messages
- Comments
-
Risk-Based Groups: Organize by risk level
- High Risk (public facing)
- Medium Risk (authenticated users)
- Low Risk (trusted users)
-
Media Type Groups: Separate by content type
- Images
- Videos
- Text Content
Configuration Tips
- Profile Images
- Forum Posts
- Product Reviews
Performance Considerations
- Rule Order: Rules are evaluated in parallel for performance
- Caching: Rule group configurations are cached for fast access
- Limits: Consider your plan’s moderation limits when designing rule groups
Management Features
Copying Rule Groups
Quickly duplicate successful configurations:- Click the copy button on any rule group
- Modify the name and rules as needed
- Save the new group
Updating Rules
Rules can be updated without affecting ongoing moderations:- Changes apply to new submissions only
- Historical moderation results remain unchanged
- Test changes with sample content first
Deleting Groups
You cannot delete the last rule group for a site. Ensure at least one group remains active.
Integration Examples
E-commerce Platform
Social Media Application
Monitoring & Analytics
Track rule group performance:- Approval rates per rule group
- Most triggered rules within each group
- Processing time by group complexity
- False positive rates for tuning
Related Topics
- Rules - Individual rule configuration
- Moderation - How moderation decisions are made
- Sites - Site-level configuration
- API Integration - Using rule groups in API calls