Layer Effectiveness: Pre-LLM vs. Post-LLM Detection
Rebuff's heuristics, LLM-based detection, and vector similarity layers perform pre-response checks to filter malicious input before it reaches the LLM, while the canary token layer serves as a final post-response validation to detect successful information leakage.
The top 3
- Pre-LLM vs. Post-LLM: Targeting Different Attack Types: Pre-LLM defenses primarily filter direct malicious instructions, harmful keywords, and attempts to override system prompts by sanitizing input before it reaches the LLM. In contrast, post-LLM detection focuses on validating generated outputs to identify sensitive data leakage or manipulated behavior, often through semantic analysis.
- Security vs. Speed: Performance Costs of Detection Layers: Pre-LLM defenses, such as input sanitization and basic rule-based filtering, generally incur lower latency due to simpler checks. Conversely, post-LLM detection, which often involves more complex semantic analysis or additional LLM-based verification, can introduce greater latency, posing a challenge for real-time applications where ML checks affect the 'hot path' of execution.
- Detection Efficacy: Pre-LLM vs. Post-LLM Accuracy Trade-offs: Pre-LLM layers typically achieve high accuracy against known patterns and rule-based injections with minimal false positives, while post-LLM approaches, though more adaptable to novel attacks, may face higher false positive rates due to nuanced semantic interpretations.
Sources
Open the full topic