通过检测查询与知识的相关性,提升RAG系统回答的可靠性。
Do You Know What You Are Talking About? Characterizing Query-Knowledge Relevance For Reliable Retrieval Augmented Generation
- 用拟合优度检验在线判断查询是否超出知识范围。
- 在8个问答数据集上验证,能有效识别低相关性查询。
- 适合需要高可靠性的问答系统开发者使用。
语言模型易产生幻觉和错误信息。检索增强生成(RAG)通过从外部知识库检索可验证信息来弥补模型参数知识的不足,是解决该问题的有效方案。然而,RAG的生成质量高度依赖查询与检索文档的相关性。当查询超出知识库覆盖范围或知识过时时,可能生成不准确的回答。本文建立了一种统计框架,通过捕捉知识相关性评估查询被RAG回答的能力。提出一种在线测试方法,利用拟合优度(GoF)检验检测每个查询的知识相关性,识别出知识覆盖不足的查询。同时开发了离线测试框架,分析一批查询分布变化,判断知识库是否已无法满足用户需求。在8个问答数据集上的系统评估表明,该框架能高效提升现有RAG系统的可靠性。
原文摘要 · Abstract (English)
Language models (LMs) are known to suffer from hallucinations and misinformation. Retrieval augmented generation (RAG) that retrieves verifiable information from an external knowledge corpus to complement the parametric knowledge in LMs provides a tangible solution to these problems. However, the generation quality of RAG is highly dependent on the relevance between a user's query and the retrieved documents. Inaccurate responses may be generated when the query is outside of the scope of knowledge represented in the external knowledge corpus or if the information in the corpus is out-of-date. In this work, we establish a statistical framework that assesses how well a query can be answered by an RAG system by capturing the relevance of knowledge. We introduce an online testing procedure that employs goodness-of-fit (GoF) tests to inspect the relevance of each user query to detect out-of-knowledge queries with low knowledge relevance. Additionally, we develop an offline testing framework that examines a collection of user queries, aiming to detect significant shifts in the query distribution which indicates the knowledge corpus is no longer sufficiently capable of supporting the interests of the users. We demonstrate the capabilities of these strategies through a systematic evaluation on eight question-answering (QA) datasets, the results of which indicate that the new testing framework is an efficient solution to enhance the reliability of existing RAG systems.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。