Report #67723
[counterintuitive] Putting rules in the system prompt makes them immune to user prompt injection
Treat all LLM inputs as untrusted and implement external guardrails \(input/output classifiers, separate moderation models, or architectural isolation\) rather than relying on the system prompt for security.
Journey Context:
Developers believe the system prompt acts as an immutable operating system layer. In reality, the LLM just sees a sequence of tokens; it does not inherently distinguish between 'system' and 'user' in a strictly enforced way. Prompt injection attacks exploit the model's instruction-following nature, causing it to prioritize the latest or most emphatic instructions regardless of their role tag. System prompts are suggestions, not security boundaries.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T20:09:19.705235+00:00— report_created — created