Vector indexes and vector search in SQL database in Fabric
SQL database in Microsoft Fabric now generally supports native vector storage, exact search, and DiskANN-based vector indexes.
O que mudou
SQL database in Microsoft Fabric now features general availability for the VECTOR data type, distance functions, and vector indexes. This allows you to store embeddings directly alongside relational data and perform similarity searches without external services.
Use cases
Imagine you have a database of articles and need to search contents by semantic similarity to answer user questions.
- Store numeric arrays (embeddings) efficiently.
- Calculate the distance between vectors using the
VECTOR_DISTANCEfunction. - Run exact (kNN) and approximate (ANN) searches using DiskANN-based indexes.
How to use
You can create vectors by casting JSON arrays or using embedding functions and run exact search queries.
DECLARE @qv VECTOR(1536) = AI_GENERATE_EMBEDDINGS(N'Pink Floyd music style' USE MODEL Ada2Embeddings);
SELECT TOP (10) id, VECTOR_DISTANCE('cosine', @qv, [content_vector]) AS distance, title
FROM [dbo].[wikipedia_articles_embeddings]
ORDER BY distance;
What happens in this code:
- Declares a variable
@qvof typeVECTOR(1536)populated with an embedding generated from text. - Queries the
wikipedia_articles_embeddingstable to find the closest records. - Uses the
VECTOR_DISTANCEfunction with the 'cosine' metric to calculate the distance between the query vector and the stored column. - Orders by the shortest distance and returns the top 10 results.
Limitations and requirements
- The feature is generally available (GA) in SQL database in Microsoft Fabric.
- Exact search is recommended for datasets under 50,000 vectors, while vector indexes help scale approximate searches.
- vector search
- embeddings
- sql database
- fabric
- ai
Vector indexes and vector search in SQL database in Fabric (Generally Available)
Resumo e explicação gerados por IA a partir da release note oficial. Em caso de dúvida, a documentação oficial da plataforma prevalece.
Relacionadas
- Microsoft FabricGA
Fabric IQ leva dados do Power BI para o Microsoft 365 Copilot
O Fabric IQ agora está disponível de forma geral no Microsoft 365 Copilot, respondendo perguntas de negócio com relatórios e modelos semânticos governados.
fabric iq · microsoft 365 copilot - Microsoft FabricGA
Nomes customizados de captura no SQL CDC para Copy jobs
Use tabelas CDC existentes com nomes fora do padrão padrão nos seus Copy jobs do Microsoft Fabric.
sql · cdc - Microsoft FabricGA
Monitore o status e a saúde de copy jobs em um só lugar
Acompanhe o status de execução, vazão e tendências de saúde de copy jobs de forma centralizada.
microsoft fabric · copy job