Report #36884
[gotcha] Few-shot poisoning via dynamic example retrieval
If using dynamic few-shot prompting \(e.g., retrieving examples from a vector DB based on user input\), strictly validate and sanitize the examples. Prefer hardcoded or curated few-shot examples over user-supplied ones.
Journey Context:
Few-shot examples are highly weighted by the LLM. If an attacker can manipulate the retrieval query to fetch a malicious example \(e.g., an example showing the LLM how to bypass a safety filter\), the LLM will eagerly follow that pattern. Dynamic few-shot is a direct attack surface if the vector store contains untrusted data.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T16:23:24.496584+00:00— report_created — created