When implementing a vector store for a RAG system, which similarity search metric is MOST commonly used to find the most relevant document chunks for a given query embedding?
Cosine similarity measures the angle between query and chunk embeddings, ignoring magnitude, which suits text embeddings where direction encodes semantic meaning. It is the default metric in most vector stores such as Azure AI Search.
Why this answer
Cosine similarity is the most common metric for comparing embedding vectors in RAG because it measures the angle between vectors, which works well for high-dimensional semantic embeddings.