QuestionQ47
VerifiedImplement AI capabilities in database solutionsHOTSPOT -
You have a Microsoft Fabric SQL database named SalesDB that includes a table called dbo.Products.
Modify SalesDB to satisfy these requirements:
- Create a vector index on the appropriate column.
- Use a supplied natural-language query vector.
How should you complete the Transact-SQL code? Select the appropriate options in the answer area.
Select
CREATE VECTOR INDEX idx_products_embedding ON dbo.Products ( ) WITH (METRIC = 'cosine', TYPE = 'DiskANN'); DECLARE @query_vector VECTOR(1536) = @SuppliedVector SELECT t.product_id, t.product_name, s.distance FROM ( TABLE = dbo.Products AS t, COLUMN = embedding, SIMILAR_TO = @query_vector, METRIC = 'cosine', TOP_N = 10 ) AS s
Community Discussion