Controlling Risk of Retrieval-augmented Generation: A Counterfactual Prompting Framework

Lu Chen, Ruqing Zhang, Jiafeng Guo, Yixing Fan, Xueqi Cheng
9/24/2024
cs.CL

Official code: ict-bigdatalab/RC-RAG (5 stars, last commit 2024-12-04).

Abstract

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.

View on arXivView PDF

Code Implementations(1)

EMNLP Findings 2024: Controlling Risk of Retrieval-augmented Generation: A Counterfactual Prompting Framework

50PythonSep 24, 20241 years ago

Similar Papers

Cite this paper

@article{chen2024controlling,
  title  = {Controlling Risk of Retrieval-augmented Generation: A Counterfactual Prompting Framework},
  author = {Lu Chen and Ruqing Zhang and Jiafeng Guo and Yixing Fan and Xueqi Cheng},
  year   = {2024},
  eprint = {2409.16146},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2409.16146v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2409.16146.svg)](https://codeofpaper.com/paper/2409.16146)

Discussion