Report #93350
[gotcha] Few-shot examples provided in the prompt are manipulated or leak training data
Curate and hardcode few-shot examples; do not dynamically pull them from untrusted user data or broad web searches. If using dynamic examples, sanitize them rigorously and isolate them from system instructions.
Journey Context:
To improve LLM performance, developers dynamically fetch 'similar examples' from a vector database and append them to the prompt. If an attacker poisons the vector DB with malicious documents that look like examples but contain instructions \(e.g., 'User: \[malicious instruction\] Assistant: \[malicious compliance\]'\), the LLM follows the pattern. The LLM gives disproportionate weight to few-shot examples, making them a highly effective, stealthy injection vector.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T15:16:36.537320+00:00— report_created — created