Research map / Large language models / Retrieval and knowledge
RAG LLMs are Not Safer: A Safety Analysis of Retrieval-Augmented Generation for Large Language Models
Bang An, Shiyue Zhang, Mark Dredze
University of Maryland · Bloomberg AI · Johns Hopkins University
Read the paperPlace an idea next to itCheck your own paper ↗
10measured effects
2improved
3no clear effect
5hurt
AI-extracted. The measured effects below were read by AI from the paper's full text (no summary yet). Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.
Measured effects reported in the paper
| What was changed | Where | Measured | Effect |
|---|---|---|---|
| add retrieved documents (RAG) instead of non-RAG | Llama-3-8B · harmful questions | unsafe response rate: 0.3% -> 9.2% | Hurt |
| add safe retrieved documents instead of no documents | Llama-3-8B · harmful questions | unsafe response probability: 0.3% -> 7.9% | Hurt |
| add retrieved documents instead of no documents | Zephyr-Beta · harmful questions | unsafe response probability: 38.5% -> 36.7% | No clear effect |
| add safe retrieved documents instead of no documents | Gemma-7B · harmful questions | unsafe response probability: 3.4% -> 2.2% | No clear effect |
| also instruct the model to use its own knowledge, not only documents (ablation) | RAG LLMs · harmful questions | unsafe response rate | No clear effect |
| increase number of retrieved safe documents from one upward (ablation) | RAG LLMs · harmful questions | unsafe response rate | Hurt |
| retrieve unsafe documents instead of safe documents | Llama-3-8B · harmful questions | unsafe response probability: 7.9% -> 31.5% | Hurt |
| apply jailbreak prompts optimized in non-RAG setting to RAG | GCG and AutoDAN on Llama-3-8B · harmful queries (50) | attack success rate | Hurt |
| optimize jailbreak prompts directly in the RAG setting instead of non-RAG | GCG and AutoDAN on Llama-3-8B · harmful queries (50) | attack success rate | Improved |
| match number of documents between optimization and test (ablation) | GCG and AutoDAN · harmful queries (50) | attack success rate | Improved |
Open problems in RAG robustness and evaluation
When does retrieval help a language model, and when does it mislead it?
- Only one answer-bearing document is handled. · 6 papers state it
- String-match metrics misjudge long or rephrased answers. · 6 papers state it
- Verbalized graph triples distort or drop facts. · 5 papers state it
Closest papers by meaning
- SafetyPrompts: A Systematic Review of Open Datasets for Evaluating and Improving Large Language Model Safety (AAAI 2025 · similarity 0.90)
- SG-Bench: Evaluating LLM Safety Generalization Across Diverse Tasks and Prompt Types (NeurIPS 2024 · similarity 0.90)
- CASE-Bench: Context-Aware SafEty Benchmark for Large Language Models (ICML 2025 · similarity 0.90)
- RAGGED: Towards Informed Design of Scalable and Stable RAG Systems (ICML 2025 · similarity 0.89)
- Safety Depth in Large Language Models: A Markov Chain Perspective (NeurIPS 2025 · similarity 0.89)
- Navigating the Safety Landscape: Measuring Risks in Finetuning Large Language Models (NeurIPS 2024 · similarity 0.89)
Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.