fennel.ai/blog/vector-search-in-200-lines-of-rust/

1 Users

0 Comments

1 Highlights

0 Notes

Tags

Top Highlights

build a simplified vector search index over the given "N" points as follows: Randomly take 2 arbitrary available vectors A and B. Calculate the midpoint between these 2 vectors, called C. Build a hyperplane (analog of a "line" in higher dimensions) that passes through C and is perpendicular to the line segment connecting A and B. Classify all the vectors as being either “above” or “below” the hyperplane, splitting the available vectors into 2 groups. For each of the two groups: if the size of the group is higher than a configurable parameter “maximum node size”, recursively call this process on that group to build a subtree. Else, build a single leaf node with all the vector (or their unique ids) We thus use this randomized process to build a tree where every internal node is a hyperplane definition with the left subtree being all the vectors “below” the hyperplane and the right subtree being all the vectors “above”. The set of vectors are continuously recursively split until leaf nodes contain no more than “maximum node size” vectors.

Glasp is a social web highlighter that people can highlight and organize quotes and thoughts from the web, and access other like-minded people’s learning.