Report #44744
[gotcha] Attacker poisoning few-shot examples to manipulate LLM behavior
Freeze few-shot examples in a secure, immutable data store. Do not allow dynamic few-shot example selection based purely on user-controlled input without strict sanitization and review.
Journey Context:
To improve LLM accuracy, developers often dynamically fetch few-shot examples from a vector database based on the user's query. If an attacker can inject a crafted document into the vector DB, the 'example' will contain a prompt injection. Because few-shot examples are strongly weighted by the LLM as correct behavior, a single poisoned example can override system instructions and force the LLM to output malicious content or format.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T05:34:16.195937+00:00— report_created — created