Vector functions¶
Snowflake provides both similarity and element-wise aggregation functions for the VECTOR data type. These functions allow for finding vectors nearest to a source vector, used for semantic search and fine-tuning generative responses from LLMs and generative AI.
Similarity functions operate on two VECTOR arguments of equal element type and dimension, computing the specified metric. Snowflake provides the following vector similarity functions:
Vector manipulation functions take an existing vector and return a new vector with different properties, such as truncation or normalization. Snowflake provides the following vector manipulation functions:
Vector aggregate functions operate on columns of VECTOR values to perform element-wise mathematical operations such as sum, average, minimum, and maximum across all vectors in a group. Snowflake provides the following vector aggregation functions:
Note
Vector functions on Snowflake are optimized in a way that can reduce floating point precision. These functions have a margin of error up to 1e-4.
List of functions¶
Function Name |
Notes |
|---|---|
Not supported in Snowpark API. |
|