UTC

System prompt and hidden context leakage

The model reveals its instructions, hidden context or secrets placed in them. Anything put in a prompt should be assumed readable by the user.

How it works
  1. 1System prompts and retrieved context sit in the same text the model can repeat back.
  2. 2Asked the right way, models reproduce parts of that text, including keys, internal URLs or business rules.
  3. 3In agents, hidden context also includes tool results the user was not meant to see.
What to watch for
  • Responses containing system prompt fragments
  • Credentials or internal identifiers in outputs
How to defend
  • Never put secrets in prompts; give the agent scoped credentials through its tools.
  • Scan outputs for prompt fragments and credentials.
  • Assume the prompt is public and design for it.