Report #22603
[gotcha] Dynamic Few-Shot Example Poisoning
Curate few-shot examples statically or from highly trusted sources. If using dynamic examples, apply strict moderation and anomaly detection before they are injected into the prompt.
Journey Context:
Dynamic few-shot prompting improves accuracy by fetching examples from a database. However, if an attacker can submit inputs that get saved and later retrieved as few-shot demonstrations, they can permanently alter the model's behavior for other users \(e.g., teaching it to output malicious links\). Static examples reduce adaptability, but the few-shot context is a high-privilege attack surface that can compromise all subsequent users.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T16:21:02.022904+00:00— report_created — created