DB
FunctionsVector

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(…) → Float64

Kind · 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.