This is a demo directory website built with Ever Works
Distance Metrics for Vector Search
Overview of distance metrics including Euclidean, cosine similarity, dot product, and Manhattan distance, with guidance on when to use each for optimal retrieval performance.
Hamming Distance
A distance metric that measures the number of positions at which corresponding elements in two vectors differ. Particularly useful for binary vectors and categorical data, commonly used with binary quantization in vector search.
Inner Product Similarity
A vector similarity metric that calculates the dot product of two vectors, combining both magnitude and direction. Equivalent to cosine similarity when vectors are normalized, and commonly used for Maximum Inner Product Search (MIPS).
Range Search
A vector search operation that retrieves all vectors within a specified distance threshold from the query vector, rather than a fixed number of nearest neighbors. Useful for finding all similar items above a quality threshold.
Dot Product
Vector similarity metric measuring both directional similarity and magnitude of vectors. Used by many LLMs for training and equivalent to cosine similarity for normalized data. Reports both angle and magnitude information.
Manhattan Distance
Vector distance metric calculating the sum of absolute differences between vector components. Measures grid-like distance and is robust to outliers, with faster calculation as data dimensionality increases.
Cosine Similarity
Fundamental similarity metric for vector search measuring the cosine of the angle between vectors. Range from -1 to 1, with 1 indicating identical direction regardless of magnitude.
Dot Product (Inner Product)
Similarity metric computing sum of element-wise products between vectors. Efficient for normalized vectors, equivalent to cosine similarity when vectors are unit length.
Euclidean Distance (L2 Distance)
Distance metric measuring straight-line distance between vectors in multi-dimensional space. Lower values indicate higher similarity, with 0 meaning identical vectors.
Page 1 of 83