All Questions
Vector Search medium

A multi-tenant document search runs HNSW for the top-10 nearest vectors and then drops any results that don't belong to the requesting tenant. Small tenants, each holding about 0.5% of all vectors, often get 0 to 2 results even though they have relevant documents. What is the right fix?

  1. A Raise top-k from 10 to 50 before applying the tenant filter so that enough candidates survive the filtering step.
  2. B Apply the tenant filter during traversal, via pre-filtering or filter-aware search, so only matching vectors become candidates.
  3. C Switch the metric from cosine to dot product so that the requesting tenant's vectors score higher than other tenants' vectors.
  4. D Rebuild the HNSW graph with a higher M so each node links to more neighbors and the final top-10 contains more of the tenant's data.

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

Get the app

Related questions