ai-system-prompt-leakage
LLM system prompt leakage
When it applies
The app prepends hidden instructions (system/developer prompt) you cannot see, and you have a chat interface, API, or agent you can query repeatedly. Worth doing on nearly every LLM target: the leaked prompt tells you which guardrails exist, which tools/functions the model can call, what internal URLs or tenant IDs it knows, and whether developers pasted secrets into it.
Why it works
The system prompt is just tokens in the same context as your input — the model can read it, and nothing technically stops it from repeating it; only behavioral guardrails (which are probabilistic) stand in the way. Framings that recast the disclosure as a benign task (translation, summarization, debugging) route around refusal training. Agent error paths are even softer: frameworks often echo the full prompt or tool schema into exceptions and logs.