Shopify has developed and enhanced recommender systems to provide personalized insights, actions, tools, and resources to merchants. Initial efforts focused on leveraging collaborative filtering and user-item interactions to predict item relevance. This post details the development of a foundational generative recommender system that learns directly from raw event sequences, operates within real production latency constraints, and delivers measurable impact at scale. Key advancements include architecture decisions, training strategies, and optimized CUDA kernels for efficient training and serving. The system uses time-aware attention with rotary encoding and relative attention bias, improved negative sampling strategies (shared negatives, positive-aware hard negatives), and a boosting-inspired approach for incremental recall. Online A/B testing showed positive movement in key metrics like shop orders, click-through rate, and conversion rate. Future work explores moving from product ID space to token space through semantic IDs for reduced embedding table dependence and better integration of text queries and assistant interactions.
All Shopify trails