Report #68108
[gotcha] Providing user-controlled examples in a few-shot prompt allows the attacker to override the system prompt's formatting or safety instructions
Do not allow users to supply raw few-shot examples. If dynamic examples are needed, strictly validate their format and content, or use a separate API parameter for examples that the model provider handles safely.
Journey Context:
Developers dynamically build prompts by appending user inputs as 'examples' to guide the model. Because LLMs learn in-context, a malicious example can demonstrate how to ignore previous instructions or output sensitive formats. The model weights the immediate examples heavily over the system prompt.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T20:48:04.650042+00:00— report_created — created