DMQR-RAG: Diverse Multi-Query Rewriting in Retrieval-Augmented Generation

Zhicong Li, Jiahao Wang, Hangyu Mao, ZhiShu Jiang, Zhongxia Chen, Du Jiazhen, Fuzheng Zhang, Di Zhang, Yong LiuSubmission to ICLR 2025 · Withdrawn

TL;DR

DMQR-RAG introduces an information-diversity framework for query rewriting in Retrieval-Augmented Generation (RAG). By applying four complementary rewriting strategies—spanning information expansion, reduction, and preservation—paired with an adaptive selection mechanism, it achieves higher retrieval recall and answer accuracy while cutting unnecessary search queries by nearly 40%.

What Problem Does This Paper Address?

In standard RAG pipelines, user queries are frequently noisy, ambiguous, or overly verbose. If a retriever searches only with the raw query, it often misses pertinent documents.

Existing query rewriting approaches face clear trade-offs:

  • Single-query rewriting (prompt-based or fine-tuned) risks hallucination and generates a single perspective, yielding low recall for diverse documents.
  • Naive multi-query rewriting (such as RAG-Fusion) typically generates near-identical paraphrases, retrieving redundant documents without adding genuine diversity.
  • Uncontrolled multi-query expansion bloats downstream context with irrelevant documents (noise), confusing both rerankers and the final generator.

DMQR-RAG tackles these challenges by asking: How can we rewrite queries with systematically varied quantities of information, and how can we adaptively pick only the strategies each query needs?

Methods

DMQR-RAG structures query rewriting across the information spectrum and pairs it with a dynamic selector:

  1. Four Information-Level Rewriting Strategies:
  2. Information Equality:
    • General Query Rewriting (GQR) denoises user input while preserving core intent.
  3. Keyword Rewriting (KWR) extracts essential keywords, entities, and subjects to align with search engine indexing preferences.
  4. Information Expansion: Pseudo-Answer Rewriting (PAR) prompts an LLM to generate a hypothetical answer (akin to HyDE), bridging the semantic vocabulary gap between questions and authoritative answers.
  5. Information Reduction: Core Content Extraction (CCE) strips extraneous details and subclauses from overly long or conversational queries.
  6. Query Retention: The original user query ($q$) is always preserved alongside the rewrites.
  7. Adaptive Strategy Selection: Instead of running all four rewrites indiscriminately, DMQR-RAG uses few-shot prompting with strategy descriptions to instruct an LLM to evaluate the query, select a minimal subset of appropriate rewriting strategies, and explain its choice.

  8. Standardized Retrieval & Reranking Pipeline: Each chosen rewritten query independently retrieves documents via Bing search. Candidate documents are aggregated, deduplicated, reranked with a cross-encoder (BAAI-BGE-reranker), and the top 5 documents are passed to the generator LLM.

Datasets

The authors evaluated DMQR-RAG on three public academic benchmarks:

  • AmbigNQ: Open-domain QA featuring inherently ambiguous questions requiring multi-faceted retrieval.
  • HotpotQA: Multi-hop reasoning questions requiring retrieval across interconnected documents.
  • FreshQA: Dynamic, time-sensitive questions requiring up-to-date real-world facts.

Additionally, the authors evaluated the framework in an industrial production deployment using real-world user queries drawn from a pool of 15 million online users.

Key Insights and Ideas

  • Information-level diversity beats linguistic paraphrasing: Rather than generating slightly reworded versions of the same sentence, altering the amount of information (expanding with hypothetical answers vs. compressing into keywords) retrieves genuinely orthogonal documents.
  • Pseudo-Answers are the most impactful: In ablation tests, removing Pseudo-Answer Rewriting (PAR) caused the steepest drop in precision (P@5 dropped by 1.34%), proving that hallucinated or partial answers still provide strong semantic scaffolds for search engines.
  • More queries $\neq$ better answers: Running all four rewriting strategies on every query actually degraded accuracy on FreshQA by pulling in too much off-topic noise.
  • Dynamic selection follows a natural sweet spot: The adaptive selector reduced the average number of generated rewrites from 4 down to ~2.46 (a ~40% reduction). Query counts followed a Gaussian distribution centered around 2–3 rewrites, effectively pruning retrieval noise while improving response accuracy.

Key Results

  • Academic Benchmarks:
  • On FreshQA, DMQR-RAG (with GPT-4) reached 76.67% accuracy and 60.03% P@5, outperforming vanilla RAG-Fusion (74.50% Acc, 60.00% P@5) and standard LLM Rewrite (70.83% Acc, 44.61% P@5).
  • On AmbigNQ, DMQR-RAG attained 62.43% P@5 (a ~9% absolute gain over RAG-Fusion's 53.62%) and 55.24 EM.
  • On HotpotQA, it achieved 54.18% H@5 and 41.12 EM, outperforming single-query methods and remaining competitive with models trained exclusively on multi-hop tasks (e.g., RQ-RAG's 40.32 EM).
  • Model Generalization: When implemented using open-source models (Llama3-8B and Qwen2-7B), the framework consistently outperformed baseline single-rewrite methods. Adaptive selection improved Llama3-8B's FreshQA accuracy by +2.17% over using all four static rewrites.
  • Real-World Industrial Deployment: Evaluation across 15 million user queries showed a 2.0% average lift in H@5, a 10.0% lift in P@5, and significant gains in answer Correctness and Relevance without degrading faithfulness or readability.

Limitations and Future Work

  • Specialized Multi-Hop Queries: While competitive, DMQR-RAG is slightly behind heavily fine-tuned, multi-hop-specific architectures (such as RQ-RAG) on complex multi-step reasoning.
  • Future Directions: The authors plan to extend the strategy pool by incorporating explicit sub-query decomposition for multi-hop queries, integrating supervised/reinforcement-learned rewriting modules, and refining the prompt-based adaptive selector.

Summary updated

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.
BibTeX
@misc{li2024dmqr,
  author = {Zhicong Li and Jiahao Wang and Hangyu Mao and ZhiShu Jiang and Zhongxia Chen and Du Jiazhen and Fuzheng Zhang and Di ZHANG and Yong Liu},
  title = {{DMQR-RAG: Diverse Multi-Query Rewriting in Retrieval-Augmented Generation}},
  year = {2024},
  eprint = {2411.13154},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2411.13154},
}

Loading related content...

Figure