不暴露用户问题即可防大模型被劫持,提升安全问答系统可靠性。
Highlight & Summarize: RAG without the jailbreaks

- 将RAG流程拆分为摘要提取与内容总结两阶段,避免直接向生成模型暴露原始问题。
- 在多个问答任务中,新方法生成答案的准确性和相关性不低于传统RAG。
- 适合需要高安全性的对话系统、金融/医疗等敏感领域应用。
防止大型语言模型(LLM)被劫持和越狱是重要但具挑战性的任务。恶意用户可通过精心构造的提示诱导模型生成不当内容或执行非预期任务。现有方案依赖加固系统提示或使用分类器检测不良输出,但这类概率性方法易被绕过。本文提出并评估了“亮点提取与摘要”(Highlight & Summarize, H&S)设计模式,一种用于检索增强生成(RAG)系统的新型安全架构。其核心思想是在不向生成模型透露用户问题的前提下完成问答任务:先由“亮点提取器”从检索到的文档中提取相关段落,再由“摘要器”基于这些段落生成连贯回答。我们实现并评估了H&S的多种变体,在正确性、相关性和质量方面表现良好。在某些问答任务中,其生成结果甚至优于标准RAG系统。
原文摘要 · Abstract (English)
Preventing jailbreaking and model hijacking of Large Language Models (LLMs) is an important yet challenging task. When interacting with a chatbot, malicious users can input specially crafted prompts that cause the LLM to generate undesirable content or perform a different task from its intended purpose. Existing systems attempt to mitigate this by hardening the LLM's system prompt or using additional classifiers to detect undesirable content or off-topic conversations. However, these probabilistic approaches are relatively easy to bypass due to the very large space of possible inputs and undesirable outputs. We present and evaluate Highlight & Summarize (H&S), a new design pattern for retrieval-augmented generation (RAG) systems that prevents these attacks by design. The core idea is to perform the same task as a standard RAG pipeline (i.e., to provide natural language answers to questions, based on relevant sources) without ever revealing the user's question to the generative LLM. This is achieved by splitting the pipeline into two components: a highlighter, which takes the user's question and extracts ("highlights") relevant passages from the retrieved documents, and a summarizer, which takes the highlighted passages and summarizes them into a cohesive answer. We describe and implement several possible instantiations of H&S and evaluate their responses in terms of correctness, relevance, and quality. For certain question-answering (QA) tasks, the responses produced by H&S are judged to be as good, if not better, than those of a standard RAG pipeline.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。