Report #82913
[gotcha] Dynamically building few-shot examples from untrusted user history or external databases
Curate few-shot examples statically. If dynamic examples are necessary, ensure they are strictly vetted by a separate moderation pipeline or generated by a secure LLM, never raw user input.
Journey Context:
Few-shot examples heavily influence LLM behavior. If an application uses past user interactions as few-shot examples, an attacker can submit a malicious query/response pair. The LLM will then dutifully follow the malicious pattern for subsequent legitimate requests from other users.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T21:45:35.214323+00:00— report_created — created