A Template-Mediator Schema to Take Prompt Injection Off the Table

no_awkward_Intention · reddit · 2026-10-19

A Redditor proposes an architecture aimed at removing prompt injection as a attack surface, with the key invariant: untrusted text has no path to an agent with side effects except through a typed, validated form — analogous to parameterized SQL queries. A non-LLM mediator matches input to developer-published templates; matches return a form whose validated fields go to an action agent; unmatched input goes to a read-only agent whose output never reaches the action path. Includes a formal security property and diagram, drawing on the 2025 'Design Patterns for Securing LLM Agents' Action-Selector and Dual LLM patterns.

Original post →

More from coding & agent

coding & agent channel →