We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8704a0f commit ad83899Copy full SHA for ad83899
README.md
@@ -54,7 +54,21 @@ The **native option** uses the new Vector Functions, recently introduced in Azur
54
> [!NOTE]
55
> Vector Functions are in Public Preview. Learn the details about vectors in Azure SQL here: https://aka.ms/azure-sql-vector-public-preview
56
57
-
+```sql
58
+DECLARE @embedding VECTOR(1536)
59
+
60
+EXEC [web].[get_embedding] 'I want to learn about security in SQL', @embedding OUTPUT
61
62
+SELECT TOP(10)
63
+ s.id,
64
+ s.title,
65
+ s.abstract,
66
+ VECTOR_DISTANCE('cosine', @embedding, s.embeddings) AS cosine_distance
67
+FROM
68
+ [web].[sessions] s
69
+ORDER BY
70
+ cosine_distance
71
+```
72
73
The **classic option** uses the classic T-SQL to perform vector operations, with the support for columnstore indexes for getting good performances.
74
_assets/azure-sql-cosine-similarity-native.gif
-304 KB
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
0 commit comments