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.

The top 3

  1. Heuristics: First Line Against Obvious Prompt Injections: Rebuff's heuristic layer acts as a rapid, initial filter, employing rule-based matching, keyword lists, and regex patterns to detect common, unsophisticated prompt injection attempts before they reach the main LLM.
  2. Secondary LLM: AI-Powered Attack Classification: A dedicated secondary LLM in Rebuff analyzes incoming prompts, classifying them as potential prompt injections by evaluating explicit and paraphrased malicious intent, though it can struggle with context-dependent attacks.
  3. VectorDB: Adaptive Shield Learning from Attacks: Rebuff's VectorDB stores embeddings of prior prompt injection attacks, enabling it to recognize and prevent semantically similar new threats through vector similarity comparisons, a key component of its self-hardening capability.

Sources

Open the full topic