179 questions
No questions match those filters.
Why does exact nearest-neighbor search become impractic...
This is one of the questions in the full AI/ML interview bank. Pro unlocks all 1789 questions; Premium includes the same bank plus the highest daily Practice limit.
See plansIn high-dimensional spaces, a well-known and counterintuitive effect kicks in: as dimensionality grows, the distances between a query point and all other points start to compress toward roughly the same value — “nearest” and “farthest” become less distinguishable, and the usual tricks that make exact search fast in low dimensions (spatial pruning) stop working, because there’s no structure left to prune against. On top of that, brute-force exact search means comparing a query against every single vector in the dataset, which is simply too slow once you’re indexing millions or billions of embeddings.
Approximate nearest-neighbor methods sidestep both problems by building an index structure ahead of time that narrows the search space before comparing anything. HNSW builds a multi-layer graph where you can hop through progressively finer layers to converge quickly on a neighborhood of likely candidates. IVF instead clusters the vector space into cells (via a coarse quantizer) and only searches within the cells closest to the query, rather than everywhere. Both trade a small, tunable amount of recall — you might occasionally miss the single truest nearest neighbor — for a massive reduction in how many vectors actually get compared, which is the trade that makes vector search practical at real-world scale at all.