Needle-in-RAG: Prompt-Conditioned Character-Level Traceback of Poisoned Spans in Retrieved Evidence
On the map: Retrieval-augmented generation → Privacy and security of RAG
Abstract (arXiv)
Retrieval-augmented generation (RAG) improves factual grounding by conditioning large language models on retrieved evidence, but it also opens a data-layer attack surface: poisoned corpus entries can steer outputs without changing model parameters. Existing defenses and traceback methods are largely passage-level, which is too coarse for modern attacks whose effective payload may be a short fabricated claim, trigger phrase, or hidden instruction embedded inside an otherwise benign chunk. We study black-box character-level poison traceback in RAG and present RAGCharacter, a two-pass forensic framework that localizes the responsible retrieved span for a concrete misgeneration event. Pass-0 runs standard RAG while logging a prompt-anchored execution trace. Pass-1 re-enters a triggered trace and performs event-conditioned traceback over prompt-used evidence via budgeted counterfactual masking and replay, yielding an attribution span for forensic reporting and a causal span under the logged trace. We further introduce an evaluation protocol that measures both event-level chunk traceback and character-level localization fidelity. Across two QA corpora, five poisoning attack families, six target LLMs, and multiple passage- and character-level baselines, RAGCharacter achieves the best overall trade-off within our benchmark between localization accuracy and low over-attribution. These results suggest that prompt-conditioned, black-box character-level traceback can be feasible, moving RAG forensics from document-level suspicion toward finer-grained evidence auditing and potential remediation.
Key facts. Cited by 1 paper in the map (data through 14 Oct 2026). Placed in Privacy and security of RAG, one of 15 directions in Retrieval-augmented generation. Builds on 58 of its 64 references that are in the map. First posted on arXiv 3 May 2026.
Builds on
58 of 64 references.
Closest ancestors · 28
Same direction, newest first
- 2025Secure Retrieval-Augmented Generation against Poisoning Attacks28 Oct
- 2025NeuroGenPoisoning: Neuron-Guided Attacks on Retrieval-Augmented Generation of LLM via Genetic Optimization of External Knowledge24 Oct
- 2025ADMIT: Few-shot Knowledge Poisoning Attacks on RAG-based Fact Checking11 Oct
- 2025ReliabilityRAG: Effective and Provably Robust Defense for RAG-based Web-Search27 Sep
- 2025AIP: Subverting Retrieval-Augmented Generation via Adversarial Instructional Prompt18 Sep
- 2025Who Taught the Lie? Responsibility Attribution for Poisoned Knowledge in Retrieval-Augmented Generation17 Sep
- 2025Benchmarking Poisoning Attacks against Retrieval-Augmented Generation24 May
- 2025Uncovering Competing Poisoning Attacks in Retrieval-Augmented Generation18 May
- 2025One Shot Dominance: Knowledge Poisoning Attack on Retrieval-Augmented Generation Systems15 May
- 2025Defending against Indirect Prompt Injection by Instruction Detection8 May
- 2025Traceback of Poisoning Attacks to Retrieval-Augmented Generation30 Apr
- 2025PR-Attack: Coordinated Prompt-RAG Attacks on Retrieval-Augmented Generation in Large Language Models via Bilevel Optimization10 Apr
16 more
- 2024GASLITEing the Retrieval: Exploring Vulnerabilities in Dense Embedding-based Search30 Dec
- 2024Towards More Robust Retrieval-Augmented Generation: Evaluating RAG Under Adversarial Poisoning Attacks21 Dec
- 2024RevPRAG: Revealing Poisoning Attacks in Retrieval-Augmented Generation through LLM Activation Analysis28 Nov
- 2024Backdoored Retrievers for Prompt Injection Attacks on Retrieval Augmented Generation of Large Language Models18 Oct
- 2024"Glue pizza and eat rocks" -- Exploiting Vulnerabilities in Retrieval-Augmented Generative Models26 Jun
- 2024Mitigating the Privacy Issues in Retrieval-Augmented Generation (RAG) via Pure Synthetic Data20 Jun
- 2024Machine Against the RAG: Jamming Retrieval-Augmented Generation with Blocker Documents9 Jun
- 2024BadRAG: Identifying Vulnerabilities in Retrieval Augmented Generation of Large Language Models3 Jun
- 2024Certifiably Robust RAG against Retrieval Corruption24 May
- 2024TrojanRAG: Retrieval-Augmented Generation Can Be Backdoor Driver in Large Language Models22 May
- 2024Human-Imperceptible Retrieval Poisoning Attacks in LLM-Powered Applications26 Apr
- 2024Typos that Broke the RAG's Back: Genetic Attack on RAG Pipeline by Simulating Documents in the Wild via Low-level Perturbations22 Apr
- 2024Follow My Instruction and Spill the Beans: Scalable Data Extraction from Retrieval-Augmented Generation Systems27 Feb
- 2024The Good and The Bad: Exploring Privacy Issues in Retrieval-Augmented Generation (RAG)23 Feb
- 2024Pandora: Jailbreak GPTs by Retrieval Augmented Generation Poisoning13 Feb
- 2024PoisonedRAG: Knowledge Corruption Attacks to Retrieval-Augmented Generation of Large Language Models12 Feb
Other references · 30
- 2023GPT-4 Technical Reportcited by 18,396
- 2024The Llama 3 Herd of Modelscited by 14,715
- 2020Retrieval-Augmented Generation for Knowledge-Intensive NLP Taskscited by 9,297
- 2016"Why Should I Trust You?": Explaining the Predictions of Any Classifiercited by 5,070
- 2024Qwen2.5 Technical Reportcited by 4,942
- 2020Dense Passage Retrieval for Open-Domain Question Answeringcited by 3,824
- 2017Axiomatic Attribution for Deep Networkscited by 3,384
- 2020REALM: Retrieval-Augmented Language Model Pre-Trainingcited by 2,141
- 2017Understanding Black-box Predictions via Influence Functionscited by 1,741
- 2016MS MARCO: A Human Generated MAchine Reading COmprehension Datasetcited by 1,605
- 2023A Survey on Hallucination in Large Language Models: Principles, Taxonomy, Challenges, and Open Questionscited by 1,601
- 2023Not what you've signed up for: Compromising Real-World LLM-Integrated Applications with Indirect Prompt Injectioncited by 1,443
18 more
- 2018FEVER: a large-scale dataset for Fact Extraction and VERificationcited by 1,375
- 2021Improving language models by retrieving from trillions of tokenscited by 1,293
- 2020Leveraging Passage Retrieval with Generative Models for Open Domain Question Answeringcited by 1,210
- 2024Gemma: Open Models Based on Gemini Research and Technologycited by 916
- 2022Ignore Previous Prompt: Attack Techniques For Language Modelscited by 832
- 2019Data Shapley: Equitable Valuation of Data for Machine Learningcited by 629
- 2020Estimating Training Data Influence by Tracing Gradient Descentcited by 580
- 2019ERASER: A Benchmark to Evaluate Rationalized NLP Modelscited by 530
- 2024AgentPoison: Red-teaming LLM Agents via Poisoning Memory or Knowledge Basescited by 429
- 2023Benchmarking and Defending Against Indirect Prompt Injection Attacks on Large Language Modelscited by 264
- 2023Poisoning Retrieval Corpora by Injecting Adversarial Passagescited by 159
- 2023The Troubling Emergence of Hallucination in Large Language Models -- An Extensive Definition, Quantification, and Prescriptive Remediationscited by 131
- 2023Adversarial Attacks and Defenses in Large Language Models: Old and New Threatscited by 49
- 2024Defense Against Prompt Injection Attack by Leveraging Attack Techniquescited by 40
- 2024Adversarial Decoding: Generating Readable Documents for Adversarial Objectivescited by 16
- 2025SeCon-RAG: A Two-Stage Semantic Filtering and Conflict-Free Framework for Trustworthy RAGcited by 13
- 2025Enhancing Retrieval Augmented Generation with Hierarchical Text Segmentation Chunkingcited by 8
- 2024Estimating Privacy Leakage of Augmented Contextual Knowledge in Language Modelscited by 6
Built on by
Citing papers per year: 2026: 1.
1 paper.
Similar, not cited
Close in wording, no citation either way
- 2025RAGPart & RAGMask: Retrieval-Stage Defenses Against Corpus Poisoning in Retrieval-Augmented Generation
- 2026Confundo: Learning to Generate Robust Poison for Practical RAG Systems
- 2025MM-PoisonRAG: Disrupting Multimodal RAG with Local and Global Poisoning Attacks
- 2026Influence Factors on RAG Poisoning
- 2026RAGuard: A Layered Defense Framework for Retrieval-Augmented Generation Systems Against Data Poisoning
- 2026In RAG We Trust? Measuring Robustness of Retrieval-Augmented Generation Under Document Poisoning
- 2026Tracing Target Answers in Poisoned Retrieval Corpora via Token Influence Attribution
- 2025POISONCRAFT: Practical Poisoning of Retrieval-Augmented Generation for Large Language Models