How spotlighting and delimiting work
Spotlighting and delimiting mark untrusted content as data before it enters the prompt, so the model is less likely to treat it as instructions. Three techniques are covered here: delimiters, datamarking and encoding.
Three techniques compared
Delimiters, datamarking and encoding all mark content as data. They share the same basic property: their effect is probabilistic.
| Technique | Role | Nature of the defense |
|---|---|---|
| Delimiters | Mark content as data | Probabilistic, model-dependent |
| Datamarking | Mark content as data | Probabilistic, model-dependent |
| Encoding | Mark content as data | Probabilistic, model-dependent |
What they mitigate and where they fail
What they mitigate
These techniques lower the likelihood that a model treats untrusted content as instructions.
Where they fail
Because the defense is probabilistic and model-dependent, it can be bypassed. It should be tested against adaptive attackers, not only static injection sets.
Layered defense for agents that ingest untrusted content
| Layer | What it does | Where it operates |
|---|---|---|
| Prompt-level separation | Delimiters, datamarking and encoding mark content as data. Probabilistic. | Inside the prompt |
| Least-privilege permissions | Limits what a compromised agent could ever do. | Outside the model |
| Tool-call policy enforcement | Checks each action against rules outside the model. | Outside the model |
| Human approval | Requires approval for sensitive actions. | Outside the model |
| Audit logging | Records requests, decisions and approvals for investigation. | Outside the model |
Deterministic controls that contain a successful injection
Least-privilege permissions, tool-call policy enforcement, human approval for sensitive actions and audit logging are deterministic controls outside the model. They limit the impact of an injection that gets past prompt-level separation.
Questions to answer before relying on prompt-level separation
- Which untrusted sources reach the model, and is each one marked or delimited before it enters the prompt?
- Has the defense been tested against adaptive attackers, not only static injection sets?
- If an injection succeeds, what is the maximum action the agent can take with its current permissions and tool access?
- Are tool calls checked against a deterministic policy outside the model, with human approval for sensitive actions?
- Are tool-call requests, policy decisions and approvals logged in a form that supports audit and incident investigation?