DMQR-RAG: Diverse Multi-Query Rewriting for RAG

Zhicong Li,Jiahao Wang,Zhishu Jiang,Hangyu Mao,Zhongxia Chen,Jiazhen Du,Yuanxing Zhang,Fuzheng Zhang,Di Zhang,Yong Liu
2024-11-20
Abstract:Large language models often encounter challenges with static knowledge and hallucinations, which undermine their reliability. Retrieval-augmented generation (RAG) mitigates these issues by incorporating external information. However, user queries frequently contain noise and intent deviations, necessitating query rewriting to improve the relevance of retrieved documents. In this paper, we introduce DMQR-RAG, a Diverse Multi-Query Rewriting framework designed to improve the performance of both document retrieval and final responses in RAG. Specifically, we investigate how queries with varying information quantities can retrieve a diverse array of documents, presenting four rewriting strategies that operate at different levels of information to enhance the performance of baseline approaches. Additionally, we propose an adaptive strategy selection method that minimizes the number of rewrites while optimizing overall performance. Our methods have been rigorously validated through extensive experiments conducted in both academic and industry settings.
Information Retrieval,Artificial Intelligence
What problem does this paper attempt to address?
### Problems the paper attempts to solve The paper "DMQR - RAG: Diverse Multi - Query Rewriting for Retrieval - Augmented Generation" aims to address the insufficient reliability of large language models (LLMs) when dealing with static knowledge and the problem of hallucination. Specifically, the paper proposes a diverse multi - query rewriting framework named DMQR - RAG to improve document retrieval and final response performance in retrieval - augmented generation (RAG) systems. The main problems include: 1. **Static knowledge and hallucination problems**: - The knowledge within large language models (LLMs) is static and it is difficult to provide up - to - date information in real - time. - LLMs are prone to hallucination when dealing with factual questions, affecting the reliability of the generated answers. 2. **Noise and intent deviation in user queries**: - User queries often contain noise and intent deviation, resulting in the inability to obtain relevant documents through direct retrieval. - Query rewriting is required to improve the relevance of retrieved documents. 3. **Limitations of existing query rewriting methods**: - Existing query rewriting methods usually generate only one rewritten query, lacking diversity, resulting in a narrow range of retrieved documents and low recall rates. - Some methods focus on specific types of queries (such as complex multi - hop or multi - intent queries), limiting their application in general queries. ### Solutions To solve the above problems, the paper proposes the DMQR - RAG framework, which mainly includes the following points: 1. **Diverse multi - query rewriting strategies**: - Four rewriting strategies based on different amounts of information are proposed: general query rewriting (GQR), keyword rewriting (KWR), pseudo - answer rewriting (PAR), and core content extraction (CCE). - Each rewritten query can retrieve different documents, thereby increasing the diversity of retrieved documents and improving the recall rate of relevant documents. 2. **Adaptive rewriting strategy selection method**: - An adaptive rewriting strategy selection method is introduced. It dynamically selects an appropriate rewriting strategy according to the specific query, reducing unnecessary rewriting times and optimizing the overall performance at the same time. - Through lightweight prompts and learning from a small number of examples, the model can select the most appropriate rewriting strategy according to the query type. 3. **Standardized experimental setup**: - In order to fairly compare the effects of the rewriting module, a standardized experimental setup is established. Mainstream retrievers and rerankers are used, and the rewriting effects under different LLMs are evaluated. ### Experimental results The paper has carried out extensive experimental verification through multiple datasets and industry data. The results show that DMQR - RAG outperforms existing rewriting methods in both document retrieval and final response performance. Specifically: - **Document retrieval**: On the FreshQA dataset, the P@5 metric has increased by 14.46%, and in the complex multi - hop questions on the HotpotQA dataset, the performance has improved by approximately 8%. - **Final response**: On the AmbigNQ dataset, the EM and F1 scores have increased by 1.30% and 3.74% respectively, and on the FreshQA dataset, the accuracy has increased by 5.84%. In addition, the paper further verifies the effectiveness of each rewriting strategy and the superiority of the adaptive selection method through ablation studies and evaluations of the adaptive rewriting selection method. In conclusion, through proposing a diverse multi - query rewriting framework and an adaptive strategy selection method, this paper effectively solves the problems of static knowledge and hallucination in LLMs in RAG systems as well as the noise and intent deviation problems in user queries, and significantly improves the performance of document retrieval and final response.