Problem
Vinted, a second-hand fashion marketplace, builds a personalized homepage feed from millions of listings. The first retrieval stage used a Faiss index that was read-only and had to be rebuilt and redeployed to add new items and drop sold ones. Faiss cannot filter during the search, so filters were applied to a fixed top-k list afterwards. If the top-scoring items failed a user's own filters, that user saw no recommendations at all.
Example from the article: a user sets custom filters, none of the top-scoring items retrieved pass them, and the user sees no recommendations at all.
Solution in brief
Vinted replaced Faiss with Vespa, which stores the items, updates them in real time and runs approximate nearest neighbor (ANN) search with metadata pre-filtering. A benchmark against Elasticsearch on real data drove the choice. A later A/B test showed that exact search was not worth its extra latency over the HNSW index.
Questions this case answers
- How to serve personalized candidate retrieval from embeddings under user-defined metadata filters, so that a user never gets an empty list
- How to decide whether the accuracy lost by approximate nearest neighbor search matters to users, when recall against exact search is low
- How to retrieve personalized candidates for a homepage feed when users apply their own filters such as size and brand?
- How to choose between Vespa and Elasticsearch for vector search with metadata pre-filtering?
Tools and methods
- Two-tower model — in-house model that embeds listings and users so that distance reflects relevance
- HNSW — the ANN index used for first-stage retrieval
- Vespa — database and search engine with ANN, pre-filtering and real-time updates
- Elasticsearch 8.2.2 — the alternative that was benchmarked
- Faiss — the first-iteration index, replaced
- Prometheus and Grafana — metrics and dashboards for Vespa
Google or a one-time email code. No password.