Recommend API
Slack built a unified Recommend API so product teams can bootstrap new ML recommenders from reusable components (fetchers, filters, feature augmentation via a Feature Store, model scoring and rerankers) instead of building bespoke systems. Server-side feature logs and client-side interaction logs are joined in Airflow to produce training data, and models such as logistic regression and XGBoost are trained as Kubernetes Jobs and monitored with Prometheus, online CTR/DCG and feature-drift metrics. Hand-tuned heuristic models solve cold start until enough data exists, and privacy is preserved by using de-identified usage metadata and only cosine similarity from an external embedding model. A/B tests showed CTR gains such as +38.86% for Composer DMs and +123.57% for Slackbot leave suggestions after moving from hand-tuned to learned models.
Related posts
- ML based ranking using Nrtsearch
Yelp Engineering mediumAdeptYelp moved ML-based ranking out of a standalone scoring service and into Nrtsearch, its Lucene-based search engine, via an Inference Plugin that extracts features from indexed documents and request parameters and scores them in-process on replica nodes. The change removes the network transfer and feature-payload overhead that became a bottleneck with large candidate sets. MLeap models such as XGBoost and neural networks are stored in MLflow and loaded at replica bootstrap. Teams either implement a Java scorer interface or use a generic scorer that defines features with Lucene expressions. Models are hot-swapped node by node via Jenkins without restarts, scorer changes go through canary and rolling restarts, and Prometheus metrics track model latency and errors.
- GenRecs Tokenization: Transforming Ads Recommendation at Meta with Stable Model Vocabulary
Meta Engineering hardMasterMeta's ads recommender replaces per-item IDs with GenRecs Tokenization, a stable semantic vocabulary. Each ad, product or page is encoded with pre-trained multimodal models, decomposed into subspaces (e.g. residual decomposition) and quantized against learned codebooks into short token sequences, so similar items share tokens. This lets new and tail items inherit what the model learned about related items, enabling cold-start generalization and cross-campaign transfer. Paired with GEM and the Adaptive Ranking Model it delivered a +0.35% conversion lift. Across eight tokenizer versions, intrinsic metrics (cluster purity, distribution balance, codebook utilization) correlated with downstream CTR accuracy, so the tokenizer can be iterated without full model retraining.
- Shopify’s generative discovery model
Shopify Engineering hardMasterShopify trained a single generative model, adapted from an open-weight LLM, that emits semantic-ID tokens to generate product candidates for both personalized search and recommendation across a catalog of billions. Products are tokenized with RQ-KMeans into three-token semantic IDs (three 8,192-entry codebooks). Training combines joint continued pretraining, upsampling of first-purchase discovery events, RL with an LLM relevance judge (+1.5 OneDCG@10) and multi-teacher distillation from task experts. For serving, LFM2-2.6B was chosen for its 25.5 ms p95, GPU trie-constrained decoding via STATIC cut constraint overhead from 50 ms to about 1 ms, and multi-token prediction replaces autoregressive decoding. In production the model lifted home-feed orders by 7.95% and search OneDCG@10 by 2.1 points.
- User foundation models for Grab
Grab Engineering hardMasterGrab built a transformer-based user foundation model that jointly learns from tabular user attributes and time-series clickstream data to produce general-purpose user embeddings, replacing siloed hand-engineered features. A universal key:value tokenisation with custom positional embeddings and attention masks treats tabular columns as an unordered set and events as an ordered sequence. Modality-specific adapters (pre-trained language models for text, embedding layers for IDs, custom encoders for locations and numbers) feed an alignment layer before the transformer. Pre-training is unsupervised, combining masked token reconstruction with next-action prediction across verticals, so the embeddings serve many downstream tasks such as ads, fraud detection and churn prediction, or the model can be fine-tuned directly.
- Shopify's Playbook for Scaling Machine Learning
Shopify Engineering easyNoviceShopify's approach to scaling machine learning grew out of its first ML product, an order fraud detector that replaced a rule-based system with a high false-positive rate. Teams should pick a problem users care about, confirm the data is trustworthy and accessible, account for downstream dependencies such as fulfillment, and optimize for product outcomes rather than raw model scores. Shopify shipped a simple logistic regression model, built in Python, serialized to PMML, scheduled with Airflow and served in real time from Rails. To scale to hundreds of models, Shopify relies on input/output reconciliation, shadow backtesting, drift monitoring, platform-enforced best practices and automated model operations.