You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Mark untrusted text in prompts (spotlighting) #145
Microsoft Research cut prompt-injection success from over 50% to under 2% on GPT-family models by "datamarking" untrusted text, with little loss in task quality. Plain delimiters can be bypassed. The effect on 8B local models is untested, so this should ship together with the local benchmark (LOCAL-10).
Idea: Datamark all email, web, webhook and third-party channel text before it enters any prompt by interleaving a marker between words, and tell the model that marked text is data, never instructions. Make it a config switch so it can be measured on and off.
Status in Sentient today: New.
Where: A helper in sentient/agent/prompt.py applied where tool results are added in sentient/agent/loop.py, plus sentient/proactivity/prompts.py, sentient/tasks/prompts.py and channel inputs in sentient/channels/base.py. Switch in sentient/config/schema.py.
Done when:
untrusted tool results reach the model datamarked; user text does not
tool-call parsing and answers still work on qwen3:8b in the existing tests
Activity
feat(agent): mark outside content in prompts so the model reads it as…
feat(agent): mark outside content in prompts (spotlighting) (#288)