Report #53526
[gotcha] Dynamically generated few-shot examples poisoning model behavior
Curate few-shot examples statically from trusted sources. If dynamic examples are necessary, strictly validate and sanitize them before injecting them into the prompt template.
Journey Context:
To improve accuracy, developers dynamically fetch few-shot examples from a database based on user input. An attacker crafts an input that retrieves a malicious example, which then instructs the model to ignore safety guidelines or output sensitive data. The model weights the few-shot examples heavily, making this a highly effective attack vector that bypasses system prompt defenses.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T20:20:28.072772+00:00— report_created — created