New to ShortSpan? We distil the AI-security research that matters into practitioner takeaways — edited by Ben Williams (NCC Group).Get the weekly email
// Analysis
RAGSieve catches RAG poisoning with self-referenced checks
Published: Fri, 14 Aug 2026 • By Marcus Halden
Agents
RAGSieve spots knowledge poisoning in retrieval-augmented generation without a trusted reference set. It contrasts documents locally at query time and across the corpus, flagging coordinated injections and over-weighted evidence. Reported results cut attack success from 67.4% to 14.0% while keeping unpoisoned F1 at 41.3%, with modest runtime overhead.
Retrieval-augmented_generation" target="_blank" rel="noopener" class="term-link">Retrieval-augmented generation (RAG) shifts trust from Large Language Model (LLM) parameters to an external index. That index is editable, which makes it a tempting target. Poison a handful of documents, get them retrieved for the right questions, and you can steer answers. Many defences lean on a clean reference corpus or brittle global thresholds. RAGSieve takes a different tack: it builds its own reference from what the system already retrieves.
How the sieve works
RAGSieve runs at two control points. First, RAGSieve-Query (RSQ) operates online between retrieval and generation. It contrasts the top five retrieved documents against the tail of the same retrieval (ranks 6–20). The idea is simple and neat: if the head looks oddly concentrated compared with the local baseline, something is off. RSQ scores candidates using four evidence branches — answer-anchor concentration, script-integrity, multiscale language-model surprisal, and query-alignment traces — then can down-rank or drop suspicious items before the LLM ever sees them.
Second, RAGSieve-Graph (RSG) runs offline during ingestion or periodic audits. For each document it builds a local graph of semantic nearest neighbours, filters to neighbours that are semantically similar but lexically distinct, and measures excess local density relative to the document’s k-th neighbour baseline. Coordinated poison injections tend to create denser pockets than honest content. RSG also applies a token-level script-integrity predicate. Neither mode needs poison labels or a trusted external corpus.
What they measured
Across three QA datasets, three dense retrievers, and six poisoning constructions spanning black-, grey-, and white-box variants (including both contiguous and dispersed triggers), the numbers are strong. RSQ reaches 95.2% macro AUROC and detects 82.2% of poison at a 5% clean-document removal cap, beating GMTP at 81.1% and 52.5%. At one operating point, RSQ removes 73.9% of poison while touching only 2.2% of clean items; GMTP removes 69.5% poison but 22.3% clean.
RSG posts 93.3% macro AUROC and 79.8% budgeted detection, over CleanBase at 79.4% and 37.6%. Deployed together (RSG then RSQ), attack success drops from 67.4% unprotected to 14.0%, with unpoisoned-retrieval F1 held at 41.3%. Overheads look workable: RSQ adds about 447.3 ms per query with 3.87 GiB P95 memory. A 128k-document RSG scan takes 46.54 s (0.362 ms per document) with 1.01 GiB peak.
Limits matter. RAGSieve detects retrieval-promotion patterns, not truth. RSG relies on coordinated injections altering local density, so single fluent poisons are harder. RSQ assumes the retrieval tail is mostly clean; if poisons occupy the tail, contrast weakens. Quarantining documents offline also has persistent side effects for future queries. The toughest case here is CPA-RAG, where residual attack success stays highest. The open question is how far detector-aware attackers can go by dispersing payloads, ensuring tail coverage, and jointly optimising carriers and payloads while meeting lexical-diversity and local-baseline constraints. That is exactly the sort of arms race worth measuring.
Additional analysis of the original ArXiv paper
📋Original Paper Title and Abstract
RAGSieve: Self-Referenced Local Contrast for Knowledge-Poison Detection in Retrieval-Augmented Generation
Authors: Xinlong Xu and Yoshua Y. Li
Retrieval-augmented generation treats an external corpus as inference evidence, allowing injected documents to promote attacker-chosen claims. Existing detectors depend on trusted references, specific attack artifacts, or global thresholds sensitive to corpus topology. We present RAGSieve, a self-referenced detection framework that constructs its reference from the inspected system. RAGSieve-Query (RSQ) performs query-local contrast, scoring top-five candidates against ranks 6-20 of the same retrieval to detect answer-anchor concentration and carrier transitions. RAGSieve-Graph (RSG) performs corpus-local contrast, comparing each document's semantically similar but lexically distinct neighbors with its local baseline to detect coordinated density before queries arrive. Across three QA datasets and six poisoning constructions, RSQ achieves 95.2% AUROC and detects 82.2% of poison at 5% clean-document removal, versus 81.1%/52.5% for GMTP. RSG achieves 93.3%/79.8%, versus 79.4%/37.6% for CleanBase. Joint deployment reduces attack success from 67.4% to 14.0% while retaining 41.3% F1 on unpoisoned retrieval, demonstrating practical protection at both corpus ingestion and query time without poison labels or trusted corpora. Source code is available at https://github.com/XrazyMee/RAGSieve.
🔍ShortSpan Analysis of the Paper
Problem
This paper studies poisoning of retrieval-augmented generation systems, where an attacker injects or modifies a small number of indexed documents so that retrieval returns attacker-selected evidence and the generator produces an incorrect, attacker-chosen answer. This threat matters because RAG moves trust from model parameters to an external, mutable corpus and existing detectors depend on trusted reference corpora, specific attack artefacts, or global thresholds that are sensitive to corpus topology and attack diversity.
Approach
RAGSieve constructs its reference from the inspected system through self-referenced local contrast at two control points. RAGSieve-Query (RSQ) runs online after retrieval and before generation: it contrasts the top-five candidate documents with the retrieval tail (ranks 6-20) using four evidence branches — answer-anchor concentration, script-integrity, multiscale language-model surprisal, and query-alignment traces — to score and optionally remove suspicious candidates before generation. RAGSieve-Graph (RSG) runs offline during ingestion or periodic audits: for each document it builds a local graph of semantic nearest neighbours, retains neighbours that are semantically similar but lexically distinct, and measures excess local density relative to the document's k-th neighbour baseline; it also applies a token-level script-integrity predicate. Both modes use no poison labels or external trusted corpora. Evaluation uses three QA datasets (Natural Questions, HotpotQA, MS MARCO), three dense retrievers, and six poisoning constructions covering black-box, grey-box and white-box variants and both contiguous and dispersed triggers.
Key Findings
RSQ achieves 95.2% macro AUROC and detects 82.2% of poison documents when clean-document removal is capped at 5%, compared with 81.1% AUROC and 52.5% budgeted detection for the best baseline GMTP.
At an operating point RSQ removes 73.9% of poison while removing only 2.2% clean documents; by contrast GMTP removes 69.5% poison and 22.3% clean documents.
RSG reaches 93.3% macro AUROC and 79.8% budgeted poison detection at 5% clean removal, outperforming CleanBase which attains 79.4% AUROC and 37.6% budgeted detection.
Joint deployment (RSG then RSQ) reduces overall attack success rate from 67.4% unprotected to 14.0% while preserving unpoisoned-retrieval F1 at 41.3%.
Per-attack and per-system results show strong improvements on embedding-optimised and coordinated injections; difficult cases remain, notably CPA-RAG where residual attack success is highest.
Operational cost: RSQ adds about 447.3 ms per query with 3.87 GiB P95 memory; an RSG corpus scan over 128k documents takes 46.54 s (0.362 ms per document) with 1.01 GiB peak memory.
Limitations
RAGSieve detects retrieval-promotion patterns not falsehood, so it is not a factuality verifier. RSG relies on coordinated injections that alter local graph density and has lower recall for single fluent poisons. RSQ requires a predominantly clean retrieval tail; many poisons in ranks 6-20 reduce its separation. Offline quarantining has persistent effects because removal affects future queries. Detector-aware attack dispersion and optimisations against both lexical-diversity constraints and local-floor calibration remain open.
Implications
Offensive implications emphasise how an attacker could adapt: craft single fluent poisoned documents to evade corpus-graph density checks; disperse payloads across topical neighbourhoods to defeat clique-like detectors; ensure poisoned items also occupy the retrieval tail to weaken query-local contrast; or jointly optimise carriers and payloads (as in CPA-RAG) to preserve fluent carriers and reduce surprisal or query-alignment signals. The measured residual success against CPA-RAG shows attackers can still achieve partial success against the defence, so defenders should assume motivated attackers may tune dispersion and fluency to exploit the modes' differing assumptions. Source code is available at https://github.com/XrazyMee/RAGSieve.
- It tackles knowledge poisoning in retrieval-augmented generation by adding a three-layer, defense-in-depth mechanism: ingest filtering, provenance-w...
- It shows end-to-end security gaps in Retrieval-Augmented Generation (RAG) systems, not just single-stage retrieval, by examining how chunking and re...
- The paper offers a practical defense against data poisoning in Retrieval-Augmented Generation (RAG) systems, a real threat in AI deployments that re...
- It shows that RAG systems can be poisoned via retrieved documents, potentially steering answers with adversarial content.
- A large, 432-configurat...
- It demonstrates a realistic black-box poisoning threat against Agentic RAG systems: an attacker can publish poisoned documents that hijack multi-ste...
- It shows a new single-document poisoning method (DenialRAG) that embeds both the correct answer and a crafted denial with an attacker-controlled exp...
- It introduces Confundo, a learning-based Poison Generator that can craft robust, stealthy content poisons for RAG systems, remaining effective even ...
- It shows RAG systems can be tainted by adding poisoned documents to the corpus, such that attacker-specified queries reliably pull back and reveal t...
- It presents a refined, word-level poisoning method for retrieval-augmented generation, improving on prior coarse attacks by guiding both seed genera...
- It demonstrates a practical, stealthy data-poisoning attack on Retrieval-Augmented Generation (RAG) systems, where adversarial yet fluent documents ...
Get the weekly digest
The few AI-security papers that matter, with the practitioner takeaway. No spam.