Query Completion Using Bandits for Engines Aggregation

Audrey Durand, Jean-Alexandre Beaumont, Christian Gagné, Michel Lemay, Sébastien PaquetarXiv 2017

Introduction

Query auto-completion (QAC) is a ubiquitous feature in modern search bars, providing users with suggested queries as they type. Despite its prevalence, building a single, "perfect" QAC engine is difficult because users provide a wide array of signals—ranging from anonymous browsing patterns to deep personal search histories. Traditionally, engineers attempt to build monolithic models to synthesize these signals. However, ranking suggestions from disparate strategies (e.g., popularity-based vs. history-based) remains a significant hurdle. This paper explores an alternative: treating various QAC strategies as a "mixture of experts" and employing reinforcement learning to select the most effective ones in real-time.

Methodology: QAC as a Multi-Armed Bandit Problem

The researchers frame the aggregation of QAC engines as a Multi-Armed Bandit (MAB) problem. In this framework, each completion engine represents an "arm," and a user click constitutes a "reward." The system utilizes Thompson Sampling to maintain and update a probability distribution of each engine's success rate based on real-time user interactions.

The study evaluates four primary bandit strategies:

  1. Ranked Bandits: Each of the $M$ positions in the suggestion list is treated as an independent bandit problem.
  2. Cascade Bandits: A single bandit manages the entire list, operating under the assumption that users scan from top to bottom and stop at the first relevant suggestion.
  3. Explicit Variants (Explicit Ranked/Cascade): These models account for the fact that if two engines suggest the same query, the lower-ranked engine must provide its next-best alternative. Explicit models track performance based on the specific rank of the suggestion provided by an engine.

Experimental Setup

The approach was tested on three real-world datasets from Coveo, representing diverse search environments over one month:

  • Dataset 1: Low-traffic (~13k queries/month).
  • Dataset 2: High-traffic (~1.2M queries/month) with long queries.
  • Dataset 3: High-traffic (~1.1M queries/month) with short queries.

The performance was compared against a "Basic" engine currently in production.

Key Insights: The Power of Diversity

A central finding is that a mixture of simple, specialized engines can outperform a single, highly-tuned monolithic model. By combining engines that leverage different data types, the system offers a more diverse and relevant set of suggestions.

Figure 1: Click distribution across different mixtures for Dataset 1 and Dataset 3. The red dots indicate the performance of the baseline engine.

As shown in Figure 1, there is a wide variance in performance across different engine mixtures. The "Explicit" variants proved particularly effective, highlighting that an engine's value is not static but depends on its position and whether it is forced to provide secondary suggestions to avoid duplication.

Results and Discussion

The bandit strategies demonstrated substantial improvements over the baseline in most scenarios.

Table 1: Performance comparison of different bandit strategies across three datasets.

The Cascade Explicit strategy emerged as the top performer, yielding a 48.38% increase in clicks for Dataset 1 and a 12.45% increase for Dataset 2. Interestingly, even a "Random" mixture of engines outperformed the baseline on the low-traffic dataset, suggesting that simply introducing diversity provides immediate user value.

However, Dataset 3 presented a unique challenge: none of the bandit strategies surpassed the baseline. The authors attributed this to a significant data bias, as Dataset 3 was originally generated by the baseline engine itself, creating a feedback loop that favored the status quo.

Conclusion and Future Work

This research demonstrates that online learning via multi-armed bandits is a feasible and highly effective method for aggregating QAC engines. The system adapts "on the fly" without requiring extensive pre-training. Future work will focus on live A/B testing to mitigate offline evaluation bias, explicitly modeling position bias, and incorporating contextual bandits to further personalize suggestions based on user location or device type.

Summary updated

BibTeX
@misc{durand2017query,
  author = {Audrey Durand and Jean-Alexandre Beaumont and Christian Gagné and Michel Lemay and Sébastien Paquet},
  title = {{Query Completion Using Bandits for Engines Aggregation}},
  year = {2017},
  eprint = {1709.04095},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1709.04095},
}
Figure