跳到正文
arXiv cs.AI· Yining She, Daniel W. Peterson, Marianne Menglin Liu, Vikas Upadhyay, Mohammad Hossein Chaghazardi, Eunsuk Kang, Dan Roth·· 2 小时前AI 评分53

研究揭示 RAG 上下文会使 LLM 护栏判断变脆弱

RAG Makes Guardrails Brittle? Investigating Robustness of Guardrails under RAG-style Contexts

AI 导读

arXiv 论文(arXiv:2510.05310)系统评估 3 个 Llama Guard 和 2 个 GPT-oss 模型,发现插入良性检索文档会使输入、输出护栏判断翻转约 11% 和 8%,其中 72% 和 64% 是把原本正确的判断改错。论文逐一分析检索文档、用户查询和 LLM 回答各成分的影响,并测试两种缓解方法,发现鲁棒性差距难以轻易弥合。

正文 · 原文

View PDF HTML (experimental)

Abstract:With the increasing adoption of large language models (LLMs), ensuring the safety of LLM systems has become a pressing concern. External LLM-based guardrail models have emerged as a popular solution to screen unsafe inputs and outputs, but they are themselves fine-tuned or prompt-engineered LLMs vulnerable to data distribution shifts. In this paper, taking Retrieval Augmentation Generation (RAG) as a case study, we investigate how robust LLM-based guardrails are against additional information embedded in the context. Through a systematic evaluation of 3 Llama Guards and 2 GPT-oss models, we find that inserting benign retrieved documents flips the judgments of input and output guardrails in around 11% and 8% of cases respectively, with the majority of these flips (72% and 64%) reversing previously correct decisions. We further analyze the effect of each component in the augmented context: retrieved documents, user query, and LLM response. Two tested mitigations reveal that the robustness gap is not easily closed. These results expose a context-robustness gap in current guardrails.
Subjects: Computation and Language (cs.CL); Artificial Intelligence (cs.AI)
Cite as: arXiv:2510.05310 [cs.CL]
  (or arXiv:2510.05310v2 [cs.CL] for this version)
  https://doi.org/10.48550/arXiv.2510.05310

arXiv-issued DOI via DataCite

Submission history

From: Yining She [view email]
[v1] Mon, 6 Oct 2025 19:20:43 UTC (382 KB)
[v2] Fri, 20 Nov 2026 01:35:30 UTC (570 KB)

来源:arXiv cs.AI · arxiv.org