179 questions
No questions match those filters.
← All questions
Retrieval & EmbeddingsHard· Vector Search· Algorithms· Complexity
Why not a kd-tree? It’s O(log N ) and it’s in the stand...
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 plansThe pruning test for a kd-tree is |qi - s| > r. In high-dimensional spaces, such as d=768, the radius r is approximately √2d, which equals 39. Since a single-coordinate gap is typically order 1, the pruning condition almost never fires. Consequently, the kd-tree fails to prune the search space effectively, and the overhead of the tree bookkeeping makes it perform worse than a linear scan.