Rebuff.ai is a multi-layered defense system designed to protect AI applications from prompt injection (PI) attacks. It offers four layers of defense: heuristics, LLM-based detection, Vectordb, and Canary tokens. The system can detect PI on user input and canary word leakage in completion using an AI model such as OpenAI's GPT-3.