ML based ranking using Nrtsearch
Yelp 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.
Related posts
- How Vinted Serves Personalised Search Autocomplete
Vinted Engineering mediumAdeptVinted's autocomplete service runs on Vespa and serves 4,700 queries per second at 31 ms P99 over a pool of 125 million suggestions across 50+ country-language markets. More than 20% of search sessions now start from a suggestion, up from under 8%. Candidates come from product metadata combinations and search logs, scored twice a week by a heuristic built on Most Popular Completion. Switching from Vespa's native prefix queries to index-time edge-ngrams via Lucene Linguistics cut P99 matching latency from ~220 ms to ~25 ms, at the cost of more memory. A multiplexer token filter gives accent tolerance while preserving accent intent, a cascade of exact, edit-distance-1 and edit-distance-2 fuzzy tiers handles typos and supplies match-strength signal, and a LightGBM LambdaRank model with 63 features re-ranks results per keystroke for personalisation.
- Recommend API
Slack Engineering mediumAdeptSlack 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.
- Scaling the Instagram Explore recommendations system
Meta Engineering mediumAdeptInstagram Explore uses a four-stage funnel of retrieval, first-stage ranking, second-stage ranking and final reranking, built around caching and pre-computation so heavier models can be used at every stage. Two Tower neural networks with cached user and item embeddings and ANN search handle retrieval, and they also serve as a lightweight first-stage ranker distilled from the heavy second stage. The second stage is a multi-task multi-label model whose engagement probabilities are combined by a tunable weighted value model, with some recommendations precomputed off-peak. Final reranking applies integrity filters and diversity rules, and the system's hundreds of parameters are tuned by online Bayesian optimization or by faster offline tuning that maps offline metrics to online ones.
- How Etsy Uses LLMs to Improve Search Relevance
Etsy Code as Craft mediumAdeptEtsy built an LLM-powered semantic relevance framework that complements engagement signals, which favor popular listings, with judgments of how well listings match query intent across three classes: relevant, partially relevant and irrelevant. Human-labeled golden data validates an o3-based few-shot chain-of-thought annotator with self-consistency sampling. That annotator generates training data for a cascaded distillation stack: a fine-tuned Qwen 3 VL 4B teacher for daily offline evaluation and A/B monitoring via vLLM, and a BERT two-tower student that adds under 10ms in real-time search. The student filters irrelevant results, supplies ranking features and loss weights, and boosts relevant listings, raising fully relevant results from 58% to 62%, though engagement sometimes dips as relevance rises.
- Building Smarter Search Products: 3 Steps for Evaluating Search Algorithms
Shopify Engineering mediumAdeptShopify's Help Center search team evaluates new ranking algorithms in three steps: collect ground truth from Kafka interaction events and expert-annotated relevance ratings, score variants offline with MAP and NDCG over thousands of historical queries, then run online A/B tests on metrics like click-through rate, average clicked rank, abandonment and support deflection. Applied to a new Query-specific Pagerank, which boosts results frequently clicked for similar past queries, the framework showed slightly better offline scores. In the A/B test, users clicked more, picked higher-ranked results and ran fewer follow-up searches, so it replaced the view-count-based Vanilla Pagerank. Annotated datasets should be refreshed regularly because document sets go stale.