Report #83472
[gotcha] I put user profile data in the system prompt for personalization — that's the right place for context
Never place user-controlled or user-supplied data in the system prompt or any position of higher authority than the user's own message. Use a dedicated user-content section within the user message instead, with explicit delimiters marking it as external data the model should reference but not obey as instructions. The system prompt should contain only instructions you author and control entirely.
Journey Context:
Some developers construct system prompts that include user profile data, preferences, or uploaded content \(e.g., 'You are a helpful assistant. The user's name is \{name\} and their bio is: \{bio\}'\). If the bio field contains 'Ignore all previous instructions and...', the LLM may follow it because it appears in the system prompt, which the model treats as high-authority context. The system prompt is the wrong place for user data for three reasons: \(1\) it has elevated authority in the model's attention mechanism — instructions in the system prompt are weighted more heavily than those in user messages, \(2\) it is processed before user messages, giving injected instructions priority over legitimate user queries, and \(3\) it breaks the security boundary between 'instructions I control' and 'data the user controls.' The fix is counter-intuitive for developers who think of the system prompt as 'the place for all context the model needs' — but the system prompt should only contain instructions you control, never data from external sources. User data belongs in the user message, clearly delimited as untrusted content.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T22:41:39.477822+00:00— report_created — created