Retrieval-augmented generation (RAG) has emerged as a critical mechanism in contemporary NLP to support Large Language Models(LLMs) in systematically accessing richer factual context. However, the integration of RAG mechanisms brings its inherent challenges, as LLMs need to deal with potentially noisy contexts. Recent studies have shown that LLMs still struggle to critically analyse RAG-based in-context information, a limitation that may lead to incorrect inferences and hallucinations. In this paper, we investigate how to elicit critical reasoning in RAG via contrastive explanations. In particular, we propose Contrastive-RAG (C-RAG), a framework that (i) retrieves relevant documents given a query, (ii) selects and exemplifies relevant passages, and (iii) generates explanations that explicitly contrast the relevance of the passages to (iv) support the final answer. We show the impact of C-RAG building contrastive reasoning demonstrations from LLMs to instruct smaller models for retrieval-augmented tasks. Extensive experiments demonstrate that C-RAG improves state-of-the-art RAG models while (a) requiring significantly fewer prompts and demonstrations and (b) being robust to perturbations in the retrieved documents.
翻译:检索增强生成(RAG)已成为当代自然语言处理中的关键机制,旨在支持大型语言模型(LLMs)系统性地访问更丰富的事实性上下文。然而,RAG机制的整合也带来了其固有的挑战,因为LLMs需要处理可能存在噪声的上下文。近期研究表明,LLMs在批判性分析基于RAG的上下文信息方面仍存在困难,这一局限可能导致错误的推断和幻觉。本文研究了如何通过对比解释来激发RAG中的批判性推理。具体而言,我们提出了对比式RAG(C-RAG)框架,该框架(i)根据查询检索相关文档,(ii)选择并示例化相关段落,(iii)生成明确对比段落相关性的解释,以(iv)支持最终答案的生成。我们展示了C-RAG通过构建来自LLMs的对比推理示例,以指导较小模型执行检索增强任务的影响。大量实验表明,C-RAG在(a)显著减少提示和示例需求,且(b)对检索文档的扰动具有鲁棒性的同时,能够提升最先进的RAG模型性能。