HomeCybersecurityPrompt Injection Defense

Prompt Injection Defense Simulator

Watch an LLM's context pipeline defend itself against prompt injection: untrusted external content streams through a suspicion classifier and a system-prompt priority shield, and tune injection rate, filter sensitivity, shield strength and sanitization to see attack success and false-block rates respond live.

Cybersecurity2DEasy60 FPS⇄ 3D version
prompt-injection-defense ↗ Open standalone

Large language model applications routinely mix trusted instructions with untrusted external content — retrieved documents, scraped web pages, tool responses — inside the same context window, and an attacker only needs to plant a convincing instruction inside that external content to try to hijack the model's behavior. This simulator visualizes the defense pipeline that stands between them: every external chunk first passes a suspicion classifier that can block it outright, and whatever gets through still has to out-weigh the system prompt's own priority to actually seize control of the output. Tune the injection rate, filter sensitivity, system-prompt priority and sanitization to see how attack success rate and false-block rate trade off against each other — a stricter filter blocks more attacks but also more legitimate content, while a stronger system-prompt priority makes injected instructions need an implausibly large weight advantage to break through.

⚙ Under the hood

Defend against hidden instructions embedded in untrusted content by adjusting classifier gate sensitivity and system-prompt priority.

securitydefensemodel protection

2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)