Abstract
Training effective neural rankers typically requires vast amounts of labeled query-document pairs, which are costly to obtain through human annotation. While synthetic data generation using Large Language Models (LLMs) has become a popular alternative, traditional methods that generate queries for existing documents often suffer from high lexical overlap and corpus limitations. This paper introduces DocGen, a framework that reverses this paradigm by generating high-quality synthetic documents from real queries. By utilizing Reinforcement Learning (RL) to optimize query highlighting, the DocGen-RL variant significantly improves the relevance of generated documents. Our evaluation across several IR benchmarks shows that DocGen-RL consistently outperforms state-of-the-art synthetic data baselines and rivals the performance of models trained on human-annotated datasets.
Introduction
Neural rerankers like MonoT5 have set new standards in Information Retrieval (IR), but their performance is heavily dependent on the availability of high-quality training data. The common "InPars" approach—generating queries for a given document—faces three primary challenges: high lexical overlap making tasks "too easy," the inability to generate queries for information missing from the corpus, and the inherent "LM Gap" where LLMs are better suited for document generation than short query synthesis.
The DocGen Framework
To address these issues, the authors propose DocGen, a three-stage pipeline designed to leverage the generative strengths of LLMs:
- Query Expansion: Short, keyword-based queries are transformed into descriptive natural language to better activate the LLM’s internal knowledge.
- Query Highlighting: Critical terms in the expanded query are identified and emphasized. A key discovery was that wrapping terms in square brackets (e.g.,
[term]) serves as a powerful prompt, directing the LLM to focus on specific concepts during generation. - Document Generation: The LLM generates a synthetic document based on the expanded and highlighted query.
To further optimize this process, DocGen-RL employs Reinforcement Learning (Proximal Policy Optimization) to train the LLM to highlight queries more effectively. The reward signal is derived from the relevance score of the generated document, as determined by a cross-encoder model. Finally, a consistency filtering step ensures only high-quality pairs are used for training the reranker.
Experimental Results
The framework was evaluated on standard benchmarks including MS MARCO, TREC-DL’20, and the BEIR suite (Natural Questions, HotpotQA, and Fever).
As shown in the results, DocGen-RL consistently outperforms competitive baselines. On the Natural Questions (NQ) dataset, DocGen-RL achieved an nDCG@10 of 0.517, a substantial improvement over the InPars baseline of 0.335. Notably, when scaled to 1 million synthetic pairs, the model's performance on TREC-DL’20 (0.688 nDCG) closely approached that of models trained on human-annotated MS MARCO data (0.714 nDCG).
Key Insights
- LLMs as Knowledge Repositories: The success of DocGen suggests that LLMs can act as compressed versions of the web, allowing for the generation of training data for queries that may not have adequate coverage in existing document collections.
- Prompt Engineering via Brackets: The choice of highlighting characters is crucial. Square brackets
[]were found to be significantly more effective than other symbols, likely due to their prevalence in the pre-training data of models like BLOOM. - Model Size vs. Quality: Interestingly, smaller models like BLOOM-560M often produced cleaner synthetic documents than larger models like LLaMA-7B, which were prone to generating noisy or irrelevant formatting.
Conclusion and Limitations
DocGen-RL represents a significant step forward in synthetic data generation for IR. By aligning the generation task with the natural strengths of LLMs and optimizing the process via RL, the framework provides a scalable alternative to human labeling. However, challenges remain, including the potential for LLM hallucinations and the propagation of inherent biases. Future work will focus on further reducing the computational overhead of the RL training loop and mitigating factual inaccuracies in generated content.
Summary updated