Dev.to
7/21/2026

The original title is: "Prompt Injection Isn't Fixed by a Filter. It's Fixed by Architecture"
Original: Prompt Injection Isn't Fixed by a Filter. It's Fixed by Architecture
Short summary
Prompt injection is a structural defect where trusted instructions and untrusted text share one token stream, and no filter can reliably separate them. The article presents architectural defenses—Simon Willison's Dual-LLM pattern, Google DeepMind's CaMeL, and the rule of two—that make malicious instructions irrelevant by design. A working FAQ-generator implementation demonstrates three isolated models running for $0.0035 per page.
- •Prompt injection is architectural, not a patchable bug—filters fail because attackers move second
- •Dual-LLM and CaMeL patterns isolate trusted from untrusted context so instructions can't cross boundaries
- •Working implementation uses three never-interacting models to safely process foreign pages at $0.0035/run
Generated with AI, which can make mistakes.
Is this a good recommendation for you?



