Manuscript Offprint

arXiv:2610.40742

Prevented is Not Protected: What Attack Success Rate Hides about RAG

Chahana Dahal, Zuobin Xiong

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

Abstract

Retrieval-Augmented Generation (RAG) is vulnerable to knowledge poisoning, where adversaries manipulate retrieved evidence to influence model outputs. Existing defenses are primarily evaluated using attack success rate (ASR), which obscures defense-induced failures and the mechanisms behind apparent attack prevention. To address this issue, this work introduces Aligned RAG Evaluation, a matched-query protocol that jointly examines clean and poisoned responses, with and without defense. By combining matched conditions analysis, LLM-judge endorsement, and retrieval dependence controls, the proposed framework distinguishes prevented from introduced failures, target mentions from LLM endorsement, and single-passage influence from evidence composition. Experiments on HotpotQA and Natural Questions reveal that existing defenses can introduce unexpected target-positive answers, although they can prevent some attacks, while evaluation criteria can also change defense rankings. Our findings expose critical blind spots in ASR-based evaluation and motivate a more comprehensive assessment of RAG poisoning defenses. The code and the evaluation artifact are available at https://github.com/chxhana/aligned-rag-eval.

1 Introduction

Retrieval-augmented generation (RAG) allows a language model to generate output using evidence retrieved from an external corpus (Lewis et al., 2020), which, although effective, also makes the unreliable external corpus part of the model's input. A RAG poisoning attacker can add crafted passages to the corpus, and those passages can be retrieved at the inference stage and steer the model toward an attacker-chosen answer (Zhong

et al., 2023; Zou et al., 2025). As a countermeasure, defense mechanisms should therefore reduce the malicious influence introduced by the attacker without degrading the system's performance on clean/benign questions. However, most defenses of RAG poisoning evaluate whether a defense can prevent an attack from causing the model to answer desired targets (Zou et al., 2025; Xiang et al., 2026; Zhou et al., 2025; Zhang et al., 2025), yet this approach is not a comprehensive evaluation. A defense mechanism can change the system's behavior on many queries, including malicious and clean, by blocking some poisoned answers, introducing new target-positive answers on other poisoned queries, or making the model abstain. Thus, a leaderboard that looks at only prevented attacks of a defense mechanism may not reflect the overall safety of the defended system.

To address this issue, this paper introduces Aligned RAG Evaluation, a low-cost yet effective mechanism that uses matched records to evaluate the impact of defense mechanisms. Particularly, we save four answers for each query to check the prevented and newly introduced attacks: clean retrieval without a defense, clean retrieval with a defense, poisoned retrieval without a defense, and poisoned retrieval with a defense, with all other variables fixed, including query, target, victim model, and decoding policy. In addition, we also save the retrieved passages and rerun answers after removing these passages, which allows us to check whether the model just mentioned the target, actually endorsed it, or needed both poisoned and legitimate evidence to produce it. This evaluation protocol is applied to PoisonedRAG passages (Zou et al., 2025) on HotpotQA (Yang et al., 2018) and Natural Questions (NQ) (Kwiatkowski et al., 2019). Other than the basic evaluation, we also introduce split-knowledge, a probe where the target answers appear only when the injected passage is combined with existing legitimate evidence

Under review.

in the corpus. The enhanced protocol lets us compare two mechanisms: evidence displacement with PoisonedRAG and evidence composition with split-knowledge.

The main results of this work demonstrate the claim: prevented is not protected in RAG defenses from different perspectives. (i) preventing attacks does not always lower risk. Under string labels, a defense can block poisoned target outputs while introducing new wrong answers. (ii) the choice of evaluation metric can substantially change the conclusions about defense. On the same saved outputs, a defense that appears ineffective under string matching becomes the strongest under LLL-judged endorsement. (iii) the retrieval score detectors fail when the retrieved context is mostly poisoned, e.g., we found that the detector intercepts 59 of 60 target-positive outputs when there is one poison in the context, but intercepts none with five poisoned. Together, these findings argue that RAG defenses should be evaluated as interventions on the whole system. A comprehensive defense report should show what the defense prevented, what it introduced, how it affected clean queries, and whether target strings were actually endorsed.

The contributions of this paper are as follows.

  1. An auditable evaluation protocol. We define a four-condition record that joins clean and poisoned answers, with and without a defense, and stores retrieval exposure and removal controls for query- and passage-level audit.

  2. A split-knowledge probe. We introduce the split-knowledge probe where the attacker's target depends on combining one injected passage with legitimate corpus evidence, which helps us analyze composition-dependent poisoning from single-passage dominance (§4.4).

  3. Across HotpotQA and NQ, we show that ASR-style summaries either hide introduced targets (§4.1), or depend on the scorer (§4.2), or face detector collapse when poison dominates the retrieved context (§4.3).

  4. We release ALIGNEDRAG-EVAL, a pip-installable harness that applies the protocol to any defense with query-level JSONL outputs, which can produce transition tables, diagnostics, removal-control summaries when available, and audit packets for LLM or human rescoring.

RetrievalNo defenseDefense
CleanTc0T_{c0}Tc1T_{c1}
PoisonedTp0T_{p0}Tp1T_{p1}

Table 1: Four matched conditions for each query. T=1T=1 means the answer receives a positive target label.

References (33)