Jailbreak Protection
Semantic Router includes advanced jailbreak detection to identify and block adversarial prompts that attempt to bypass AI safety measures. Two complementary detection methods are available:
- BERT Classifier — fast, high-precision detection of single-turn jailbreak attempts using a fine-tuned BERT model
- Contrastive Embedding — embedding-based detection designed to catch multi-turn escalation ("boiling frog") attacks where individual messages appear benign but the conversation gradually steers the model toward unsafe behavior
Both methods live inside the same signals.jailbreak signal type and can be combined in decision rules using OR/AND logic.
Overview
The jailbreak protection system:
- Detects adversarial prompts and jailbreak attempts
- Blocks malicious requests before they reach LLMs
- Identifies prompt injection and manipulation techniques
- Detects multi-turn escalation via contrastive embedding across full conversation history
- Provides detailed reasoning for security decisions
- Integrates with signal-driven decisions for enhanced security
Jailbreak Detection Types
The system can identify various attack patterns:
Direct Jailbreaks
- Role-playing attacks ("You are now DAN...")
- Instruction overrides ("Ignore all previous instructions...")
- Safety bypass attempts ("Pretend you have no safety guidelines...")