Prompt injection gets most of the attention because it arrives with the user. Retrieval poisoning is quieter. The attacker writes to a corpus, a wiki, a ticket queue or a shared drive, and the pipeline later pulls that text into the prompt on its own. The model has no way to tell a poisoned chunk from a policy PDF, and it treats retrieved content as authoritative, often placing it in a privileged position in the context window Promptfoo's RAG poisoning guide.
The economics favor the attacker. CorruptRAG, a published attack, shows that injecting a single poisoned text can achieve higher success rates than baselines that assume many poisoned documents per query the CorruptRAG paper. A working defense therefore cannot assume attacks look like bulk spam. It has to catch one document, inserted once, that happens to rank well.
Two failure modes matter here, and they need different detectors. Context poisoning is the case where wrong or malicious information enters the context and then gets reused and compounded across steps Splunk's production context engineering writeup. Retrieval hijacking is the case where an attacker crafts a document specifically so it outranks legitimate ones Promptfoo. The first is a correctness problem you can measure. The second is an adversarial problem you have to filter.
The framing that keeps teams honest is context engineering: the job is deciding which tokens reach the model at all, not just how the instructions are worded Anthropic's context engineering post. Once you accept that every retrieved chunk is a token you chose, a quarantine gate is an obvious part of the selection logic.



