arXiv:2609.09243cs.CRSep 2026

Manuscript Offprint

arXiv:2609.09243

In RAG We Trust? Measuring Robustness of Retrieval-Augmented Generation Under Document Poisoning

Iliano Fasolino

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Iliano Fasolino

Department of Computer Science

University of Milan

Milan, Italy

Abstract—Retrieval-augmented generation (RAG) grounds a language model in retrieved documents, which reduces hallucination but creates a new attack surface: if retrieved text is tampered with, the model may repeat the falsehood. We study how much a small quantized model, Llama 3.1 8B, degrades when a fraction of its retrieved context is poisoned. Three corruption strategies are tested, entity swap, number swap, and negation, each applied to zero, one, two, or three of the three retrieved passages, over a factorial sweep of 588 runs on a fact-checking task built from FEVER. Accuracy falls from 77.9% on clean context to 43.5% when all three passages are corrupted. Entity swap flips the largest share of answers that were correct on clean context. Number-based corruption stays flat while poisoned passages are a minority and jumps once they form a majority, a pattern we re-check with query-level bootstrap intervals. The model rarely invents new falsehoods; its dominant reaction is to abstain, and a lexical overlap proxy of unsupported generation falls under attack rather than rising. The study is a small-scale measurement with coarse automated labels; we treat the strategy contrasts as suggestive until decoding is controlled and stronger adjudication is in place.

Index Terms—retrieval-augmented generation, large language models, adversarial robustness, document poisoning, fact verification

I. INTRODUCTION

Large language models answer questions fluently but carry two well-known liabilities: their knowledge is frozen at training time, and they sometimes state false facts with full confidence. Retrieval-augmented generation, proposed by Lewis et al. [1], addresses both by fetching relevant documents at query time and placing them in the prompt as evidence. The model is then asked to answer from that evidence rather than from memory alone. This design has become the default recipe for question answering over private or fast-moving knowledge bases.

The same design introduces a dependency that is easy to overlook. A RAG answer is only as trustworthy as the documents it retrieves. If an attacker can edit, inject, or otherwise corrupt even part of the retrieved set, the grounding step that was meant to improve reliability becomes a channel for misinformation. Shi et al. [3] showed that irrelevant context alone can pull a model off track; corrupted but on-topic context is a stronger lever, because it looks exactly like the evidence the model was told to trust. What is still missing for a practitioner running a small model on modest hardware is a concrete measurement: how far does accuracy fall, which kind of corruption bites hardest, and does the model fail loudly by fabricating or quietly by refusing.

We answer those three questions empirically. Our contribution is threefold. First, we build a reproducible poisoning testbed around a 4-bit Llama 3.1 8B model, a MiniLM retriever, and a FAISS index of nearly twenty thousand FEVER evidence sentences. Second, we run a full factorial experiment, three corruption strategies crossed with four poisoning levels over a fixed query set, and report accuracy, a fooled rate, abstention, and a lexical-overlap proxy of unsupported generation for every cell. Third, we characterise the failure surface: entity corruption flips the most answers, numeric corruption jumps once it reaches a majority of the context, and the model's default response to contradiction is to abstain rather than to invent. Every point estimate reported here comes from the same 588-run table. Where we interpret a jump or a strategy ranking, we also report query-level bootstrap intervals and paired tests recomputed from that table.