Expand description
Vector operations for RAG system
This module provides high-performance vector operations for similarity search and embedding manipulation. All functions are optimized for hot-path performance.
Functionsยง
- approx_
equal - Checks if two vectors are approximately equal within a tolerance.
- cosine_
similarity - Computes the cosine similarity between two vectors.
- dot_
product - Computes the dot product of two vectors.
- l2_
distance - Computes the Euclidean (L2) distance between two vectors.
- normalize
- Normalizes a vector to unit length (L2 norm = 1).