LeituraPesquisaRadarFramework de investimento
Entrar / Cadastrar
← Voltar para a leitura
NotíciasTópico · ShopifyMaterial3 min de leituraEditorial DisconfirmAI

Shopify Engineering Team: Why Search and Recommendation Share a Single Generative Model

Shopify details the architectural decisions behind its shared generative discovery model: encoding billions of products into three-token sequences using semantic IDs, jointly training search and recommendation to mutually enhance each other, and deploying a 2.6B parameter model in production within millisecond-level latency budgets.

2026-11-12 02:27 GMT+8

In industrial systems, search and recommendation typically follow separate pipelines: search handles explicit queries, while recommendation relies on implicit behavioral signals. The Shopify engineering team proposes a more fundamental observation—that both share the same set of inputs and objectives. A search query provides an explicit signal of intent, whereas recommendation infers intent from browsing and purchasing behavior; yet both require product knowledge and buyer context to identify relevant items. This common foundation makes joint training a natural choice rather than an engineering compromise.

To serve both search and recommendation with a single language model, a shared product vocabulary is essential first. Shopify’s catalog contains billions of products; the raw numeric product ID itself carries no product information, and treating every product as an independent output would create a vocabulary of billions of entries, resulting in extremely sparse training samples. Their solution is the semantic ID: first, an embedding model encodes product content into vector representations, then RQ-KMeans converts these embeddings into discrete three-token sequence codes, with each codebook level containing 8,192 entries. The key effect is that related products share encoding prefixes—for example, products starting with [6001] cover various vests and gilets, while [6001, 5561] further narrows down to padded gilets in different colors. This means that training data for one product can update the shared representation of its neighbors, providing a learning pathway for products with sparse interactions.

Entrar / Cadastrar
LeituraPesquisaRadarFramework de investimento

Does joint training truly benefit both tasks? Shopify provided ablation experiments to answer this. Removing search data caused recommendation Recall@50 to drop from a baseline of 21.0 to 20.9; removing recommendation data caused search OneDCG@10 to drop from 28.8 to 28.5, and search purchase Recall@10 to drop from 33.4 to 32.6. Both directions showed declines, indicating that shared training indeed produced cross-task gains. The team also found that while supervised fine-tuning teaches the model to reproduce historical samples, accurately predicting the next token does not fully equate to retrieval quality—multiple products can satisfy the same intent, yet training samples only record one observed purchase or click. To address this, they introduced reinforcement learning, using an LLM relevance judge to provide reward signals, which yielded an additional 1.5-point lift in OneDCG@10 for the search task.

Production deployment constraints dictate model scale and inference methods. Shopify positions the generative model as a candidate generator, sharing the latency budget of a live request with downstream ranking. They selected Liquid AI’s LFM2-2.6B, achieving a p95 latency of 25.5 milliseconds (with beam width 100), whereas the larger Qwen3-14B, despite higher quality, incurred a 108.4-millisecond latency that left insufficient time for subsequent ranking stages. For constrained decoding, they built upon the STATIC method to represent the catalog prefix tree as a sparse index on the GPU, enforcing constraints via a CUDA/C++ plugin within TurboMind, reducing constraint overhead from over 50 milliseconds to approximately 1 millisecond. Multi-token prediction further compressed the autoregressive generation of three codewords into a single forward pass, saving time to generate a larger candidate set for refinement by a lightweight ranker.

It must be clarified that all the aforementioned performance figures are self-reported production metrics from Shopify, without independent verification. Online gains (orders +7.95%, conversion rate +9.85%) come from Shop home feed recommendation experiments, while search quality improvements stem from internal OneDCG@10 evaluations. The applicability conditions of this architecture are tightly coupled with Shopify’s product catalog structure, request latency budgets, and participating merchant scale; systems with different product distributions, latency constraints, or interaction densities may not be able to directly reuse the same decisions. The team itself notes that the next goal is to integrate intent understanding, candidate generation, and ranking into a single model, introducing online continuous training—meaning the current architectural positioning (as a candidate generator) is itself a phased engineering choice rather than a final form.

Fontes

  • shopify.engineeringShopify↗
Tópico

Shopify

加拿大电商基础设施公司 Shopify 近期部署了一个名为 SID-LLM 的共享生成式发现模型,旨在统一其搜索与推荐系统。该模型将数十亿商品编码为三词元语义 ID,并基于 Liquid AI 的 LFM2-2.6B 模型进行联合训练。在生…

2 etapas1 peçasAtualizado 2026-11-16 20:25

Como chegamos aqui

  1. 2026-11-11Shopify 工程团队发布博客文章《Shopify’s generative discovery model》,详细介绍 SID-LLM 的架构、训练方法及在线 A/B 测试结果。shopify.engineering ↗
  2. 2026-11-11Shopify 研究团队在 arXiv 提交论文《Generative Search and Recommendation at Shopify》,阐述 SID-LLM 的技术原理及实验数据。arxiv.org ↗

O que ainda está indefinido

  • 该模型如何进一步整合到 Shopify Catalog API 以支持更多第三方 AI 代理?
  • 随着商品目录的动态变化,语义 ID 的更新机制对模型长期稳定性的影响如何?
  • Liquid AI 的 LFM2 系列模型在其他垂直领域的表现是否同样具备低延迟优势?
Ler o tópico completo →
Continuar pesquisando →