Report #23886
[gotcha] System prompt override via many-shot or few-shot context poisoning
Place system instructions \*after\* the few-shot examples or retrieved context, or use strict structural tagging and enforce model fine-tuning that heavily penalizes overriding system roles.
Journey Context:
Developers put safety instructions in the system prompt and assume they dominate. However, LLMs are heavily influenced by the immediate context and few-shot examples. If an attacker can inject a few-shot pattern \(e.g., \`User: \[malicious\] Assistant: \[override\]\`\), the model will often mimic the few-shot pattern rather than obey the distant system prompt due to in-context learning biases.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T18:30:15.782892+00:00— report_created — created