Unifying Ranking and Generation in Query Auto-Completion via Retrieval-Augmented Generation and Multi-Objective Alignment
Kai Yuan, Anthony Zheng, Jia Hu, Divyanshu Sheth, Hemanth Velaga, Kylee Kim, Matteo Guarrera, Besim Avci, Xuetao Yin, Rajyashree Mukherjee, Sean Suchter
TL;DR
This work addresses the limitations of traditional retrieve-and-rank QAC and ungrounded generative approaches by formulating QAC as end-to-end list generation grounded in retrieved context through Retrieval-Augmented Generation (RAG). It introduces multi-objective Direct Preference Optimization (DPO) guided by a verifier suite spanning relevance, safety, engagement, catalog groundedness, context groundedness, and diversity, with an iterative critique–revision data-generation process. A hybrid serving architecture combines offline pre-generation with online real-time generation to meet strict latency requirements. Across offline, human, and online evaluations in a large-scale production setting, the approach yields improvements in relevance and groundedness while reducing unsafe content, and translates to reduced keystrokes and higher adoption in practice. The framework is production-validated and generalizable to other domains requiring safe, grounded, and diverse query suggestions over large catalogs.
Abstract
Query Auto-Completion (QAC) suggests query completions as users type, helping them articulate intent and reach results more efficiently. Existing approaches face fundamental challenges: traditional retrieve-and-rank pipelines have limited long-tail coverage and require extensive feature engineering, while recent generative methods suffer from hallucination and safety risks. We present a unified framework that reformulates QAC as end-to-end list generation through Retrieval-Augmented Generation (RAG) and multi-objective Direct Preference Optimization (DPO). Our approach combines three key innovations: (1) reformulating QAC as end-to-end list generation with multi-objective optimization; (2) defining and deploying a suite of rule-based, model-based, and LLM-as-judge verifiers for QAC, and using them in a comprehensive methodology that combines RAG, multi-objective DPO, and iterative critique-revision for high-quality synthetic data; (3) a hybrid serving architecture enabling efficient production deployment under strict latency constraints. Evaluation on a large-scale commercial search platform demonstrates substantial improvements: offline metrics show gains across all dimensions, human evaluation yields +0.40 to +0.69 preference scores, and a controlled online experiment achieves 5.44\% reduction in keystrokes and 3.46\% increase in suggestion adoption, validating that unified generation with RAG and multi-objective alignment provides an effective solution for production QAC. This work represents a paradigm shift to end-to-end generation powered by large language models, RAG, and multi-objective alignment, establishing a production-validated framework that can benefit the broader search and recommendation industry.
