Spotlighting is a prompt-injection defense that marks or transforms untrusted text so the model can tell it apart from trusted instructions. Common techniques include wrapping untrusted content in clear delimiters, inserting a marker between its words or encoding it, together with an instruction telling the model to treat that marked content as data and never as commands.
The aim is to make it easier for the model to avoid following instructions hidden in documents, web pages or tool results. Research has shown it can reduce how often such attacks succeed.
It does not eliminate the problem. A model may still follow injected instructions in some cases, an attacker who knows the marking scheme may try to imitate or escape it, and transformations such as encoding can reduce the quality of the model's understanding of the text. It should be viewed as one layer, not a guarantee.
To use it well, combine it with other controls: restrict what the agent can access and do, require human approval for sensitive actions, filter outputs and log activity. Test the defense with adaptive attacks and re-test when the model, prompts or tools change.