Probabilistic defenses try to flag or neutralize injected instructions before the model acts on them. Spotlighting marks or encodes untrusted text so the model can tell it apart, and small classifiers such as Prompt Guard scan inputs for injection attempts. Use them to raise attacker cost, never as the only control.
Read in this order
- ArticleHow Microsoft defends against indirect prompt injection attacks (MSRC)Start here: how a large vendor layers spotlighting with detection.
- PaperDefending Against Indirect Prompt Injection Attacks With SpotlightingThe spotlighting paper, with the marking techniques and their results.
- OfficialLlama Prompt Guard 2 model card (Meta)A small open classifier you can try on your own inputs.