Reliability Stress Testing of RAG Retrieval under Query-Relevant Corpus Poisoning
Organizations: Google LLC Mountain View, USA · Fortinet, Inc. Sunnyvale, USA
Abstract
External text can affect a retrieval-augmented generation (RAG) system only after the retriever admits it to the model context. We stress this admission step while varying document content, attacker query information, per-target poison budget, and contamination scope. Across 623 Benchmarking Information Retrieval (BEIR) queries from SciFact and NFCorpus, five query-targeted documents per query reduce classical-retriever nDCG@10 by 40.2-61.5% in isolated-target stress. Full-query anchoring explains most Best Matching 25 (BM25) degradation, whereas appended text also shifts latent semantic analysis (LSA) and Hybrid rankings. A pretrained BGE-small validation reaches 100% target exposure for query-only P=5 on both datasets; adding the injection payload changes SciFact nDCG only from 0.269 to 0.271 and lowers NFCorpus exposure slightly to 98.8%, indicating that query anchoring remains the dominant retrieval-side factor for this dense model. Query length materially changes the interpretation of partial-information attacks: on 162 long SciFact queries, two random terms cover 19.9% of eligible terms and still yield 39.5% Hybrid target exposure. Multi-target contamination adds cross-target interference. Overlap-based admission can remove full-query poisons but may sharply reduce clean retrieval utility, and maximal marginal relevance (MMR) leaves exposure unchanged under the tested configuration. The study measures retrieval-layer failures, not downstream instruction following.
Figures & tables
| Data | Retr. | vs. query-only | vs. corpus-neutral |
|---|---|---|---|
| SciFact | BM25 | ||
| SciFact | LSA | ||
| SciFact | Hybrid | ||
| NFCorpus | BM25 | ||
| NFCorpus | LSA | ||
| NFCorpus | Hybrid |
| Data | Retr. | Condition | nDCG | Recall | TargetExp | AnyExp | Evid. | SafeR | #P | Poison% |
|---|---|---|---|---|---|---|---|---|---|---|
| SciFact | BM25 | Clean | .662 | .781 | .000 | .000 | .800 | .800 | .00 | .00 |
| BM25 | Isolated | .255 | .718 | 1.000 | 1.000 | .740 | .000 | 5.00 | .10 | |
| BM25 | Multi | .188 | .529 | 1.000 | 1.000 | .550 | .000 | 6.22 | 22.45 | |
| LSA | Clean | .295 | .442 | .000 | .000 | .453 | .453 | .00 | .00 | |
| LSA | Isolated | .119 | .347 | 1.000 | 1.000 | .367 | .000 | 4.97 | .10 | |
| LSA | Multi | .085 | .244 | 1.000 | 1.000 | .257 | .000 | 7.16 | 22.45 |
| Data | nDCG | TargetExp | Evid. | SafeR | |
|---|---|---|---|---|---|
| SciFact | 1 | .328 | 1.000 | .647 | .000 |
| 3 | .232 | 1.000 | .593 | .000 | |
| 5 | .183 | 1.000 | .547 | .000 | |
| NFCorpus | 1 | .230 | .889 | .607 | .025 |
| 3 | .186 | .907 | .573 | .009 | |
| 5 | .160 | .910 | .551 | .006 |
| Data | Evid.+Poison | Evid.+NoPoison | NoEvid.+Poison | NoEvid.+NoPoison |
|---|---|---|---|---|
| SciFact | .547 | .000 | .453 | .000 |
| NFCorpus | .545 | .006 | .365 | .084 |
| Data/subset | Mean elig. | Cov 2 | Exp 2 | Cov 4 / Exp 4 | |
|---|---|---|---|---|---|
| SciFact all | 300 | 8.33 | .278 | .507 | .553 / .940 |
| SciFact long | 162 | 10.63 | .199 | .395 | .397 / .895 |
| NFCorpus all | 323 | 2.48 | .805 | .848 | .974 / .901 |
| Data | Clean nDCG | Query only | Query+payload |
|---|---|---|---|
| SciFact | .713 | .269 / 1.000 | .271 / 1.000 |
| NFCorpus | .345 | .137 / 1.000 | .205 / .988 |
RAG Poisoning Attacks
Retrieval-augmented generation (RAG) poisoning attacks manipulate retrieved knowledge to steer, degrade, or disrupt model outputs.
See all 78 papers