
Shopify Engineering · 11 min readAI & machine learning
Shopify’s generative discovery model
A generative discovery model jointly trained on Shopify’s search and recommendation data learns product semantics and buyer intent, improving both search relevance and recommendation performance. The model uses semantic‑ID tokenization, explicit discovery training, and reinforcement learning to refine retrieval quality, achieving measurable gains in online metrics and offline recall.
- Uses RQ‑KMeans to encode billions of products into 3‑token semantic IDs for efficient learning.
- Upsamples first‑purchase events and compresses histories to bias the model toward discovering unseen products.
- Applies reinforcement learning with an LLM relevance judge to boost OneDCG@10 by 1.5 points.