The table below lists all the
vec built-in
functions (in this namespace:
).
You can also view these functions broken down by category:
Function name | Description |
---|---|
vec:add | Returns the sum of two vectors. |
vec:base64-decode | Returns a vector value by decoding the base64 encoded string input. |
vec:base64-encode | Returns the base64 encoding of the vector. |
vec:cosine-similarity | Returns the cosine similarity between two vectors. |
vec:dimension | Returns the dimension of the vector passed in. |
vec:dot-product | Returns the dot product between two vectors. |
vec:euclidean-distance | Returns the Euclidean distance between two vectors. |
vec:get | Returns the element at the k-th index of the vector. |
vec:magnitude | Returns the magnitude of the vector. |
vec:normalize | Returns the vector passed in, normalized to a length of 1. |
vec:subtract | Returns the difference of two vectors. |
vec:subvector | Returns a subvector of the input vector, starting at the specified index, with the specified length (optional). |
vec:vector | Returns a vector value. |
vec:vector-score | A helper function that returns a hybrid score using a cts score and a vector similarity calculation result. |