Selecting a model for semantic search at Dropbox scale

Marta Mendez, Jongmin Baek11 Dec 2024

Problem

Dropbox's search engine Nautilus matched keywords only. A search for "employment contract" missed "job agreement" or "offer letter", and queries and documents had to be in the same language. Semantic search fixes this. But at Dropbox scale (over a trillion documents) the embedding model decides both cost and quality. Every query embedding is on the critical path of a search, and every document must be embedded and stored. Public benchmarks are mostly English and use unnamed documents of similar size, unlike user files.

Example from the article: the team compared 11 candidate models on datasets built from Dropbox search logs in five languages and chose multilingual-e5-large with two embeddings per document.

Solution in brief

Adapt the open MTEB benchmark to your own infrastructure and build MTEB-compatible datasets from your search logs. Compare models, chunking and filename handling on those datasets. Then set a per-document storage budget and choose precision, dimension and embedding count inside it.

Questions this case answers
  • How to select a text embedding model and vector storage format for retrieval over a very large corpus when public benchmarks do not match the production data distribution
  • How to build a representative multilingual offline retrieval benchmark from existing search logs without training on user data
  • How to choose a text embedding model for semantic search when public benchmarks do not match our own data?
  • How to build an offline evaluation set for embedding models from search logs, including several languages?

Tools and methods

  • MTEB (Massive Text Embedding Benchmark) — open evaluation harness, used for its re-ranking and retrieval tasks.
  • Search-log datasets — anonymized query-document pairs in MTEB format, six languages.
  • multilingual-e5-large — the selected embedding model.
  • Kubeflow pipeline — generates the evaluation datasets from logs.
  • 8-bit scaled quantization — shrinks each embedding to about 1 KB.
  • Two embeddings per document — one for filename with path, one for the first 512 tokens of content.
Continue reading — it's free

Google or a one-time email code. No password.