Prompt injection is the number one security risk for AI applications.
Large language models can't reliably tell the difference between instructions from their developer and text from a user. Both arrive as words in the same context window. So a user who writes the right words can override the rules, leak hidden instructions or pull out data the model was never meant to share.
Each level here adds a defence that real teams use. Each one helps, and each one can be bypassed. That's the lesson: controls inside the prompt are not a security boundary.
Instruction override"Ignore your previous instructions…"
Role-play and storiesWrapping the request in fiction.
ObfuscationSpelling, reversing or encoding the output.
Semantic leaksDescribing the secret without saying it.
Defence in depthInput filters, output filters and AI judges.
Privilege separationThe only fix that actually holds.
How this works. The Gatekeeper is a simulation. It isn't a live AI model. It follows deterministic rules that imitate how real language models and their guardrails behave, so it's free, private and safe to run on a static website. Real models are less predictable, but the same techniques work against them, and the same defences fail for the same reasons.