arXiv:2409.09916cs.CLcs.AI2024-09被引 23

小模型也能精准答问题,减少幻觉,还更可靠。

SFR-RAG: Towards Contextually Faithful LLMs

  • 用指令微调让小模型紧扣上下文生成,避免胡编乱造。
  • 90亿参数模型在7个基准中3项夺冠,性能超1040亿参数的Command-R+。
  • 新评测框架统一标准,适合对比真实场景下的RAG模型表现。

检索增强生成(RAG)通过融合外部上下文信息提升大语言模型(LLM)的事实准确性与相关性,已成为生成式AI的关键方向。当前应用中的LLM需准确理解上下文与用户问题,避免幻觉,处理无法回答、反事实或低质量内容,支持复杂多跳推理并生成可靠引用。本文提出SFR-RAG,一个以上下文对齐生成和幻觉最小化为重点进行指令微调的小型语言模型,并构建ContextualBench,一个整合HotpotQA、TriviaQA等主流多样RAG基准的新评测框架,采用统一的RAG设置以确保评估可复现与一致性。实验表明,SFR-RAG-9B在ContextualBench的7个基准中,有3项达到领先水平,参数量远低于对比模型如Command-R+(104B)和GPT-4o。该模型对上下文变动具有鲁棒性,且在无相关信息时能合理响应。此外,其在通用指令遵循和函数调用任务上也保持良好表现。

原文摘要 · Abstract (English)

Retrieval Augmented Generation (RAG), a paradigm that integrates external contextual information with large language models (LLMs) to enhance factual accuracy and relevance, has emerged as a pivotal area in generative AI. The LLMs used in RAG applications are required to faithfully and completely comprehend the provided context and users' questions, avoid hallucination, handle unanswerable, counterfactual or otherwise low-quality and irrelevant contexts, perform complex multi-hop reasoning and produce reliable citations. In this paper, we introduce SFR-RAG, a small LLM that is instruction-tuned with an emphasis on context-grounded generation and hallucination minimization. We also present ContextualBench, a new evaluation framework compiling multiple popular and diverse RAG benchmarks, such as HotpotQA and TriviaQA, with consistent RAG settings to ensure reproducibility and consistency in model assessments. Experimental results demonstrate that our SFR-RAG-9B model outperforms leading baselines such as Command-R+ (104B) and GPT-4o, achieving state-of-the-art results in 3 out of 7 benchmarks in ContextualBench with significantly fewer parameters. The model is also shown to be resilient to alteration in the contextual information and behave appropriately when relevant context is removed. Additionally, the SFR-RAG model maintains competitive performance in general instruction-following tasks and function-calling capabilities.

RAG小模型幻觉抑制评测框架

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