Rules for implementing content moderation when using DeepSeek models in user-facing applications, covering input screening, output filtering, and escalation.
## DeepSeek Content Moderation Rules ### Input Screening Before sending user input to DeepSeek: 1. Check against a blocklist of prohibited terms and phrases 2. Detect prompt injection patterns: - Attempts to override system instructions - Requests to reveal system prompts - Instructions to ignore safety guidelines 3. Classify content risk level: safe, needs_review, blocked 4. Log all blocked inputs for pattern analysis ### Output Filtering After receiving DeepSeek responses: 1. Scan for PII patterns (regex-based): - Email addresses, phone numbers, SSN/ID numbers - Physical addresses, credit card numbers 2. Check for harmful content categories: - Violence or self-harm instructions - Illegal activity guidance - Hate speech or discriminatory content 3. Verify output format matches expected schema 4. Truncate unexpectedly long responses ### Escalation Protocol - Auto-block: Known harmful patterns -> immediate block + log - Review queue: Ambiguous content -> flag for human review within 24h - Pass-through: Clean content -> deliver to user - False positive feedback: Allow reviewers to mark false positives to improve filters ### User Communication - Never show raw error messages from the API - Provide helpful alternative suggestions when content is blocked - Include a feedback mechanism for users to report issues - Maintain transparency about AI content moderation ### Compliance - Maintain audit logs of all moderation decisions - Review and update blocklists monthly - Train moderation classifiers on domain-specific data - Document moderation policies and make them accessible to users - Comply with platform-specific content policies (App Store, Google Play, etc.)
Workflows from the Neura Market marketplace related to this DeepSeek resource