spotlighting
Spotlighting for prompt injection defence in Python.
What it is
spotlighting marks untrusted text before it reaches a model, with delimiting, datamarking and encoding as described in the Microsoft Research paper, plus the system-prompt instructions that go with each mode, so an agent can tell data from instructions.
Install
pipx install git+https://github.com/basitalisandhu/spotlighting # the spotlighting command
python3 -m pip install git+https://github.com/basitalisandhu/spotlighting # the library
From the README; see the full README for every option.
Links
Releases
Topics: agent-security, agentic-ai, ai-agents, cli, datamarking, guardrails, hacktoberfest, indirect-prompt-injection, llm-security, prompt-injection, prompt-injection-defense, python, spotlighting, untrusted-input