You are building an agent that reads a user’s email and calendar and can send messages and book meetings. Model-level prompt-injection defences are probabilistic. Design a defence that still holds if the model is fooled, and say how you would measure it.
Answer
Model answer, written in a candidate's voice
In short
- Name the threat precisely: indirect injection via email bodies, invites and attachments, dangerous because of the lethal trifecta of private data, untrusted content and an outbound channel
- Architectural separation: a privileged planner sees only the trusted user request and fixes the control flow; a quarantined model parses untrusted content and returns values that cannot change the plan (dual-LLM / CaMeL-style)
- Capability or taint tracking on data so policies decide at tool-call time whether a value derived from untrusted content may reach a recipient or external URL
- Deterministic guards outside the model: recipient allow-lists, approval for new recipients or irreversible actions, rate and volume limits, no rendering of remote images or links that could exfiltrate
- Measure attack success rate and benign task completion on an agent-injection benchmark (e.g. AgentDojo) plus in-house red-team cases, and report the utility cost of the defence (CaMeL solved 77% of AgentDojo tasks with provable security versus 84% undefended)
In full
The core point is that the model should never be the enforcement point: I would treat every email body, invite and attachment as untrusted input, because the real danger is indirect injection turning a private-data-plus-outbound-channel agent into an exfiltration or action channel. Architecturally, a privileged planner sees only the trusted user request and fixes the control flow, while a quarantined model parses untrusted content and returns only data values that cannot alter the plan, in the dual-LLM / CaMeL style. On top of that, I would track taint or capabilities on every value so that at tool-call time a policy decides whether something derived from untrusted content may reach a recipient or external URL, and I would put deterministic guards outside the model: recipient allow-lists, approval for new recipients or irreversible actions, rate and volume limits, and no rendering of remote images or links that could exfiltrate. I would measure this with attack success rate and benign task completion on an agent-injection benchmark such as AgentDojo, plus in-house red-team cases, and report the utility cost honestly rather than only the security gain. The reported trade-off is roughly that CaMeL solved 77% of AgentDojo tasks with provable security versus 84% undefended, so the defence buys strong guarantees at a modest utility cost, and I would want to see that gap shrink with better planners and policies rather than hide it.
What a strong answer covers
- Names the threat precisely: indirect injection through email bodies, invites and attachments, made dangerous by the lethal trifecta of private data, untrusted content and an outbound channel
- Architectural separation: a privileged planner sees only the trusted user request and fixes the control flow; a quarantined model parses untrusted content and returns values that cannot change the plan (dual-LLM / CaMeL-style)
- Capability or taint tracking on data so policies decide at tool-call time whether a value derived from untrusted content may reach a recipient or external URL
- Deterministic guards outside the model: recipient allow-lists, approval for new recipients or irreversible actions, rate and volume limits, no rendering of remote images or links that could exfiltrate
- Measures attack success rate and benign task completion on an agent-injection benchmark (e.g. AgentDojo) plus in-house red-team cases, and reports the utility cost of the defence (CaMeL solved 77% of AgentDojo tasks with provable security versus 84% undefended)
Common mistakes
- Relying on a system-prompt instruction or an injection classifier as the only defence
- Ignoring exfiltration channels such as markdown images, links or calendar invites to attacker addresses
Follow-ups
- Which user tasks become impossible under strict control-flow separation, and how would you handle them?
- How would your design change if attackers used an agent framework to probe it thousands of times a day?