Table of Contents
Fetching ...

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.

Unifying Ranking and Generation in Query Auto-Completion via Retrieval-Augmented Generation and Multi-Objective Alignment

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.
Paper Structure (32 sections, 6 equations, 4 figures, 3 tables)

This paper contains 32 sections, 6 equations, 4 figures, 3 tables.

Figures (4)

  • Figure 1: Illustrative QAC results in a mobile application search system. Left: for the prefix "apps take me to the moo", our generative QAC approach infers the user's intent to explore moon-related experiences and surfaces grounded alternatives such as VR simulations and space exploration apps, rather than hallucinating impossible "go to the moon" apps. Right: for the sensitive prefix "i feel deep depression", the system produces safe, supportive suggestions that encourage help-seeking (e.g., mental health support, crisis hotlines) and avoid harmful content.
  • Figure 2: Overall RAG-based architecture for generating query auto-complete suggestions. Given a user prefix, the system retrieves information from multiple sources (query and search index, catalog, and query logs) to construct a prompt containing query candidates and relevant items with their features, which is then fed to the Generator to generate the final suggestions.
  • Figure 3: Training pipeline for the Generator model. (a) Critique-and-revision: a teacher LLM generates initial suggestion lists, which are iteratively refined based on feedback from a critic LLM to produce high-quality synthetic data. (b) Supervised Fine-Tuning (SFT): the Generator is trained on a mixture of human-labeled and synthetic examples. (c) Verifier training: rule-based, model-based, and LLM-as-judge verifiers are trained or defined for relevance, safety, catalog and context groundedness, engagement, diversity, and format. (d) Direct Preference Optimization (DPO): the SFT-trained Generator produces suggestion lists that are scored by the verifier suite; preference pairs constructed from the composite reward $R(p,S)$ are used to align the Generator with the multi-objective utility.
  • Figure 4: Hybrid serving architecture. Frequently requested prefixes are pre-generated offline by the Large Generator and stored in a prefix cache that the QAC service queries first, serving most requests without online model latency. Cache misses trigger real-time retrieval and generation with the Compact Generator via the Retrieval and Context Builder, ensuring coverage for long-tail and emerging prefixes.