Not even 6 months ago we started the Early Adopter Preview vector data support in Azure SQL, and we got great feedback and a lot of enthusiasm about the feature. Developers are excited to be able to easily build AI-enabled solution using an enterprise ready, secure, scalable and proven platform like Azure SQL, without the need to move data outside the database for increased security and manageability.
The new vector
data type
We’re now even more excited to introduce a dedicated, native, data type for storing vectors: the vector
data type. Usage of varbinary
to store vectors is now deprecated and it will be removed before we move to Public Preview. Having a vector type just makes everything easier. Creating a vector is now as easy as casting from a JSON array:
declare @v vector(3) = cast('[1,2,3]' as vector(3))
and converting a vector back into a JSON array is also straightforward:
declare @a nvarchar(max) = cast(@v as nvarchar(max))
Vector functions that were specifically focused on handling vectors using the varbinary(8000)
, like ISVECTOR
, JSON_ARRAY_TO_VECTOR
and VECTOR_TO_JSON_ARRAY
will still work for a while, but they are to be considered deprecated, as there is no need for them anymore now that vectors have their own data type.
New functions for vectors
We’re also introducing couple of new functions to facilitate vectors usage, especially if the embedding model that you are using does not return normalized vectors, so that you must use the more expensive cosine distance instead of the more efficient dot product:
VECTOR_NORM
: returns the norm of the vector (which is a measure of its length or magnitude) in a given norm type.VECTOR_NORMALIZE
: returns the normalized vector, which is a vector scaled to have a length of 1 in a given norm type.
How do I test the vector type?
Using the new vector type is still in Early Adopter Preview phase.
If you have been already included in the Early Adopter Preview, and you are already using the vector functions, no action needed on your side. We’ll reach out to you in the next days to provide instructions on how to use the new vector type.
If you have already submitted your request to join the Early Adopter Preview, you’re good. When we’ll reach out to you, we’ll provide the updated information to use the new vector type right away.
If you are interested in joining the Early Adopter Preview to try out the new vector features firsthand, please fill out this form: https://aka.ms/azuresql-vector-eap so that you can be included EAP.
Awesome 🙂 Any news when its offically released? We applied for eary adoptor preview but didnt get a response yet
Stay tuned….;)
We got an impressive number of requests to test this feature so queue is a bit long. Thanks in advance for your patience and great to see such enthusiasm!!!!
Very cool new stuff 🙂 When will we be able to try it out? I already applied, but haven’t heard anything back about the early adopter preview.
We got a lot of requests to join the EAP, so queue is a bit long now, but we’ll do your best to get you in ASAP!