Rebuff's Four Layers for Robust Prompt Security
Rebuff integrates four distinct defense layers: heuristic detection, LLM-based classification, vector similarity search, and canary token leakage detection, offering a comprehensive open-source approach to prompt injection defense.
The top 3
- Rebuff's Canary Tokens: Unique Post-LLM Defense: Rebuff's fourth layer employs canary tokens—unique, secret strings injected into the prompt. If these tokens appear in the LLM's response, it signals a successful injection causing context leakage or prompt extraction, acting as a crucial post-response tripwire.
- Pre-LLM Protection: Heuristics, LLM, VectorDB Roles: Rebuff's initial three layers provide pre-response protection: Heuristics use rule-based matching for known patterns; an LLM-based classifier analyzes input for injection attempts; and Vector Similarity compares prompt embeddings against a database of past attacks.
- VectorDB: Rebuff's Self-Hardening Attack Learner: The Vector Similarity layer is central to Rebuff's 'self-hardening' capability, storing embeddings of previously detected attacks. This allows it to identify and prevent future prompt injection attempts that are semantically similar, even if their wording differs.
Sources
Open the full topic