Part 9 of 13 · 2 min read
Answering prompt-injection questions in an interview
What is indirect prompt injection and why is it worse for agents?
"Instructions hidden in content the agent reads, such as a web page, email or tool result, so the attacker never talks to the agent. Agents read outside content and then call tools, so a successful injection becomes an action. The model cannot reliably separate instructions from data in a single text channel." Follow-up: "Can you fix it with delimiters or a better prompt?" They reduce the rate but do not give a guarantee, so I do not rely on them for anything that matters.
Why not just filter the input?
"A filter matches patterns; the attack needs only meaning. In the example's test a regex caught 88 percent of plain attacks and none of the paraphrases; normalising helped only against character tricks. Detectors are useful as a layer and for monitoring, but they are probabilistic and attackers adapt." Follow-up: "How would you evaluate a detector?" With a labelled set that includes paraphrases, multilingual and encoded attacks and hard negatives, the way the book describes the PINT benchmark.
How do you design an agent that reads email and can send email?
"Apply the rule of two. Reading untrusted email and having private data are fine if sending is limited: allowlist recipients, or require approval for new recipients and any attachment of private data. Or split it: a quarantined component extracts typed fields from emails and a privileged planner acts on those only." Follow-up: "What does it cost?" In the example's simulation 18 percent of tasks were blocked by a strict policy; I reduce that with narrow approvals and allowlists rather than dropping the policy.
What is the lethal trifecta?
"Private data, untrusted content and a way to communicate externally in one agent. With all three, an attacker's text can make the agent read the data and send it out. The advice is to avoid combining them, because guardrails cannot reliably stop the attack." Follow-up: "Name a real example." I would cite published incidents only after checking them; No specific incidents were researched for this module.