Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Vinted Engineering 22 min read Case study mediumAdept

How Vinted Serves Personalised Search Autocomplete

Vinted'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.

Assumes: search engine basicsinverted indexeslearning-to-rank basics

Related posts

  • ML based ranking using Nrtsearch

    Yelp Engineering mediumAdept

    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.

  • Neon Docs search is now built on Neon

    Neon mediumAdept

    Neon's docs search now runs entirely on its own stack: Lakebase Postgres with the lakebase_vector (pgvector-compatible ANN) and lakebase_text (BM25) extensions, a Hono API on Neon Functions, and Neon AI Gateway for embeddings and reranking. Pages are ingested as markdown via a GitHub Action, chunked by heading, embedded and stored with tsvectors in one table. To fit search-as-you-type latency budgets, full hybrid results (ANN plus BM25 merged with reciprocal rank fusion, then an LLM rerank) are precomputed for common queries and cached, while unseen queries fall back to BM25 only. Cache hits take 1.9 ms and BM25 misses 8.6 ms at p50 on the server, and top-5 hit rate rose from 80% to 94% on 171 real queries.

  • Search Quality Assurance with AI as a Judge

    Zalando Engineering mediumAdept

    Zalando validated search quality for new markets (Luxembourg, Portugal, Greece) before launch by using a multimodal LLM-as-a-judge instead of manual expert review. Test queries are drawn from existing markets, clustered by NER-tag sets into intent segments, ranked by traffic share and translated with an LLM. An Airflow pipeline then retrieves results from the search service and has GPT-4o score each result 0–4 using product data and images, with ElastiCache deduplicating product lookups and (query, product) judgements to cut cost. Running 1,500 top segments per market surfaced lemmatization gaps, unrecognized terms such as Portuguese "ténis" and "menina", and missing NER tags in Greek, all fixed before go-live.

  • How MDN’s autocomplete search works

    Mozilla Hacks mediumAdept

    MDN Web Docs' autocomplete search runs entirely in the browser. It lazy-loads a Brotli-compressed JSON index of every document title per locale (11,690 en-US titles, 144KB over the wire) only when the user focuses or hovers the search box or presses `/`. FlexSearch builds an in-memory index that is reused across keystrokes, and downshift handles the accessible React dropdown. Ranking comes from pre-sorting the index by relative pageview popularity at build time, so FlexSearch's matches keep that natural order. Typing `/` first switches to VS Code-style fuzzy matching on URL paths, which also works offline for content authors on a local preview server.

  • How Etsy Uses LLMs to Improve Search Relevance

    Etsy Code as Craft mediumAdept

    Etsy 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.

The quest for software engineering knowledge.

Look:
Layout: