A measure of similarity between embeddings (e.g., text vs. image) often used in multimodal vector search.
How It Works
Cosine similarity measures the cosine of the angle between two vectors, providing a metric for similarity based on direction rather than magnitude. It's commonly used in vector space models to compare document similarity.
Technical Details
Calculated as the dot product of two vectors divided by the product of their magnitudes. Values range from -1 (completely dissimilar) to 1 (completely similar), with 0 indicating orthogonality.
Best Practices
Normalize vectors before computing similarity
Use for high-dimensional data comparisons
Combine with other metrics for comprehensive analysis