Verified Answer : =
Vector index column → embedding
Vector search function → VECTOR_SEARCH
Final clause → ORDER BY s.distance
The first selection is embedding because CREATE VECTOR INDEX must target the column that stores vector data. Microsoft documents the syntax as CREATE VECTOR INDEX ... ON object (vector_column) , so the index belongs on dbo.Products.embedding , not on distance or product_name .
The second selection is VECTOR_SEARCH . This function is designed for vector similarity retrieval and works with vector indexes in SQL database in Microsoft Fabric . In the shown code, the supplied @query_vector VECTOR(1536) is compared against the embedding column using cosine distance, and TOP_N = 10 requests the ten nearest matches. Microsoft specifically documents VECTOR_SEARCH for approximate nearest-neighbor searches and its integration with vector indexes.
The final clause is ORDER BY s.distance because VECTOR_SEARCH returns a distance value representing how far each stored vector is from the supplied query vector. With cosine distance, smaller distance means greater similarity , so ascending order returns the most relevant products first.
Therefore, the completed selections are:
CREATE VECTOR INDEX idx_products_embedding
ON dbo.Products (embedding)
WITH (METRIC = ' cosine ' , TYPE = ' DiskANN ' );
FROM VECTOR_SEARCH (
TABLE = dbo.Products AS t,
COLUMN = embedding,
SIMILAR_TO = @query_vector,
METRIC = ' cosine ' ,
TOP_N = 10
) AS s
ORDER BY s.distance;
So the verified hotspot answers are embedding → VECTOR_SEARCH → ORDER BY s.distance .
Submit