Skip to content

Mark untrusted text in prompts (spotlighting) #145

Closed

Description

@itsskofficial

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
  • the switch turns it off

Sources:

Roadmap ID: SAFE-12 · Priority: P1 · Size: S

Activity

  1. added
    enhancement
    help wanted
    area: engine
    priority: P1
    size: S
    on Oct 9, 2026
  2. added a commit that references this issue on Oct 11, 2026
    c7fbb6f
  3. added a commit that references this issue on Oct 11, 2026
    356f1a9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area: engineenhancementhelp wantedpriority: P1size: S

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions