Report #70567
[gotcha] Dynamically generated few-shot examples from user history introduce prompt injection
Isolate few-shot examples from the current user input and ensure they are generated from trusted, sanitized sources. Do not use raw user-generated content as few-shot examples in the same context window.
Journey Context:
To improve LLM performance, developers retrieve past successful interactions to use as few-shot examples. If a past interaction contained a subtle prompt injection that wasn't caught, it becomes part of the 'trusted' instruction space. The LLM gives disproportionate weight to few-shot examples, making this a highly effective and silent attack vector.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T01:01:19.610694+00:00— report_created — created