TL;DR
Modern e-commerce search engines are ditching slow, clunky multi-stage pipelines in favor of single-pass generative models—systems that read your query and directly output product IDs. OneSearch-V2 teaches these compact search models to "think" deeply about ambiguous queries and personal user preferences without slowing down live searches by a single millisecond. By distilling explicit LLM reasoning directly into the model's weights as fast "intuition" and aligning it with real-time user clicks, it boosts live order volume by over 2% at zero extra serving cost.
What Problem Does This Paper Address?
Traditionally, searching for a product online triggers a cascade of separate algorithms: recall, relevance filtering, and ranking. Recently, Generative Retrieval (GR) flipped this script. Instead of searching an index, a language model represents every item in a catalog as a hierarchical Semantic ID (SID)—a short sequence of tokens moving from broad categories (e.g., home decor) down to fine attributes (e.g., white ceramic vase)—and generates matching SIDs directly from your query.
While fast and unified, the first generation of industrial generative search (OneSearch-V1) hit three walls:
- Ambiguous queries: If you type "relieve fatigue, no supplements," a single-pass model struggles to bridge the lexical gap to massage guns or bath salts.
- Shallow personalization: If a minimalist shopper searches "seasonal fresh flowers," basic co-occurrence models just regurgitate generic best-selling bouquets instead of reasoning over their aesthetic history.
- Sluggish, biased reward models: Updating the model via reinforcement learning relied on a separately trained reward model refreshed offline. It adapted too slowly to trending queries and suffered from "reward hacking," reinforcing popularity bubbles.
Because live search operates under brutal millisecond latency budgets, you cannot simply ask an LLM to write out a paragraph of Chain-of-Thought (CoT) reasoning before every search.
Methods
OneSearch-V2 solves this latency-versus-intelligence tradeoff through a three-part training pipeline that bakes slow deliberation into fast model weights.
- Offline Keyword-Based CoT: First, a large teacher LLM (Qwen3-32B) analyzes queries and user histories offline, distilling verbose reasoning into dense, personalized keyword sets (e.g., mapping "hotel essentials" to towels, toothbrushes, and slippers).
- Reasoning-Internalized Self-Distillation: Instead of feeding these keywords into the model during live traffic, the authors use an information-asymmetric self-distillation trick. A single model acts as both teacher and student (sharing exact weights). During training, the "teacher" pass sees the user query plus the privileged CoT keywords; the "student" pass sees only the raw query. By forcing the student's output distribution to match the teacher's, the reasoning is compressed directly into the existing weights—zero extra parameters, zero special tokens, and zero inference overhead. Because stripping away keywords makes the loss landscape jagged and brittle, the authors stabilize training using R-Drop (dropout consistency) and FGM (adversarial input perturbations).
- Behavior-Feedback Alignment (TPMA-GRPO): For reinforcement learning, the authors scrap the separate reward model in favor of live, streaming composite rewards (combining relevance tiers, calibrated click-through rates, and actual clicks/orders). Standard RL algorithms like GRPO assign one flat score to an entire generated sequence. Because SIDs are hierarchical, OneSearch-V2 introduces Token-Position Marginal Advantage (TPMA). It evaluates accuracy token-by-token and uses a prefix gate: if the model guesses the coarse category wrong at token 1, the gate shuts off gradients for fine-grained attribute tokens 4 and 5, creating a natural coarse-to-fine curriculum.
Datasets
The system was trained and evaluated on proprietary, industrial-scale logs from a commercial mall search platform (Kuaishou):
- Training set: Three months of historical clicked and purchased
<query, item>pairs. - Offline test set: A full day of recent search logs comprising 30,000 page views, 30,000 clicks, and 7,229 orders. No new public benchmarks were introduced.
Key Insights and Ideas
- Explicit CoT breaks small generative retrievers: Asking a compact backbone (like BART-B) to explicitly generate text keywords before generating discrete item SIDs caused performance to completely collapse—order Hit Rate@10 plummeted from 0.2046 down to 0.0898. Mixing text and discrete IDs overwhelms small models; internalizing reasoning into weights avoids this bottleneck entirely.
- The student beats the keyword-fed teacher: Counterintuitively, the self-distilled student (operating without keywords at test time) slightly outperformed a baseline model that was explicitly fed LLM keywords at test time (0.2163 vs. 0.2139 order HR@10). Explicit keywords have bounded coverage (missing valid items outside the LLM's list), whereas weight-internalized intuition generalizes across the whole catalog.
- Hierarchy demands position-aware credit: Treating a wrong category token the same as a wrong color token muddies RL training. Gating gradients based on prefix correctness stabilizes training without needing standard PPO/GRPO gradient clipping.
Key Results
Across offline benchmarks (using a BART-B backbone) and live production A/B tests against OneSearch-V1, every module contributed steady gains:
- Offline accuracy & validity: Full OneSearch-V2 (combining Listwise DPO and TPMA-GRPO) lifted Order HR@10 from 0.2046 to 0.2314 and Click HR@10 from 0.2231 to 0.2568. Even without constrained trie decoding, 99.15% of generated sequences mapped to valid catalog items.
- Live production A/B tests: Deployed to live shoppers with zero added latency, OneSearch-V2 drove +3.98% item CTR, +2.90% page-view conversion rate (CVR), +2.07% buyer volume, and +2.11% total order volume, with biggest wins on cold-start items and ambiguous queries.
- Human evaluation: Across 3,200 manually audited pairs, query-item relevance rose by +1.65% and overall page quality by +1.37%.
Limitations and Future Work
- Single-platform validation: All experiments took place on one commercial e-commerce platform; verifying cross-platform generalization remains open.
- Teacher dependency: Offline data generation relies on a heavy 32B-parameter LLM. Teams without compute budgets for strong teacher models may see diminished returns, pointing toward future work on smaller, domain-adapted teachers.
- Short-term observation window: Live A/B tests measured immediate conversion metrics over a fixed window, leaving long-term effects—like multi-month user retention and ecosystem diversity—for future longitudinal studies.
Summary updated