TL;DR
When augmenting search queries, using a powerful Large Language Model (LLM) to simply guess what a relevant document looks like often performs as well as—or better than—fine-tuning a smaller model with complex Reinforcement Learning (RL). By combining the best of both worlds, a new hybrid method called On-policy Pseudo-document Query Expansion (OPQE) trains an LLM to generate optimized pseudo-documents, delivering state-of-the-art retrieval performance across diverse benchmarks.
What Problem Does This Paper Address?
In many real-world Information Retrieval (IR) and Retrieval-Augmented Generation (RAG) systems, you cannot modify the underlying search engine or vector database directly (e.g., when using proprietary APIs like OpenAI's embeddings). To improve search results, you have to optimize from the query side.
Two popular paradigms have emerged for this:
- Prompting-based methods: Asking a powerful LLM to generate a hypothetical answer or "pseudo-document" to expand the query (e.g., HyDE). This requires no training but can introduce irrelevant words (spurious terms) that confuse traditional keyword search engines.
- RL-based methods: Fine-tuning a smaller LLM using reinforcement learning to rewrite queries, directly optimizing for retrieval metrics like Recall or NDCG. This is highly targeted but incredibly resource-intensive.
Until now, these two approaches hadn't been compared under consistent, fair conditions. This paper introduces a "compute-aware" comparison—acknowledging that RL invests compute at training time to specialize a small model, while prompting invests compute at inference time by using a larger, more capable model.
Methods
The authors evaluate three primary approaches:
- SPQE (Simple Pseudo-document Query Expansion): A zero-shot prompting baseline where a capable LLM generates a hypothetical document ($d^H$) answering the user's query ($q$). The final search query is simply the concatenation of the two: $(q, d^H)$.
- DeepRetrieval (DR): A standard RL baseline that uses Proximal Policy Optimization (PPO) to train an LLM to output a chain of reasoning followed by a short, rewritten query.
- OPQE (On-policy Pseudo-document Query Expansion): The authors' novel hybrid approach. Instead of training the LLM to rewrite a short query, OPQE uses PPO to train the model to generate a pseudo-document. The reward signal comes directly from how well that generated document performs when fed into the retriever. This merges the rich, generative structure of prompting with the targeted optimization of RL.
Datasets
The methods were systematically evaluated across three distinct retrieval task families:
- Evidence-Seeking Retrieval: Wikipedia-18 corpus evaluated using Natural Questions (NQ), TriviaQA, and SQuAD.
- Ad Hoc Retrieval: Eight diverse datasets from the BEIR benchmark, including MS MARCO, DL19, DL20, FEVER, HotpotQA, NFCorpus, SciFact, and FiQA.
- Tool Retrieval: The ToolRet dataset (splits: Web, Code, Customized), which tests an agent's ability to find the right API/tool from a massive catalog.
Key Insights and Ideas
- Test-Time Compute Can Beat Training-Time Fine-Tuning: Under a fair compute budget, zero-shot prompting with a larger, capable model (like GPT-4o-mini or Qwen3-32B) frequently outperforms a smaller 3B or 7B model specialized via expensive RL training.
- The Power of Format Alignment: Dense retrievers (vector databases) are typically pre-trained on passage-level text using contrastive learning. Because of this, a well-structured pseudo-document naturally aligns much better with the retriever's expected input distribution than a short, rewritten query.
- RL Elicits Rather Than Acquires: The authors observe that RL doesn't necessarily teach the model how to search from scratch. Instead, framing the task as pseudo-document generation gives the model a high-reward "warm start," allowing RL to simply refine and adapt the model's latent knowledge to the quirks of a specific retriever.
Key Results
The comprehensive evaluation highlighted a clear shift in performance depending on the method and retriever type:
- Sparse Retrieval (BM25): Simple prompting (SPQE) consistently dominated, achieving the highest average scores on both evidence-seeking (78.2) and ad hoc (51.6) tasks.
- Dense Retrieval: The hybrid OPQE method shined here. OPQE-7B achieved the highest average score of 58.1 on ad hoc retrieval, outperforming both standard DeepRetrieval (57.5) and standalone prompting (56.6).
- Overall Ranking: When aggregating performance across all tasks using a Borda count, prompting with strong LLMs took the top spots, while the hybrid OPQE provided the best fine-tuning framework.
The detailed breakdown of these results across datasets can be seen in the paper's main evaluation tables:
Limitations and Future Work
While OPQE proves highly effective, the authors note a few limitations:
- Compute Constraints: The RL training was restricted to relatively lightweight policy models (<7B parameters).
- Dataset Specialization: The RL models were trained separately for each dataset, leaving the question of cross-domain transfer open.
- Confounding Factors: In OPQE, output length, formatting, and content are tightly coupled, making it difficult to isolate exactly why the document-style format yields such high gains.
For future work, the authors suggest exploring off-policy preference tuning (like DPO) to reduce training costs, allowing the policy to dynamically learn its own optimal output format, and embedding OPQE into multi-turn, agentic search loops.
Summary updated