All Questions
Vector Search hard

A legal-discovery product serves 5,000 tenants with 768-dim embeddings. The median tenant has 20K documents and the largest has 800K. Contracts require that a search never silently misses a document that a full scan would rank in the top 50. The team plans one HNSW index per tenant. What should they do?

  1. A Keep per-tenant HNSW but set ef_search very high, which guarantees exact top-50 results once ef far exceeds k.
  2. B Use exact flat search per tenant; the largest tenant is about 2.4 GB of vectors, so no graph is needed.
  3. C Use one global HNSW index with a tenant post-filter, amortizing graph memory and build time across tenants.
  4. D Use a PQ-compressed flat scan to cut memory 16x while keeping results exact, since every vector is compared.

One system design question a day, with spaced repetition so the ones you miss come back.

Get the app

Related questions