cosine_distance
Computes 1 - dot(a, b) / (||a|| * ||b||) over two equal-length array(float64) embeddings encoded as JSON-array text. Range [0, 2]: 0 = identical direction, 1 = orthogonal, 2 = opposite. Length mism…
cosine_distance(…) → Float64Kind · scalar
Computes 1 - dot(a, b) / (||a|| * ||b||) over two equal-length array(float64) embeddings encoded as JSON-array text. Range [0, 2]: 0 = identical direction, 1 = orthogonal, 2 = opposite. Length mismatch or a zero-magnitude vector yields NULL.
Part of the Vector family.
Vector
6 Vector functions in the NYXDB native function registry, with signatures, briefs, and measured medians where available.
cosine_similarity
Computes 1 - dot(a, b) / (||a|| * ||b||) over two equal-length array(float64) embeddings encoded as JSON-array text. Range [0, 2]: 0 = identical direction, 1 = orthogonal, 2 = opposite. Length mism…