Highlight & Summarize: RAG without the jailbreaks
2508.02872v1
cs.CL, cs.LG
2025-08-09
Авторы:
Giovanni Cherubin, Andrew Paverd
Резюме на русском
Нарушения безопасности в Large Language Models (LLMs), такие как jailbreaking и model hijacking, остаются значительной проблемой при использовании таких систем, особенно в контексте бесед с чатботами. Обычные методы, такие как усиление системных промптов или обучение классификаторов нежелательных выходов, часто оказываются недостаточно эффективными ввиду огромного количества возможных входных данных и нежелательных результатов. В статье предлагается новая модель Highlight & Summarize (H&S) для Retrieval-Augmented Generation (RAG), которая устраняет эти проблемы за счет изменения принципов работы генерирующей LLM. В H&S-модели генеративный LLM не имеет прямого доступа к самим вопросам пользователя, а вместо этого работает с выделенными ("highlighted") подборками документов, которые затем обрабатываются в цельную всё понятную ответ. Авторы оценили несколько инстанций H&S, показав, что ответы этой модели чаще всего лучше по качеству и отдалённости от нежелательных задач, чем ответы стандартного RAG-принципа. Это указывает на сильное потенциал H&S в обеспечении безопасности и эффективности в RAG-системах.
Abstract
Preventing jailbreaking and model hijacking of Large Language Models (LLMs)
is an important yet challenging task. For example, when interacting with a
chatbot, malicious users can input specially crafted prompts to cause the LLM
to generate undesirable content or perform a completely different task from its
intended purpose. Existing mitigations for such attacks typically rely on
hardening the LLM's system prompt or using a content classifier trained 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. In this paper, 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 relevant passages ("highlights") from
the retrieved documents, and a summarizer, which takes the highlighted passages
and summarizes them into a cohesive answer. We describe several possible
instantiations of H&S and evaluate their generated responses in terms of
correctness, relevance, and response quality. Surprisingly, when using an
LLM-based highlighter, the majority of H&S responses are judged to be better
than those of a standard RAG pipeline.
Ссылки и действия
Дополнительные ресурсы: