Prompt Defences and Security Boundaries
In this article
- Explain why a rule in the prompt does not stop a hijacked model from taking an action.
- Move one check out of the prompt and into the code that runs tools.
- Say which of four common defences still hold when the model is fully compromised.
- Spot defences that look like boundaries but depend on what the model decides.
- Terms defined here: security boundary, permission check, credential, scoped credential, API key.
Overview
You built an assistant that reads your work email and can send mail for you. Worried about strangers' instructions, you add one line to its standing instructions: "Never send mail to an address that is not already in the thread." It feels like a lock. It is closer to a sign on an unlocked door: the model reads it as one more piece of text, and nothing in your code makes the model obey it.
After this you can explain why a rule written for the model is not a protection, move that rule into the code that runs the assistant's tools, and say which of four common defences still hold when an attacker fully controls the model.
Sign in to keep reading
The rest of this article opens with an account. An account also keeps your progress and quiz results on every device, and lets you follow news for up to five topics.
Still to read in this article
- The rule that did not hold
- Moving the check into the dispatcher
- Two paths for one request
- Four defences, one compromised model
- What a prompt rule is still good for
- Things that look like boundaries
- The rule at work
- Sources
- Check yourself, 13 questions