用检索触发机制动态拦截有害请求,无需重训练模型。
RAR: Setting Knowledge Tripwires for Retrieval Augmented Rejection
- 将恶意内容嵌入向量库,通过检索结果判断是否拒绝请求。
- 在Claude 3.5 Sonnet上表现接近内置过滤,且可实时更新规则。
- 无需修改系统架构,适合快速应对新型安全威胁的团队使用。
大型语言模型的内容安全问题仍具挑战性,需灵活响应新兴威胁。本文提出检索增强拒答(RAR),利用检索增强生成(RAG)架构,在不重新训练模型的前提下动态拒绝有害用户请求。通过在向量数据库中插入并标记恶意文档,当这些文档被检索到时,系统即刻识别并拒绝对应请求。初步实验表明,RAR在Claude 3.5 Sonnet上的表现与内置内容过滤相当,同时具备更高的灵活性和实时定制能力,是及时应对关键漏洞的关键优势。该方法无需改动现有RAG系统架构,仅需添加特殊构造的文档及基于检索结果的简单拒答机制。
原文摘要 · Abstract (English)
Content moderation for large language models (LLMs) remains a significant challenge, requiring flexible and adaptable solutions that can quickly respond to emerging threats. This paper introduces Retrieval Augmented Rejection (RAR), a novel approach that leverages a retrieval-augmented generation (RAG) architecture to dynamically reject unsafe user queries without model retraining. By strategically inserting and marking malicious documents into the vector database, the system can identify and reject harmful requests when these documents are retrieved. Our preliminary results show that RAR achieves comparable performance to embedded moderation in LLMs like Claude 3.5 Sonnet, while offering superior flexibility and real-time customization capabilities, a fundamental feature to timely address critical vulnerabilities. This approach introduces no architectural changes to existing RAG systems, requiring only the addition of specially crafted documents and a simple rejection mechanism based on retrieval results.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。