OffTopicEval: When Large Language Models Enter the Wrong Chat, Almost Always!
本文提出了一个评估大型语言模型(LLM)操作安全性的基准测试工具OFFTOPICEVAL,并发现了当前LLM在拒绝域外查询方面的不足,同时提出了基于提示的引导方法来提高其操作安全性。
更新于 2025-10-01。作者:Jingdi Lei、Varun Gumma、Rishabh Bhardwaj、Seok Min Lim、Chuan Li、Amir Zadeh、Soujanya Poria。
中文摘要
大型语言模型(LLM)的安全性是推动其大规模部署所面临的最紧迫挑战之一。虽然大多数研究和全球讨论都集中在通用危害上,例如模型帮助用户伤害自己或他人,但企业面临一个更为根本的问题:基于LLM的代理是否适合其预定的用途。为了解决这个问题,我们提出了操作安全性的概念,即LLM在承担特定任务时,适当接受或拒绝用户查询的能力。我们进一步提出了OffTopicEval,这是一个用于评估操作安全性的评估套件和基准,适用于一般和特定代理用途场景。我们对包括20个公开权重LLM在内的六个模型家族进行的评估显示,尽管模型性能各异,但所有模型在操作安全性方面都存在高度不安全的问题。即使是性能最强的模型——Qwen-3(235B)的77.77%和Mistral(24B)的79.96%,在可靠的运营安全性方面也远远不够,而GPT模型的得分在62-73%之间持平,Phi仅达到中等水平(48-70%),Gemma和Llama-3则分别降至39.53%和23.84%。尽管操作安全性是模型对齐的核心问题,为了抑制这些失败,我们提出了基于提示的引导方法:查询接地(Q-ground)和系统提示接地(P-ground),这两种方法显著提高了外部域拒绝率。Q-ground提供了高达23%的稳定提升,而P-ground带来了更大的提升,将Llama-3.3(70B)的得分提升了41%,Qwen-3(30B)的得分提升了27%。这些结果突显了操作安全性干预的迫切需要,以及基于提示的引导作为向更可靠的LLM代理迈出的第一步所具有的潜力。
英文摘要
Large Language Model (LLM) safety is one of the most pressing challenges for enabling wide-scale deployment. While most studies and global discussions focus on generic harms, such as models assisting users in harming themselves or others, enterprises face a more fundamental concern: whether LLM-based agents are safe for their intended use case. To address this, we introduce operational safety, defined as an LLM's ability to appropriately accept or refuse user queries when tasked with a specific purpose. We further propose OffTopicEval, an evaluation suite and benchmark for measuring operational safety both in general and within specific agentic use cases. Our evaluations on six model families comprising 20 open-weight LLMs reveal that while performance varies across models, all of them remain highly operationally unsafe. Even the strongest models -- Qwen-3 (235B) with 77.77\% and Mistral (24B) with 79.96\% -- fall far short of reliable operational safety, while GPT models plateau in the 62--73\% range, Phi achieves only mid-level scores (48--70\%), and Gemma and Llama-3 collapse to 39.53\% and 23.84\%, respectively. While operational safety is a core model alignment issue, to suppress these failures, we propose prompt-based steering methods: query grounding (Q-ground) and system-prompt grounding (P-ground), which substantially improve OOD refusal. Q-ground provides consistent gains of up to 23\%, while P-ground delivers even larger boosts, raising Llama-3.3 (70B) by 41\% and Qwen-3 (30B) by 27\%. These results highlight both the urgent need for operational safety interventions and the promise of prompt-based steering as a first step toward more reliable LLM-based agents.
解读
一句话总结
本文提出了一个评估大型语言模型(LLM)操作安全性的基准测试工具OFFTOPICEVAL,并发现了当前LLM在拒绝域外查询方面的不足,同时提出了基于提示的引导方法来提高其操作安全性。
问题1:这篇论文想要解决什么具体问题?
- 问题背景:大型语言模型(LLM)的安全性问题日益受到关注,特别是在将其用于特定目的时,如何确保其操作安全性。
- 现有方案不足:现有研究主要关注LLM的通用危害,而忽略了LLM作为特定目的代理时的操作安全性。
- 研究目标:提出操作安全性概念,并开发OFFTOPICEVAL基准测试工具,评估LLM在特定目的下的操作安全性。
问题2:论文的核心创新点是什么?
- 技术创新:提出操作安全性概念,并开发OFFTOPICEVAL基准测试工具。
- 方法改进:提出基于提示的引导方法,包括查询接地(Q-ground)和系统提示接地(P-ground)。
- 优势:提高了LLM拒绝域外查询的能力,增强了LLM作为特定目的代理的安全性。
问题3:实验结果如何验证了方法的有效性?
- 关键实验:使用OFFTOPICEVAL基准测试工具对20个LLM模型进行评估。
- 性能提升:Q-ground方法在所有模型上均实现了至少23%的性能提升,P-ground方法将Llama-3.3和Qwen-3的拒绝域外查询能力分别提高了41%和27%。
- 对比结果:与基线方法相比,Q-ground和P-ground方法显著提高了LLM拒绝域外查询的能力。
问题4:这个研究的实际应用价值是什么?
- 应用场景:LLM在医疗、金融、教育等领域的应用。
- 实施建议:使用OFFTOPICEVAL基准测试工具评估LLM的操作安全性,并采用基于提示的引导方法提高其安全性。
- 局限与展望:目前的研究主要针对LLM的拒绝域外查询能力,未来可以进一步研究LLM的拒绝有害内容的能力,以及如何提高LLM的鲁棒性和适应性。
来源
机器可读索引:llms.txt