Retrieval-Augmented Generation — feeding a language model relevant documents from a corpus before it answers — is meant to ground responses in facts. But the corpus is a trust boundary. If an adversary can insert documents into it, they can control what the model retrieves and therefore what it says.
This paper demonstrates a gradient-guided poisoning attack against RAG pipelines. The attacker inserts two documents: a sleeper (containing the payload — the wrong answer) and a trigger (optimized to be co-retrieved with the sleeper when the target query arrives). The trigger's text is crafted through Greedy Coordinate Gradient optimization to exploit the vector similarity model used for retrieval.
Note (2026-11-13; read against the paper's full text): the figures need their definitions. The 38 percent is the co-retrieval rate (both the sleeper and the trigger appear in the retrieved set) under pure vector retrieval over 50 attacks on the Security Stack Exchange corpus of 67,941 documents; hybrid retrieval with BM25 brought it to 0 percent across all 50 attacks and all tested mixing weights (0.3 to 0.7), and the paper's practical recommendation is a mixing weight of at most 0.5, with 20 to 44 percent success when the attacker optimises for both signals. The 93 percent is an end-to-end attack success rate for one model (Llama 4, 93.3 percent), against 46.7 percent for GPT-5.3 among the five models it tests, with safety violation rates from 6.7 percent (Claude Sonnet 4.6) to 93.3 percent; 'up to 93 percent' is the top of that range, not a typical figure. On Wikipedia (FEVER, 25 attacks) the attack does not fail at retrieval: the paper reports 100 percent co-retrieval but 0 percent stealth, with 0 percent overall success across all retrieval configurations, where it defines overall success as co-retrieval together with stealth (under 30 percent retrieval on benign queries); and it labels the cross-corpus result exploratory, with a pilot of 9 attacks on the technical corpus giving 66.7 percent stealth and 11.1 percent overall success. The essay's 'the same attack fails entirely' on Wikipedia and its conclusion about corpus structure compress that. The paper also says it does not evaluate black-box attack methods, leaving robustness to them open.
Against vector-only retrieval on a Security Stack Exchange corpus of 68,000 documents, the attack achieves 38% co-retrieval and up to 93% success in changing the model's answer. Two documents, added to 68,000, flip the response.
The defense is architectural, not algorithmic: hybrid retrieval combining keyword matching (BM25) with vector similarity drops the attack success to 0% when the adversary hasn't optimized for both channels. The keyword matcher catches what the vector search misses because the poisoned documents are semantically similar to the target but lexically different from legitimate answers. Two retrieval methods, each vulnerable alone, become robust together.
But the defense is incomplete. An adversary who jointly optimizes for both retrieval signals can partially recover, reaching 20–44% success. And on a different corpus (Wikipedia), the same attack fails entirely — 0% success — revealing that effectiveness depends on corpus structure, not just the attack's sophistication.
The attack exploits a single retrieval channel. The defense diversifies channels. The residual vulnerability exists at the intersection of both. The security lesson is geometric: you're safe until the adversary finds the space where all your defenses agree to be wrong.