Abstract
Neural Information Retrieval (NIR) models rely on large-scale labeled datasets, which are costly to produce manually. Synthetic query generation (QGen) offers a scalable alternative, but traditional pipelines like InPars suffer from high waste, often discarding up to 90% of generated data due to low quality. We introduce InPars+, which enhances QGen efficiency and quality through Contrastive Preference Optimization (CPO) and dynamic Chain-of-Thought (CoT) prompting via the DSPy framework. Our results demonstrate that InPars+ can achieve state-of-the-art retrieval performance with significantly less synthetic data, reducing the computational burden of the filtering bottleneck.
Introduction
Modern search engines powered by Neural Information Retrieval (NIR) require vast amounts of query-document pairs for training. Human annotation is prohibitively expensive and slow. To address this, frameworks like InPars utilize Large Language Models (LLMs) to generate synthetic queries from documents. However, these "generate-and-filter" pipelines are highly inefficient; the "filtering bottleneck" often results in discarding the vast majority of generated queries to maintain training set quality. InPars+ aims to solve this by improving the generator's inherent ability to produce high-quality, relevant queries from the outset.
Methodology
The InPars+ framework introduces two primary innovations to the standard QGen pipeline: Contrastive Preference Optimization and Dynamic Prompting.
Contrastive Preference Optimization (CPO)
To refine the generator, we employ a teacher-student distillation approach using CPO. A larger "teacher" model (Llama 3.1 70B) generates high-quality reference queries. A smaller "student" model (Llama 3.1 8B) is then fine-tuned using triplets consisting of a document, a teacher-generated query, and a student-generated query. A preference-based loss function encourages the student to align its output with the teacher's while actively avoiding lower-quality "distractor" queries.
Dynamic Prompting with DSPy
Unlike traditional pipelines that use static prompt templates, InPars+ leverages the DSPy framework to implement Chain-of-Thought (CoT) reasoning. By forcing the LLM to analyze a document's key points and reason through its content before formulating a query, the system produces more nuanced and relevant training data. This approach is further bolstered by targeted prompt templates that provide in-distribution examples.
Experimental Results
We evaluated InPars+ across several benchmarks, including MS MARCO, SciFact, and the BEIR suite.
Performance and Efficiency
A key finding is the significant improvement in data efficiency. By utilizing CoT reasoning, InPars+ achieves retrieval performance comparable to the original InPars-V2 while requiring only 25% of the synthetic data. This suggests that the "reasoning" step provides a much denser training signal for the downstream retriever.
Domain Generalization
InPars+ showed remarkable gains on specialized datasets. On the Arguana counter-argument retrieval task, the CoT approach improved nDCG@10 from 0.126 to 0.368—a 24-point leap over the base Llama model. Furthermore, the fine-tuned 8B student model often outperformed the raw 70B teacher model on downstream tasks, highlighting the effectiveness of task-specific optimization.
Discussion and Conclusion
While InPars+ significantly reduces the filtering ratio and improves query quality, it introduces some computational overhead per query due to the extended reasoning steps. Additionally, we observed instances where CoT caused models to focus on peripheral rather than central document concepts. Future work will explore more sophisticated evaluation metrics to better identify "useful" training data and refine the CPO process to encourage even more central query generation. In summary, InPars+ represents a major step toward more efficient and effective synthetic data pipelines for information retrieval.
Summary updated