RAG LLMs are Not Safer: A Safety Analysis of Retrieval-Augmented Generation for Large Language Models. An, B., Zhang, S., & Dredze, M. April, 2025. arXiv:2504.18041 [cs]
Paper doi abstract bibtex Efforts to ensure the safety of large language models (LLMs) include safety fine-tuning, evaluation, and red teaming. However, despite the widespread use of the Retrieval-Augmented Generation (RAG) framework, AI safety work focuses on standard LLMs, which means we know little about how RAG use cases change a model's safety profile. We conduct a detailed comparative analysis of RAG and non-RAG frameworks with eleven LLMs. We find that RAG can make models less safe and change their safety profile. We explore the causes of this change and find that even combinations of safe models with safe documents can cause unsafe generations. In addition, we evaluate some existing red teaming methods for RAG settings and show that they are less effective than when used for non-RAG settings. Our work highlights the need for safety research and red-teaming methods specifically tailored for RAG LLMs.
@misc{an_rag_2025,
title = {{RAG} {LLMs} are {Not} {Safer}: {A} {Safety} {Analysis} of {Retrieval}-{Augmented} {Generation} for {Large} {Language} {Models}},
shorttitle = {{RAG} {LLMs} are {Not} {Safer}},
url = {http://arxiv.org/abs/2504.18041},
doi = {10.48550/arXiv.2504.18041},
abstract = {Efforts to ensure the safety of large language models (LLMs) include safety fine-tuning, evaluation, and red teaming. However, despite the widespread use of the Retrieval-Augmented Generation (RAG) framework, AI safety work focuses on standard LLMs, which means we know little about how RAG use cases change a model's safety profile. We conduct a detailed comparative analysis of RAG and non-RAG frameworks with eleven LLMs. We find that RAG can make models less safe and change their safety profile. We explore the causes of this change and find that even combinations of safe models with safe documents can cause unsafe generations. In addition, we evaluate some existing red teaming methods for RAG settings and show that they are less effective than when used for non-RAG settings. Our work highlights the need for safety research and red-teaming methods specifically tailored for RAG LLMs.},
urldate = {2025-04-28},
publisher = {arXiv},
author = {An, Bang and Zhang, Shiyue and Dredze, Mark},
month = apr,
year = {2025},
note = {arXiv:2504.18041 [cs]},
keywords = {Computer Science - Artificial Intelligence, Computer Science - Computation and Language},
}
Downloads: 0
{"_id":"NwMhnQA9322xBw4xw","bibbaseid":"an-zhang-dredze-ragllmsarenotsaferasafetyanalysisofretrievalaugmentedgenerationforlargelanguagemodels-2025","author_short":["An, B.","Zhang, S.","Dredze, M."],"bibdata":{"bibtype":"misc","type":"misc","title":"RAG LLMs are Not Safer: A Safety Analysis of Retrieval-Augmented Generation for Large Language Models","shorttitle":"RAG LLMs are Not Safer","url":"http://arxiv.org/abs/2504.18041","doi":"10.48550/arXiv.2504.18041","abstract":"Efforts to ensure the safety of large language models (LLMs) include safety fine-tuning, evaluation, and red teaming. However, despite the widespread use of the Retrieval-Augmented Generation (RAG) framework, AI safety work focuses on standard LLMs, which means we know little about how RAG use cases change a model's safety profile. We conduct a detailed comparative analysis of RAG and non-RAG frameworks with eleven LLMs. We find that RAG can make models less safe and change their safety profile. We explore the causes of this change and find that even combinations of safe models with safe documents can cause unsafe generations. In addition, we evaluate some existing red teaming methods for RAG settings and show that they are less effective than when used for non-RAG settings. Our work highlights the need for safety research and red-teaming methods specifically tailored for RAG LLMs.","urldate":"2025-04-28","publisher":"arXiv","author":[{"propositions":[],"lastnames":["An"],"firstnames":["Bang"],"suffixes":[]},{"propositions":[],"lastnames":["Zhang"],"firstnames":["Shiyue"],"suffixes":[]},{"propositions":[],"lastnames":["Dredze"],"firstnames":["Mark"],"suffixes":[]}],"month":"April","year":"2025","note":"arXiv:2504.18041 [cs]","keywords":"Computer Science - Artificial Intelligence, Computer Science - Computation and Language","bibtex":"@misc{an_rag_2025,\n\ttitle = {{RAG} {LLMs} are {Not} {Safer}: {A} {Safety} {Analysis} of {Retrieval}-{Augmented} {Generation} for {Large} {Language} {Models}},\n\tshorttitle = {{RAG} {LLMs} are {Not} {Safer}},\n\turl = {http://arxiv.org/abs/2504.18041},\n\tdoi = {10.48550/arXiv.2504.18041},\n\tabstract = {Efforts to ensure the safety of large language models (LLMs) include safety fine-tuning, evaluation, and red teaming. However, despite the widespread use of the Retrieval-Augmented Generation (RAG) framework, AI safety work focuses on standard LLMs, which means we know little about how RAG use cases change a model's safety profile. We conduct a detailed comparative analysis of RAG and non-RAG frameworks with eleven LLMs. We find that RAG can make models less safe and change their safety profile. We explore the causes of this change and find that even combinations of safe models with safe documents can cause unsafe generations. In addition, we evaluate some existing red teaming methods for RAG settings and show that they are less effective than when used for non-RAG settings. Our work highlights the need for safety research and red-teaming methods specifically tailored for RAG LLMs.},\n\turldate = {2025-04-28},\n\tpublisher = {arXiv},\n\tauthor = {An, Bang and Zhang, Shiyue and Dredze, Mark},\n\tmonth = apr,\n\tyear = {2025},\n\tnote = {arXiv:2504.18041 [cs]},\n\tkeywords = {Computer Science - Artificial Intelligence, Computer Science - Computation and Language},\n}\n\n\n\n\n\n\n\n\n\n\n\n","author_short":["An, B.","Zhang, S.","Dredze, M."],"key":"an_rag_2025","id":"an_rag_2025","bibbaseid":"an-zhang-dredze-ragllmsarenotsaferasafetyanalysisofretrievalaugmentedgenerationforlargelanguagemodels-2025","role":"author","urls":{"Paper":"http://arxiv.org/abs/2504.18041"},"keyword":["Computer Science - Artificial Intelligence","Computer Science - Computation and Language"],"metadata":{"authorlinks":{}},"html":""},"bibtype":"misc","biburl":"https://bibbase.org/zotero/andreasmartin","dataSources":["jurZeGzSpYdkQ8rm4"],"keywords":["computer science - artificial intelligence","computer science - computation and language"],"search_terms":["rag","llms","safer","safety","analysis","retrieval","augmented","generation","large","language","models","an","zhang","dredze"],"title":"RAG LLMs are Not Safer: A Safety Analysis of Retrieval-Augmented Generation for Large Language Models","year":2025}