← Latest papers
💻 computer science

Retrieved But Not Reliable: A Survey on Attacks, and Defenses in Retrieval-Augmented Generation

This survey provides a unified, pipeline-aware overview of Retrieval-Augmented Generation (RAG) robustness by formalizing threat models, categorizing attacks into accuracy, privacy, and fairness objectives, and reviewing stage-specific defenses, benchmarks, and explainability methods.

Original authors: Minh Tran, Cuong Dang, Tuc Nguyen, Khanh-Tung Tran, Minh Huynh Nguyen, Trinh Chau, Kien Le, Do Xuan Long, Jiahao Zhang, Hoang D. Nguyen, Thanh Le, Suhang Wang

Published 2026-08-27
📖 5 min read🧠 Deep dive

Original authors: Minh Tran, Cuong Dang, Tuc Nguyen, Khanh-Tung Tran, Minh Huynh Nguyen, Trinh Chau, Kien Le, Do Xuan Long, Jiahao Zhang, Hoang D. Nguyen, Thanh Le, Suhang Wang

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

In the modern digital landscape, artificial intelligence has evolved from a simple chatbot into a sophisticated research assistant. These large language models can write code, summarize complex reports, and answer intricate questions. However, for years, they suffered from a persistent flaw: they often invented facts with absolute confidence. To fix this, engineers developed a system called Retrieval-Augmented Generation. Instead of relying solely on the information memorized during training, the system first searches a vast external library of documents, pulls out the most relevant facts, and then uses those facts to construct its answer. This approach grounds the AI in reality, making it far more accurate and less prone to making things up. Yet, this very mechanism of reaching out to the outside world introduces a new set of vulnerabilities. Just as a library can be sabotaged by someone slipping a forged book onto the shelves, the AI's external knowledge base can be poisoned, leading the system to retrieve false information and generate harmful or incorrect outputs.

A comprehensive new survey by researchers from institutions including the University of Science in Ho Chi Minh City and Pennsylvania State University maps out these emerging dangers and the defenses being built to counter them. The team did not just list attacks; they constructed a unified framework to understand how adversaries target the different stages of the AI's workflow. They found that attackers generally pursue three main goals: they want to make the AI give the wrong answer, they want to trick it into revealing private information, or they want to amplify unfair biases against specific groups of people. The researchers organized these threats by where they strike in the pipeline. The first point of failure is the search itself, where an attacker might inject misleading documents to ensure the AI finds the wrong source material. The second is the ranking stage, where the system decides which of the found documents are most important; here, an attacker might try to boost a fake document so it appears at the top of the list. The third is the generation stage, where the AI writes the final response, and the fourth is the traceback stage, which attempts to identify which document caused a mistake after the fact.

The survey reveals that the most common method of attack involves "corpus poisoning," where an adversary inserts malicious documents into the external database. These documents are crafted to look like legitimate sources but contain subtle errors or false claims. When the AI searches for an answer, it retrieves these poisoned documents and treats them as truth. For instance, an attacker could inject a document claiming that a specific antibiotic cures the flu, leading the AI to confidently give dangerous medical advice. Another sophisticated tactic is the "backdoor attack," where the system is trained or manipulated to react only when a specific, hidden trigger phrase is present. If a user asks a question containing that trigger, the AI ignores all other evidence and retrieves a pre-planted, malicious document to generate a harmful response. The researchers also detailed "prompt injection" attacks, where malicious instructions are hidden inside a retrieved document. Once the AI reads this document, it might interpret the hidden text as a command to ignore the user's original question and instead reveal sensitive data or perform an unauthorized action.

Beyond simply breaking the system, the survey highlights how these attacks can compromise privacy and fairness. In terms of privacy, attackers can use the AI as a tool to extract confidential information from the database. By asking carefully crafted questions, they can trick the system into revealing private details about individuals or organizations that were stored in the documents. One study cited in the survey showed that attackers could achieve a success rate of up to 94% in leaking specific documents when using a backdoor trigger. Regarding fairness, the researchers found that attackers can poison the database with biased content to skew the AI's output against certain demographic groups. For example, by injecting documents that associate specific genders with negative traits, the AI could be manipulated to generate responses that reinforce harmful stereotypes, effectively amplifying societal biases through the lens of the machine.

To combat these threats, the researchers reviewed a wide array of defense strategies, each designed for a specific stage of the process. At the retrieval stage, defenses focus on cleaning the database and making the search engine more resistant to manipulation, such as by filtering out low-quality sources or detecting unusual patterns in the text. During the reranking phase, systems are being developed to cross-check multiple documents and demote those that seem suspicious or inconsistent with the rest of the evidence. At the generation stage, the AI itself is being taught to be more skeptical, learning to identify when a retrieved document conflicts with known facts or when the text contains hidden instructions. Finally, in the traceback stage, new methods are emerging that can trace a wrong answer back to the specific document that caused it, allowing developers to pinpoint and remove the source of the error.

Despite these advances, the survey concludes that the field is still in its early stages and faces significant hurdles. Many current defense methods rely on having full access to the internal workings of the AI system, which is rarely the case in real-world applications where the system is a "black box." Furthermore, there is a constant trade-off between the effectiveness of an attack and how obvious it is; highly effective attacks often produce text that sounds unnatural, making them easier to spot, while stealthy attacks are harder to execute. The researchers also noted that as AI systems evolve to handle more complex tasks, such as analyzing graphs of data or processing images alongside text, new and unpredictable vulnerabilities are likely to emerge. The path forward requires a continuous cycle of testing and improvement, ensuring that as these powerful tools become more integrated into our lives, they remain robust against those who would seek to exploit them.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →