[论文解读] Toward General Instruction-Following Alignment for Retrieval-Augmented Generation
本文提出了 VIF-RAG,一种可扩展、自动化且可验证的流水线,用于在检索增强生成(RAG)系统中生成高质量的指令遵循数据。通过结合原子指令筛选、基于规则的组合、监督式指令重写,以及通过 Python 执行进行可执行验证,作者构建了一个包含超过 10 万条样本的 VIF-RAG-QA 数据集和 FollowRAG 基准测试,显著提升了大语言模型在多样化指令约束下的性能,同时保持了基础能力。
Following natural instructions is crucial for the effective application of Retrieval-Augmented Generation (RAG) systems. Despite recent advancements in Large Language Models (LLMs), research on assessing and improving instruction-following (IF) alignment within the RAG domain remains limited. To address this issue, we propose VIF-RAG, the first automated, scalable, and verifiable synthetic pipeline for instruction-following alignment in RAG systems. We start by manually crafting a minimal set of atomic instructions (<100) and developing combination rules to synthesize and verify complex instructions for a seed set. We then use supervised models for instruction rewriting while simultaneously generating code to automate the verification of instruction quality via a Python executor. Finally, we integrate these instructions with extensive RAG and general data samples, scaling up to a high-quality VIF-RAG-QA dataset (>100k) through automated processes. To further bridge the gap in instruction-following auto-evaluation for RAG systems, we introduce FollowRAG Benchmark, which includes approximately 3K test samples, covering 22 categories of general instruction constraints and four knowledge-intensive QA datasets. Due to its robust pipeline design, FollowRAG can seamlessly integrate with different RAG benchmarks. Using FollowRAG and eight widely-used IF and foundational abilities benchmarks for LLMs, we demonstrate that VIF-RAG markedly enhances LLM performance across a broad range of general instruction constraints while effectively leveraging its capabilities in RAG scenarios. Further analysis offers practical insights for achieving IF alignment in RAG systems. Our code and datasets are released at https://FollowRAG.github.io.
研究动机与目标
- 解决 RAG 系统中指令遵循缺乏全面评估与可靠数据合成的问题。
- 开发一种可扩展、自动化的流水线,通过可执行验证确保高质量的指令生成。
- 弥合通用指令遵循与 RAG 特定指令遵循之间的性能差距。
- 创建一个标准化基准,用于评估 RAG 场景下的复杂指令遵循能力。
- 在增强检索设置中提升指令遵循对齐能力的同时,保持大语言模型的基础能力。
提出的方法
- 手动筛选少于 100 个原子指令作为指令组合的基础。
- 定义组合规则,从原子指令合成复杂指令,确保语义连贯性。
- 使用监督式模型对指令进行重写与扩展,以提升多样性与自然语言流畅性。
- 通过同一监督式模型生成验证代码,利用 Python 执行验证指令质量。
- 将合成的指令与 RAG 数据集(如 NQ、TriviaQA、HotpotQA)结合,构建 VIF-RAG-QA(超过 10 万条样本),并采用双重验证机制。
- 设计 FollowRAG 基准测试,包含约 3,000 个测试样本,覆盖 22 种指令类别和 4 个知识密集型 QA 数据集,支持自动化评估。
实验结果
研究问题
- RQ1我们如何全面评估 RAG 场景下的复杂指令遵循能力?
- RQ2我们如何生成可扩展、可靠且可验证的 RAG 系统指令遵循数据?
- RQ3我们如何在不损害大语言模型基础能力的前提下实现 RAG 中的指令遵循对齐?
- RQ4统一基准是否能有效评估多样化 RAG 任务中的指令遵循性能?
- RQ5在检索增强生成中实现稳健指令遵循对齐的实际设计原则是什么?
主要发现
- VIF-RAG 在 RAG 场景下 22 种指令约束类别中显著提升了指令遵循性能,在 FollowRAG 基准测试中实现了可测量的性能提升。
- FollowRAG 基准测试支持对 RAG 中指令遵循的可靠、自动化评估,并可无缝集成到现有 RAG 基准测试中。
- 在 VIF-RAG-QA 上微调的模型在指令遵循方面表现显著提升,同时在通用和知识密集型基准测试中保持了强劲性能。
- 通过 Python 执行进行的可执行验证确保了高质量的指令生成,减少了幻觉现象,并保证了语法和语义的正确性。
- 该流水线保留了大语言模型的基础能力,如推理与代码生成能力,在 GSM8K 和 HumanEval 等基准测试中未出现性能下降。
- 案例研究显示,VIF-RAG 能够使模型正确遵循复杂、多约束的指令(如格式要求、字数限制、大小写规范),同时从文档中准确检索相关事实。
阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。