Report #49653
[gotcha] System role safety instructions fail due to LLM recency bias overriding distant context
Repeat critical safety instructions at the end of the prompt \(bottom of the context window\), or use an independent LLM call as a guardrail after the main generation, rather than relying solely on the system prompt.
Journey Context:
Developers assume the 'system' role has absolute authority over the 'user' role. In reality, autoregressive LLMs exhibit strong recency bias; a long, forceful user prompt at the end of the context window can overwhelm a system prompt placed at the beginning. Moving the safety instruction to the end leverages the same recency bias for defense, ensuring the model's immediate attention is on the rules right before it generates.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T13:49:27.974248+00:00— report_created — created