IN THIS BREAKDOWN · 10 SECTIONS
You can read 17% of this breakdown.
The paper in one minute
Prompt injection happens when text an agent reads, an email, a web page, a resume, a database row, carries instructions the agent then follows. Most defenses try to make the model notice and refuse: classifiers that flag injections, training that teaches models to prefer the developer's instructions, prompts that remind the model of its task. Fourteen authors from ETH Zurich, Invariant Labs, IBM, Google, Microsoft, Swisscom and others argue that, with today's models, none of these can be relied on for general-purpose agents.
Their alternative is to give up generality on purpose. The guiding rule is that once any component has read untrusted input, it must be impossible for that input to trigger a consequential action, meaning an action with side effects on the system or its environment, and its output must not carry the injection onward. The paper describes six patterns that enforce this to different degrees, from an agent that can only choose among fixed actions to one that writes a program whose data flows can be checked.
The second half applies the patterns to ten case studies: an operating-system file assistant, a SQL analytics agent, an email and calendar assistant, a customer-service chatbot, a booking assistant, a product recommender, a resume screener, a medication-leaflet chatbot, a medical-diagnosis intermediary, and a software-engineering agent. For each it walks from a naive design to safer ones, stating what each step costs in utility and what attacks remain. There are no benchmark experiments; the paper is a design guide.
Research notes: the problem, approach and results
design patterns, each restricting what injected text can influence
worked case studies, from a file assistant and SQL agent to resume screening and coding agents
benchmark experiments: the claims are design arguments, tested in simulation on this page
General-purpose agents read untrusted text and hold powerful tools, and heuristic defenses such as filters, detectors and training cannot guarantee that injected instructions will be ignored.
Accept that the model can be fooled and design the system so it does not matter: once a component has read untrusted input, it must not be able to trigger a consequential action. Six patterns achieve this to different degrees.
Action selector, plan-then-execute, LLM map-reduce, dual LLM, code-then-execute and context minimization, each applied to ten case studies from an OS assistant to a medical chatbot, with the utility each one gives up.
Why it matters to an FDE
Most customer agents read something an outsider can write: tickets, emails, uploaded documents, supplier data, resumes. This paper gives you a vocabulary for the conversation every security review eventually reaches: what can a malicious document make this agent do?
Ask what the agent needs to be general about. Many business agents do one job. A customer-service bot that only ever picks among a dozen actions can use the action-selector pattern and be immune to injection by construction.
Process untrusted items one at a time. If the task is "check each invoice" or "score each resume", run an isolated model per item with an output that is a number, a category or a yes/no. A poisoned item can then only affect its own result.
Constrain the outputs, not just the inputs. Isolation fails the moment a free-text output from an untrusted step reaches a component with tools. Force schemas, enums and numbers at those boundaries.
Name the residual risk honestly. Every pattern leaves something: a malicious resume can still claim a high score for itself; a calendar injection can still rewrite the body of an email it is part of. Write it down for the customer.
Treat user confirmation as a backup, not the design. The paper notes that confirmations burden users and that attacks can be dressed up to look harmless.
Understand the mechanism. Try it on a real problem.
Unlock this breakdown and 99 more papers.
Premium opens every paper in full, plus every answer, concept, course and guide on the site. One payment for six months of access.
6 months · One payment · No auto-renewal
- ◇1 architecture diagram
- </>1 runnable code experiment
- ▦2 results tables
- ?5 interview questions with answers
- 03Key takeaways
The six patterns in detail, the best practices, case-study lessons, and the misreadings to avoid
Free account - 04How it works
Each pattern's information flow, the case-study method, and how patterns combine
Premium - 05The numbers that matter
There are no benchmark numbers; here is what the case studies establish instead
Premium - 06Try it yourself
Simulate the resume-screening case and watch isolation contain an injected resume
Premium - 07Where it breaks
The limits of design-only guidance and of the patterns themselves
Premium - 08Using it on a deployment
Running a design review of a customer agent against the six patterns
Premium - 09Interview angles
Five questions this paper prepares you for, with answer hints
Premium - 10Read next
Where to go from here on this site
Premium
