LLM Prompt Injection Detector
Rebuff is a self-hardening prompt injection detector designed to protect AI applications from prompt injection attacks through a multi-layered defense system. The project implements four layers of defense: heuristics to filter malicious input before it reaches an LLM, LLM-based detection using a dedicated model to analyze prompts, vector database storage of attack embeddings for recognizing similar future attacks, and canary tokens to detect prompt leakages. Rebuff is built with Python and JavaScript/TypeScript SDKs, and its server uses Next.js and React for the frontend, Tailwind for styling, Supabase for user management and relational database functionality, and either Pinecone or Chroma for vector database operations. The project also integrates with OpenAI's API for LLM-based detection capabilities.