TL;DR
When a search bar suggests queries before you even start typing, those suggestions are usually trained to look clickable—not necessarily to return great results. This paper flips that script by training a small language model with reinforcement learning directly against a live production search engine. By rewarding suggested queries for the actual games they surface in a user's future play history, the system boosts both individual query effectiveness and overall set coverage by nearly 10%, without sacrificing readability.
What Problem Does This Paper Address?
Imagine opening a massive online gaming platform. Before you type a single letter into the search bar, it offers a few personalized suggestions—like "co-op survival" or "racing with friends"—based on what you’ve been playing lately.
In industry, these pre-search query suggestion models are typically trained on signals defined on the queries themselves, such as predicted click-through rates. But an appealing query that returns mediocre or irrelevant search results is a dead end. Prior attempts to incorporate search outcomes either ranked static, logged query candidates or tested a single query against an offline sandbox. The authors tackle a more practical, end-to-end question: Can we train a generative model to produce a set of personalized queries by plugging it directly into the production search engine?
Methods
The authors frame query suggestion as an on-policy reinforcement learning (RL) problem, using a small instruction-tuned LLM (Gemma-4-E2B-IT, ~2B effective parameters) as the policy and the production search engine as a black-box environment.
Given a user's play history over the past 14 days (game titles, overviews, play duration, and whether they played solo or with others), the model generates a set of query suggestions $Q = \{q_1, \dots, q_m\}$. Each query is executed on the production search engine, which returns its top-100 results. These results are then compared against the games the user actually plays over the next 7 days (a proxy for their upcoming interests).
To make sure the suggestions are both individually strong and collectively diverse, the authors design two complementary rewards:
- Query-level reward ($r^q$): The average recall of each individual query's search results against the user's future plays. Adding a weak query drags this down.
- Set-level reward ($r^{\text{set}}$): The recall of the union of all queries' search results against future plays. This encourages queries to complement each other rather than surface the same games.
Because the two rewards operate on different scales, summing them naively would let one dominate. Following GDPO (Group-wise Decoupled Policy Optimization), the authors standardize each reward separately within a group of sampled rollouts before combining them, alongside a KL-divergence penalty to keep the model from drifting too far from its initial phrasing.
Datasets
The authors collected six months (26 consecutive weeks) of anonymized gameplay logs from 15,000 users on a large-scale online gaming platform in 2026. To mirror real-world deployment—where models must generalize to new users and future catalog trends—the data is split disjointly by both user and time:
- Train: 10,000 users, Weeks 1–13 (21,185 instances)
- Validation: 2,000 users, Weeks 14–17 (1,440 instances)
- Test: 3,000 users, Weeks 18–26 (4,430 instances)
Each instance pairs a 14-day input window with a 7-day target window, sliding by one week. Roughly three-quarters of the games in the target window are new to the user (absent from their input window).
Key Insights and Ideas
- Query-level and set-level rewards do different jobs: Optimizing only for individual query quality ($r^q$) makes each query better at surfacing relevant games, but it barely moves the needle on set-level coverage. You only get a comprehensive set of suggestions when you explicitly reward the union of their results ($r^{\text{set}}$).
- Longer, more specific queries emerge naturally: Without any explicit length penalty or formatting rule, RL training nudged the model toward slightly more specific phrasings—for example, increasing the share of three-word queries from 37.6% to 42.1%.
- RL doesn't break readability: A common fear with optimizing black-box retrieval rewards is that the LLM will invent gibberish "search-engineese." An LLM judge (
gpt-4o-mini) checking for disfluent, malformed, or repeated queries flagged zero sets from the final model trained with both rewards.
Key Results
Evaluated on unseen users in later time periods, the RL-trained models significantly outperformed the initial Base model (as well as Popular and Shuffled controls):
- Per-query effectiveness ($+r^q$): Raised Hit@10 from 16.8 to 18.4 (+9.5%), Recall@10 from 3.00 to 3.34 (+11.3%), and NDCG@10 by +10.8%. Gains were largest at small cutoffs ($K=10$), which matters most since users rarely scroll past the top results.
- Set-level coverage ($+r^q, r^{\text{set}}$): Raised Set Recall@10 from 16.8 to 18.4 (+9.5%) while largely retaining the per-query gains. Even when controlling for the slightly larger number of queries generated (+0.8 queries per set on average), the set-level gain held up.
- Practical throughput: Because pre-search suggestions can be precomputed in batches, throughput is key. On a single A100 80GB GPU, the final 2B model processes 15.52 users/second at 128 concurrent requests—meaning it could refresh suggestions for 100 million users in about 18 hours on 100 GPUs.
Limitations and Future Work
- Offline proxy vs. live users: While all queries were executed on the live production search engine, user interest was measured offline via future plays and searches. Running an online A/B test is the natural next step to measure direct user engagement.
- Active-user focus: The current setup evaluates users who were active in both the input and target windows; extending this to cold-start or returning users would broaden its reach.
- Hybrid signals: Combining search-result rewards with traditional query-level engagement signals (like predicted clicks) remains an open and promising direction.
Summary updated