Applied AI·Embeddings and retrieval
you rank results by the angle between two vectors, which is a dot product over two magnitudes and one line of code.
Cosine similarity
Draft summary, pending review
The standard similarity measure between two embeddings: the cosine of the angle between them, ranging from -1 to 1, higher meaning more similar. One line of code: dot product divided by the product of magnitudes.