RAG-Safety-Bench: Reliable Evaluation of Retrieval-Augmented LLM Safety
作者: Adithiyan Rajan Indira Saravanan, Kathleen C. Fraser
分类: cs.CL, cs.IR
发布日期: 2026-09-10
备注: Proceedings of EMNLP 2026 (main conference)
💡 一句话要点
提出RAG-Safety-Bench以评估检索增强LLM的安全性问题
🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)
关键词: 检索增强生成 大型语言模型 安全性评估 基准测试 有害内容生成
📋 核心要点
- 现有的检索增强生成方法在处理有害内容时可能导致安全性下降,缺乏对其影响机制的深入理解。
- 本文提出RAG-Safety-Bench基准,通过四种条件分离影响因素,系统评估RAG对LLM安全性的影响。
- 实验结果显示,良性与不安全能力呈反向关系,基线安全措施在RAG情况下无法提供安全保障。
📝 摘要(中文)
允许大型语言模型(LLMs)从一组可信文档中检索信息可以提高可靠性并减少幻觉。然而,近期研究表明,检索增强生成(RAG)在处理有害或危险内容时可能对生成响应的整体安全性产生意想不到的负面影响。为了更清晰地理解导致这一结果的机制,本文提出了RAG-Safety-Bench,一个用于测量RAG对LLM模型安全性影响的基准。通过消除检索器质量的混淆效应,并将问题清晰地分为四种条件,基准有效地隔离了观察到的安全性下降的不同因素的影响。我们在五个开源LLM上报告了结果,显示出良性和不安全能力之间的反向关系,强有力的证据表明基线安全防护措施在RAG情况下并不能保证下游安全性,且模型特定的支持先前发现,即即使是良性文档也可能导致检索增强系统中的不安全生成。
🔬 方法详解
问题定义:本文旨在解决检索增强生成(RAG)对大型语言模型(LLM)安全性影响的评估问题。现有方法未能清晰区分检索器质量与生成安全性之间的关系,导致对安全性下降的理解模糊。
核心思路:论文的核心思路是通过构建RAG-Safety-Bench基准,清晰地将问题分为四种条件,从而有效隔离不同因素对安全性影响的作用。这样的设计使得研究者能够更准确地评估RAG的安全性影响。
技术框架:整体架构包括四个主要条件:非RAG、RAG与包含答案的文档、RAG与相关但无答案的文档、以及RAG与随机安全文档。每种条件下的生成结果被独立评估,以分析不同因素的影响。
关键创新:最重要的技术创新在于通过四种条件的设计,消除了检索器质量的混淆效应,使得安全性评估更加可靠。这一方法与现有的单一条件评估方法本质上不同。
关键设计:在实验中,使用了五个开源LLM进行评估,设计了特定的评估指标来量化安全性影响,并确保每个条件下的文档选择具有代表性和一致性。
🖼️ 关键图片
📊 实验亮点
实验结果表明,在五个开源LLM上,良性与不安全能力之间存在显著的反向关系,且基线安全防护措施在RAG情况下未能提供有效的安全保障。这一发现为未来的模型设计和安全性评估提供了重要的参考。
🎯 应用场景
该研究的潜在应用领域包括企业文档管理、知识库集成以及任何需要确保生成内容安全性的LLM应用。通过提供可靠的安全性评估基准,RAG-Safety-Bench可以帮助开发者优化模型,降低生成有害内容的风险,提升用户信任。
📄 摘要(原文)
Allowing large language models (LLMs) to retrieve information from a set of trusted documents can increase reliability and reduce hallucination. However, recent work has demonstrated that retrieval-augmented generation (RAG) can have unintended side effects on the overall safety of the generated responses, when prompted for harmful or dangerous content. A clearer understanding of the mechanisms leading to this result is needed, as increasing numbers of end users turn to RAG to incorporate corporate documents and knowledge bases into LLM-based systems. We introduce RAG-Safety-Bench, a benchmark to measure the safety impact of RAG on LLM models. By removing the confounding effect of retriever quality, and cleanly separating the problem into four conditions -- non-RAG, RAG with an oracle document containing the answer to the harmful request, RAG with documents related to the harmful request but without the specific answer, and RAG with random, safe documents -- the benchmark isolates the impacts of different factors in the observed safety degradation. We report results across five open-source LLMs, showing an inverse relationship between benign and unsafe capability, strong evidence that baseline safety guardrails do not lead to downstream safety guarantees in the RAG case, and model-specific support for previous findings that even benign documents can lead to unsafe generation in retrieval-enabled systems.