Hands-on task
Similar documents: Vector Sets
/root/vectors.txt holds embeddings of knowledge base articles: each line has an article name and 4 vector coordinates separated by spaces.
- Load all lines into the vector set
docswithVADD(the article name is the element, the vector is its coordinates). - Using
VSIM, find the 3 articles closest to the query vector0.7 0.4 0.1 0.0. - Write their names to
/root/nearest.txt— one per line, from the most similar to the least similar.
Similarity here is cosine, as with embeddings: what matters is the direction of the vector, not the distance between points.
- redis
- Vector Sets
- VADD
- VSIM
- VCARD
- vector search
- embeddings