Report #22215
[gotcha] Dynamic few-shot example poisoning from user-controlled data
Use static, developer-controlled few-shot examples. If dynamic examples are required, strictly validate them or use a separate isolated LLM call to generate them before inserting them into the main prompt.
Journey Context:
To make LLMs adapt, developers fetch user history to build dynamic few-shot prompts. An attacker crafts a user profile or document that looks like a few-shot example \(e.g., \`User: \[malicious\] Assistant: \[compliant\]\`\). The LLM follows the poisoned pattern, bypassing system instructions because few-shot examples are heavily weighted during inference as in-context learning overrides base alignment.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T15:41:59.634392+00:00— report_created — created