arXiv:2410.21597cs.CLcs.AI2024-10AAAI被引 1

让大模型只做指定任务,拒绝无关请求。

Reducing the Scope of Language Models

论文配图:Reducing the Scope of Language Models
图 1 · 摘自论文原文
  • 用提示、微调或电路断路器技术限定模型响应范围。
  • 多样无关样本下微调效果最佳,样本少时断路器更优。
  • 可组合多种方法提升可靠性,适合落地应用开发者。

大型语言模型广泛应用于各类面向用户的应用,如基于文档的回答或编程助手,但这些应用需模型仅回应特定任务,拒绝其他请求(如写诗或回答物理问题),这一过程称为“范围限定”。本文对多种方法进行系统评估,涵盖提示、微调、偏好学习及近期提出的通用对齐技术——电路断路器(Circuit Breakers)。在三类语言模型和多种任务上,我们验证了范围限定的可行性,覆盖多个主题及细粒度话题。通过消融实验、对抗测试等,发现当存在丰富无关查询样本时,简单监督微调表现最佳;样本稀缺时,电路断路器表现良好。将两者叠加使用可兼得优势。本研究旨在为实际部署提供范围限定的实用指南。

原文摘要 · Abstract (English)

Large language models (LLMs) are deployed in a wide variety of user-facing applications. Typically, these deployments have some specific purpose, like answering questions grounded on documentation or acting as coding assistants, but they require general language understanding. In such deployments, LLMs should respond only to queries that align with the intended purpose and reject all other requests, such as generating poetry or answering questions about physics, a task we refer to as `scoping'. We conduct a comprehensive empirical evaluation of various methods, ranging from prompting, fine-tuning to preference learning and the recently proposed general alignment technique known as Circuit Breakers (CB). Across three families of language models and a broad variety of tasks, we show that it is possible to scope language models. We examine scoping for multiple topics, and fine-grained topics. We ablate diversity of irrelevant queries, layer different techniques, conduct adversarial evaluations and more. Among other results, we find that when diverse examples of irrelevant queries are available, simple supervised fine-tuning produces the best results, but when such diversity is low, Circuit Breakers perform quite well. One can often get the benefits of both methods by layering them in succession. We intend our study to serve as a practitioner's guide to scoping LLMs.

大模型范围限定微调对齐

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。