[Paper Review] Optimizing Query Generation for Enhanced Document Retrieval in RAG
This paper proposes QOQA, a query optimization framework that enhances document retrieval in Retrieval-Augmented Generation (RAG) by refining queries using LLMs and a top-k averaged query-document alignment score. By iteratively rephrasing queries based on retrieved documents and alignment scores, QOQA improves retrieval precision, achieving a 1.6% average accuracy gain across datasets, thereby reducing hallucinations in LLM-generated responses.
Large Language Models (LLMs) excel in various language tasks but they often generate incorrect information, a phenomenon known as "hallucinations". Retrieval-Augmented Generation (RAG) aims to mitigate this by using document retrieval for accurate responses. However, RAG still faces hallucinations due to vague queries. This study aims to improve RAG by optimizing query generation with a query-document alignment score, refining queries using LLMs for better precision and efficiency of document retrieval. Experiments have shown that our approach improves document retrieval, resulting in an average accuracy gain of 1.6%.
Motivation & Objective
- To address hallucinations in RAG systems caused by vague or ambiguous queries.
- To improve the precision and efficiency of document retrieval by refining query generation.
- To reduce reliance on ambiguous original queries through iterative query optimization using LLMs.
- To enhance retrieval performance using a query-document alignment score for query refinement.
- To demonstrate that query optimization significantly improves retrieval accuracy in diverse retrieval benchmarks.
Proposed method
- The method uses a retriever to fetch top-N documents for an original query.
- It concatenates the original query with the top-N documents and inputs them into an LLM to generate R₀ rephrased queries.
- Each rephrased query is scored for alignment with retrieved documents using a retrieval model, and the top-K queries are selected based on average alignment scores.
- The prompt template is dynamically updated to include the original query, retrieved documents, and top-K rephrased queries for iterative optimization.
- Optimization proceeds over up to 50 iterations, with each step refining the query using the latest alignment scores.
- The approach integrates both sparse (BM25) and dense (BGE-base-en-v1.5) retrieval models, with ablation studies validating component contributions.
Experimental results
Research questions
- RQ1Can iterative query optimization using LLMs and alignment scores improve retrieval precision in RAG systems?
- RQ2How does query expansion using retrieved documents affect retrieval performance compared to direct query rephrasing?
- RQ3To what extent does query optimization reduce hallucinations in LLM-generated responses by improving retrieval quality?
- RQ4What is the relative contribution of the expansion and optimization components in the QOQA framework?
- RQ5Does the proposed method generalize across different retrieval models and benchmark datasets?
Key findings
- QOQA achieved an average accuracy gain of 1.6% across multiple retrieval benchmarks, demonstrating consistent improvement.
- On the SciFact dataset, QOQA (BM25 score) achieved an nDCG@10 of 75.4, outperforming baseline models.
- The ablation study showed that removing the expansion component caused a significant drop in performance, especially with BM25 scoring.
- The optimization step alone improved retrieval performance, indicating that iterative refinement enhances query quality.
- Case studies confirmed that QOQA-generated queries included more precise keywords (e.g., 'nano', 'molecular evidence'), increasing alignment with relevant documents.
- The method demonstrated strong performance across both sparse and dense retrieval settings, validating its robustness.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.