May 06, 2024 — Vector data type and vector similarity functions — Preview

With this release, we are pleased to announce the preview of VECTOR data type, Vector Similarity Functions, and the Vector Embedding Function. These features enable important applications that require semantic vector search and retrieval.

For more information, see Vector Embeddings.

New SQL data type

The following data type was introduced in recent releases:

CategoryNew data typeDescription
VectorVECTORWith the VECTOR data type, Snowflake encodes and processes vectors efficiently. This data type supports semantic vector search and retrieval applications, such as RAG-based applications, and common operations on vectors in vector-processing applications.

New SQL functions

The following functions were introduced in recent releases:

Function CategoryNew FunctionDescription
Vector similarity functionVECTOR_INNER_PRODUCTReturns the inner product of two vectors. The inner product (also known as the dot or scalar product) multiplies two vectors.
Vector similarity functionVECTOR_L2_DISTANCEMeasures the L2 distance between two vectors.
Vector similarity functionVECTOR_COSINE_SIMILARITYMeasures the cosine similarity between two vectors, which is the angular distance between the vectors in a multi-dimensional space.
LLM FunctionEMBED_TEXT_768 (SNOWFLAKE.CORTEX)Creates a vector embedding for a given string of text in English.