Introduction
In the realm of web search and information retrieval, users frequently provide short, underspecified, or ambiguous queries. Query Expansion (QE) is the traditional remedy for this problem, aiming to augment the original query with relevant terms to improve retrieval accuracy. While Large Language Models (LLMs) have revolutionized this field through methods like HyDE (Hypothetical Document Embeddings), they often suffer from "narrow vision." These models tend to generate expansions based solely on their internal training data, frequently missing the specific nuances or alternative interpretations present in the actual document collection.
To bridge the gap between a model's internal knowledge and the reality of the searchable data, we present ThinkQE. This novel framework leverages the "thinking" capabilities of reasoning-focused LLMs and an iterative feedback loop to evolve query expansions dynamically.
The ThinkQE Framework
ThinkQE departs from static, single-shot expansion methods by introducing two core innovations: thinking-based reasoning and iterative corpus interaction.
1. Thinking-Based Expansion
Instead of prompting an LLM to immediately produce expansion terms, ThinkQE utilizes reasoning-centric models (such as R1-distilled versions of Qwen or Phi). These models are directed to undergo an explicit "Thinking Phase" before generating the final expansion. During this phase, the model identifies latent concepts, resolves potential ambiguities, and plans the expansion strategy. This process ensures that the resulting terms are the product of deliberate reasoning rather than simple probabilistic word association.
2. Evolving Corpus Interaction
ThinkQE treats query expansion as a multi-stage dialogue between the model and the search index. The process follows an iterative loop:
- Initial Retrieval: A baseline search is performed using a standard retriever (e.g., BM25) to gather an initial set of documents.
- Reasoning and Refinement: The LLM "thinks" about the original query in the context of these retrieved documents. This allows the model to learn from the corpus, identifying which facets of the query are well-represented and which require further clarification.
- Iterative Expansion: New terms are generated and added to the query. To maintain focus and prevent "topic drift," the original query is repeated multiple times in the final expanded version.
- Redundancy Filtering: To ensure the search continues to discover new information, documents encountered in previous rounds are filtered out of the feedback loop, forcing the model to explore new facets of the information need.
Experimental Evaluation
The framework was rigorously tested across several diverse benchmarks to evaluate its versatility and depth:
- Factoid Retrieval: Evaluated on TREC DL19 and DL20 (MS MARCO collection).
- Reasoning-Oriented Retrieval: Tested on the BRIGHT benchmark, covering complex domains such as Biology, Robotics, and Economics.
- Domain-Specific Tasks: Validated using TREC-Covid and Scifact for scientific claim verification.
Key Insights
- The Value of "Thinking": Comparative analysis shows that models explicitly allowed to "think" significantly outperform "NoThinking" variants. The reasoning step is crucial for capturing the subtle intent behind complex queries.
- Iteration vs. Parallelism: The researchers found that iterative feedback is superior to simply generating multiple expansions in parallel. The "evolving" context provided by the corpus at each step is essential for refining the search intent.
- Zero-Shot Superiority: Despite being a zero-shot framework that requires no task-specific training, ThinkQE consistently outperforms supervised dense retrievers (like DPR and ANCE) that were trained on millions of query-document pairs.
Results and Performance
ThinkQE established new benchmarks for zero-shot query expansion. On the TREC DL19 and DL20 datasets, it achieved 68.8 and 64.7 nDCG@10, respectively. In the reasoning-heavy BRIGHT benchmark, it maintained an average nDCG@10 of 36.0 across seven domains, outperforming existing LLM-based methods like HyDE and LameR.
While the iterative nature of ThinkQE introduces higher latency compared to single-shot methods, it remains significantly more efficient than "listwise rerankers." It offers a compelling middle ground: providing the high accuracy of complex reranking with the broad reach of query expansion.
Conclusion and Future Directions
ThinkQE demonstrates that query expansion is most effective when it is a dynamic, reasoning-driven process. By allowing LLMs to "think" and interact with the corpus, the framework overcomes the limitations of static expansion. Future work will focus on reducing the latency of the iterative process and expanding the framework's capabilities to multilingual and highly structured symbolic domains, such as mathematics and source code retrieval.
Summary updated