All Questions
Vector Search easy

A marketplace runs ANN search for the top 10 listings, then removes listings outside the user's city. Users in small cities often get only 0 to 2 results. What is the best fix?

  1. A Increase the number of HNSW graph links per node so that each query explores more neighbors.
  2. B Switch the distance metric from cosine to dot product so that local listings score higher.
  3. C Apply the city filter during the search (pre-filter or filter-aware traversal), not after it.
  4. D Re-embed all listings with a larger model so that location is captured in the vector itself.

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

Get the app

Related questions