Retrieval-augmented generation (RAG) has emerged as a popular solution to mitigate the hallucination issues of large language models. However, existing studies on RAG seldom address the issue of predictive uncertainty, i.e., how likely it is that a RAG model's prediction is incorrect, resulting in uncontrollable risks in real-world applications. In this work, we emphasize the importance of risk control, ensuring that RAG models proactively refuse to answer questions with low confidence. Our research identifies two critical latent factors affecting RAG's confidence in its predictions: the quality of the retrieved results and the manner in which these results are utilized. To guide RAG models in assessing their own confidence based on these two latent factors, we develop a counterfactual prompting framework that induces the models to alter these factors and analyzes the effect on their answers. We also introduce a benchmarking procedure to collect answers with the option to abstain, facilitating a series of experiments. For evaluation, we introduce several risk-related metrics and the experimental results demonstrate the effectiveness of our approach. Our code and benchmark dataset are available at https://github.com/ict-bigdatalab/RC-RAG.
翻译:检索增强生成(RAG)已成为缓解大语言模型幻觉问题的流行解决方案。然而,现有关于RAG的研究很少涉及预测不确定性问题,即RAG模型的预测有多大可能是错误的,这导致了在实际应用中存在不可控的风险。在本工作中,我们强调风险控制的重要性,确保RAG模型能够主动拒绝回答低置信度的问题。我们的研究识别出影响RAG对其预测置信度的两个关键潜在因素:检索结果的质量以及这些结果被利用的方式。为了指导RAG模型基于这两个潜在因素评估其自身置信度,我们开发了一种反事实提示框架,该框架诱导模型改变这些因素并分析对其答案的影响。我们还引入了一种基准测试流程,用于收集包含"拒绝回答"选项的答案,以支持一系列实验。在评估方面,我们引入了几个与风险相关的指标,实验结果表明了我们方法的有效性。我们的代码和基准数据集可在 https://github.com/ict-bigdatalab/RC-RAG 获取。