Aligning Web Query Generation with Ranking Objectives via Direct Preference Optimization

João Coelho, Bruno Martins, João Magalhães, Chenyan XiongSIGIR 2025 · OpenReview

Introduction

Modern neural retrievers require vast amounts of query-document pairs for training. While Large Language Models (LLMs) are frequently used to generate synthetic queries, the resulting data is often noisy, containing irrelevant or overly verbose queries. Traditional approaches rely on post-hoc filtering, which discards low-quality data but fails to improve the generator's underlying understanding of what constitutes a "good" search query.

The DPO Alignment Framework

This research introduces a shift from reactive filtering to proactive alignment using Direct Preference Optimization (DPO). The proposed pipeline involves three stages:

  1. Preference Data Collection: A baseline generator (LLaMA-3-7B) produces multiple queries for a document, which are then ranked by a reward model (either a cross-encoder or GPT-3.5).
  2. Direct Preference Optimization: The generator is fine-tuned to prefer higher-ranked queries, effectively learning the characteristics of effective search terms.
  3. Retriever Training: The aligned generator creates high-quality synthetic datasets used to train dense retrievers.

Qualitative Evolution of Queries

A significant finding is the stylistic shift in generated queries. Before alignment, LLMs tend to produce long, conversational questions. Post-DPO, queries become more concise and better reflect actual web search behavior.

Qualitative shift in query style before and after DPO alignment.

This alignment also leads to massive efficiency gains. The "retention rate"—the percentage of queries passing a basic relevance check—increased from 62% to 92%, significantly reducing computational waste during data generation.

Performance Results

The DPO-aligned models demonstrate superior performance across multiple benchmarks, including MS MARCO and TREC-DL. Notably, the GPT-DPO model outperformed significantly larger models and traditional baselines.

Performance comparison across retrieval benchmarks.

As shown in the results, the proposed method achieves state-of-the-art performance in document and passage retrieval tasks, proving that aligning generators with ranking objectives is a powerful alternative to simple data filtering.

Conclusion

By integrating ranking signals directly into the query generation process via DPO, researchers can produce higher-quality synthetic training data more efficiently. This approach not only improves retrieval performance but also aligns AI-generated content with the practical nuances of human search behavior.

Source Citation: Coelho, J., Martins, B., Magalhães, J., & Xiong, C. (2025). Aligning Web Query Generation with Ranking Objectives via Direct Preference Optimization. Proceedings of the 48th International ACM SIGIR Conference on Research and Development in Information Retrieval (SIGIR ’25).

Summary updated

BibTeX
@inproceedings{coelho2025aligning,
  author = {João Coelho and Bruno Martins and João Magalhães and Chenyan Xiong},
  title = {{Aligning Web Query Generation with Ranking Objectives via Direct Preference Optimization}},
  booktitle = {International ACM SIGIR Conference on Research and Development in Information Retrieval},
  year = {2025},
  url = {https://openreview.net/forum?id=cPQ8YaL27O},
}
Figure