Skip to main content
Custom Rules API is currently in development. The features described below are planned for future releases. Currently available: Policy Presets (see below).

What’s Available Now

Policy Presets βœ…

PromptGuard provides six use-case-specific security presets that work out of the box: Default (Recommended)
  • Balanced security for general AI applications
  • Moderate detection across all threat types
  • Standard PII redaction
  • Good balance between protection and usability
Support Bot
  • Optimized for customer support chatbots
  • Strict PII and exfiltration protection
  • Custom patterns for password/account queries
Code Assistant
  • Enhanced protection for coding tools
  • Strict injection and exfiltration detection
  • API key and secret detection patterns
RAG System
  • Maximum security for document-based AI
  • Strict protection across all threat types
  • Enhanced data leak prevention
Data Analysis
  • Strict PII protection for data processing
  • Enhanced SSN/DOB detection
  • Comprehensive data protection
Creative Writing
  • Nuanced content filtering for creative apps
  • ML-based toxicity detection enabled
  • Higher thresholds for creative content
See Policy Presets for detailed information about each preset.

Setting a Policy Preset

Configure via dashboard:
# In your PromptGuard dashboard
Projects β†’ [Your Project] β†’ Overview β†’ Select preset from dropdown
Or via API:
# Update project preset (dashboard API - requires session auth)
curl -X PUT https://api.promptguard.co/dashboard/presets/projects/{project_id}/preset \
  -H "Cookie: session=YOUR_SESSION_COOKIE" \
  -H "Content-Type: application/json" \
  -d '{
    "preset_name": "default"
  }'

Detection Capabilities

Built-in Detection (All Presets)

Prompt Injection Detection:
  • Regex-based pattern matching (Free tier: 70-80% accuracy)
  • AI-powered detection (Starter/Growth: ~95% accuracy using ProtectAI model)
  • Common jailbreak attempts
  • Instruction override patterns
PII Redaction:
  • Email addresses
  • Phone numbers
  • Social Security Numbers
  • Credit card numbers
  • IP addresses
Content Policies:
  • Toxicity detection
  • Profanity filtering
  • Sensitive data leakage prevention

What’s Coming Soon 🚧

The following features are planned but not yet available:

Custom Pattern Rules (In Development)

Define your own regex patterns for industry-specific threats:
// PLANNED - Not yet available
{
  "name": "API Key Detection",
  "type": "pattern_match",
  "pattern": "sk-[a-zA-Z0-9]{48}",
  "action": "block"
}

Whitelist Rules (Roadmap)

Allow specific patterns that might otherwise be blocked:
// PLANNED - Not yet available
{
  "name": "Allow Internal IPs",
  "type": "whitelist",
  "pattern": "10\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}",
  "scope": "pii_detection"
}

Custom Thresholds (Roadmap)

Fine-tune detection sensitivity per rule type.

Rule Management API (Roadmap)

Programmatic rule creation and management via API.

Current Workarounds

Need Custom Patterns Now?

Option 1: Contact Support Email [email protected] with your specific requirements. We can configure custom patterns for Enterprise customers. Option 2: Preprocessing Apply custom filters in your application before sending to PromptGuard:
# Your app code
def preprocess_prompt(prompt):
    # Your custom validation
    if contains_sensitive_pattern(prompt):
        raise ValueError("Blocked by custom rule")
    return prompt

# Then send to PromptGuard
response = openai_client.chat.completions.create(
    model="gpt-4o",
    messages=[{"role": "user", "content": preprocess_prompt(user_input)}]
)

Feature Comparison by Tier

FeatureFreeStarterGrowth
Policy Presetsβœ… Defaultβœ… All Presetsβœ… All Presets
Regex Detectionβœ… 70-80%βœ… 70-80%βœ… 70-80%
ML DetectionβŒβœ… ~95%βœ… ~95%
PII Redactionβœ… Basicβœ… Basicβœ… Basic
Custom Patterns🚧 Roadmap🚧 Roadmap🚧 Roadmap
Advanced AnalyticsβŒβŒβœ…

Need Help?


This page will be updated as custom rules features become available. For updates, contact [email protected] or check our blog.