Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

Commit 0fc11c5

Browse files
committed
Add documentation for vector search and embeddings in SQL Server
- Created new FAQ document for vectors and embeddings (vectors-faq.md) covering common questions and best practices. - Added detailed guide on vector search and vector indexes (vectors.md) including examples and explanations of exact and approximate search methods. - Updated index and navigation links to reflect new documentation structure for AI and vector features. - Revised related content links across various documents to point to the new vectors and embeddings resources.
1 parent 74379fb commit 0fc11c5

16 files changed

Lines changed: 72 additions & 69 deletions

.openpublishing.redirection.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10640,6 +10640,26 @@
1064010640
"sql-server-ver16"
1064110641
]
1064210642
},
10643+
{
10644+
"source_path": "docs/sql-server/artificial-intelligence-intelligent-applications.md",
10645+
"redirect_url": "/sql/sql-server/ai/artificial-intelligence-intelligent-applications",
10646+
"redirect_document_id": false
10647+
},
10648+
{
10649+
"source_path": "docs/sql-server/artificial-intelligence-intelligent-applications-faq.md",
10650+
"redirect_url": "/sql/sql-server/ai/artificial-intelligence-intelligent-applications-faq",
10651+
"redirect_document_id": false
10652+
},
10653+
{
10654+
"source_path": "docs/relational-databases/vectors/vectors-sql-server.md",
10655+
"redirect_url": "/sql/sql-server/ai/vectors",
10656+
"redirect_document_id": false
10657+
},
10658+
{
10659+
"source_path": "docs/relational-databases/vectors/vectors-faq.md",
10660+
"redirect_url": "/sql/sql-server/ai/vectors-faq",
10661+
"redirect_document_id": false
10662+
},
1064310663
{
1064410664
"source_path": "docs/sql-server/ai-artificial-intelligence-intelligent-applications.md",
1064510665
"redirect_url": "/sql/sql-server/artificial-intelligence-intelligent-applications",

docs/connect/driver-feature-matrix.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ We wish all drivers supported every feature and spend effort to ensure feature p
5252
| [Transparent Network IP Resolution](odbc/using-transparent-network-ip-resolution.md) | | [Yes](/dotnet/api/microsoft.data.sqlclient.sqlconnection.connectionstring?view=sqlclient-dotnet-1.1&preserve-view=true) | | [Yes](/dotnet/api/system.data.sqlclient.sqlconnection.connectionstring?view=netframework-4.8&preserve-view=true) |
5353
| [TDS 8.0 (strict encryption) and TLS 1.3](../relational-databases/security/networking/tds-8.md) | Yes (v5.1+) | Yes (v5.1+) | | |
5454
| [JSON data type](../relational-databases/json/json-data-sql-server.md) | Yes (v6.0+) | Yes (v6.0+) | | |
55-
| [Vector data type](../relational-databases/vectors/vectors-sql-server.md) | Yes (v6.1+) | Yes (v6.1+) | | |
55+
| [Vector (float32) data type](../t-sql/data-types/vector-data-type.md) | Yes (v6.1+) | Yes (v6.1+) | | |
5656

5757
| <a id="table2"></a>Feature | [ODBC Driver for SQL Server on Windows](odbc/microsoft-odbc-driver-for-sql-server.md) | [ODBC Driver for SQL Server on Linux and macOS](odbc/microsoft-odbc-driver-for-sql-server.md) | [JDBC Driver for SQL Server](jdbc/microsoft-jdbc-driver-for-sql-server.md) | [OLE DB Driver for SQL Server](oledb/oledb-driver-for-sql-server.md) |
5858
| :-- | :-- | :-- | :-- | :-- |
@@ -76,7 +76,7 @@ We wish all drivers supported every feature and spend effort to ensure feature p
7676
| [Transparent Network IP Resolution](odbc/using-transparent-network-ip-resolution.md) | [Yes](odbc/using-transparent-network-ip-resolution.md) (v13.0+) | [Yes](odbc/using-transparent-network-ip-resolution.md) (v13.1+) | [Yes](jdbc/setting-the-connection-properties.md) (v6.0+) | [Yes](oledb/features/using-transparent-network-ip-resolution.md) (v18.4+) |
7777
| [TDS 8.0 (strict encryption) and TLS 1.3](../relational-databases/security/networking/tds-8.md) | Yes (v18.0+) | Yes (v18.0+) | Yes (v11.2+) | Yes (v19.2+) |
7878
| [JSON data type](../relational-databases/json/json-data-sql-server.md) | | | [Yes](jdbc/use-json-data-type.md) (v13.2+) | |
79-
| [Vector data type](../relational-databases/vectors/vectors-sql-server.md) | | | [Yes](jdbc/use-vector-data-type.md) (v13.2+) | |
79+
| [Vector (float32) data type](../t-sql/data-types/vector-data-type.md) | | | [Yes](jdbc/use-vector-data-type.md) (v13.2+) | |
8080

8181
| <a id="table3"></a>Feature | [Drivers for PHP for SQL Server on Windows](php/microsoft-php-driver-for-sql-server.md)<sup>[1](#note1)</sup> | [Drivers for PHP for SQL Server on Linux and macOS](php/microsoft-php-driver-for-sql-server.md)<sup>[1](#note1)</sup> | [Tedious (Node.js)](node-js/node-js-driver-for-sql-server.md) | [pyODBC (Python)](python/pyodbc/python-sql-driver-pyodbc.md)<sup>[1](#note1)</sup> | [Go (go-lang)](https://aka.ms/go-mssqldb) |
8282
| :-- | :-- | :-- | :-- | :-- | :-- |
@@ -100,7 +100,7 @@ We wish all drivers supported every feature and spend effort to ensure feature p
100100
| [Transparent Network IP Resolution](odbc/using-transparent-network-ip-resolution.md) | [Yes](php/php-driver-for-sql-server-support-for-high-availability-disaster-recovery.md) | [Yes](php/php-driver-for-sql-server-support-for-high-availability-disaster-recovery.md) | | [Yes](odbc/using-transparent-network-ip-resolution.md) | Yes |
101101
| [TDS 8.0 (strict encryption) and TLS 1.3](../relational-databases/security/networking/tds-8.md) | Yes (v5.10+) | Yes (v5.10+) | Yes (v16.3+) | Yes | Yes |
102102
| [JSON data type](../relational-databases/json/json-data-sql-server.md) | | | | |
103-
| [Vector data type](../relational-databases/vectors/vectors-sql-server.md) | | | | |
103+
| [Vector (float32) data type](../t-sql/data-types/vector-data-type.md) | | | | |
104104

105105
<a id="note1"></a><sup>1</sup> Since these drivers rely on the Microsoft ODBC Driver for SQL Server, a version of that driver that supports the feature must also be used.
106106

docs/sql-server/artificial-intelligence-intelligent-applications-faq.md renamed to docs/sql-server/ai/artificial-intelligence-intelligent-applications-faq.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ monikerRange: "=sql-server-ver17 || =sql-server-linux-ver17 || =azuresqldb-curre
2222

2323
# Intelligent applications and AI Frequently Asked Questions (FAQ)
2424

25-
[!INCLUDE [sqlserver2025-asdb-asmi-fabricsqldb](../includes/applies-to-version/sqlserver2025-asdb-asmi-fabricsqldb.md)]
25+
[!INCLUDE [sqlserver2025-asdb-asmi-fabricsqldb](../../includes/applies-to-version/sqlserver2025-asdb-asmi-fabricsqldb.md)]
2626

2727
> [!div class="op_single_selector"]
2828
>
@@ -78,17 +78,17 @@ Refer to the [Data, privacy, and security for Azure OpenAI Service](/azure/ai-fo
7878

7979
Azure SQL and SQL Server provide extensive support for fine-grained access security:
8080

81-
- [Get started with Database Engine permissions](../relational-databases/security/authentication-access/getting-started-with-database-engine-permissions.md): Control access to database objects at a granular level using permissions.
82-
- [Row-Level Security (RLS)](../relational-databases/security/row-level-security.md): Control access to rows in a table based on the characteristics of the user executing a query. You can see RLS in action in this [video](https://youtu.be/Uddhx8Bu2ZM?si=90_i05RjhQarN7Jk&t=1236).
83-
- [Dynamic data masking](../relational-databases/security/dynamic-data-masking.md): Limit the exposure of sensitive data by masking it to non-privileged users.
84-
- [Always Encrypted](../relational-databases/security/encryption/always-encrypted-database-engine.md): Protect sensitive data by encrypting it at rest and in transit, ensuring that only authorized users can access the unencrypted data.
81+
- [Get started with Database Engine permissions](../../relational-databases/security/authentication-access/getting-started-with-database-engine-permissions.md): Control access to database objects at a granular level using permissions.
82+
- [Row-Level Security (RLS)](../../relational-databases/security/row-level-security.md): Control access to rows in a table based on the characteristics of the user executing a query. You can see RLS in action in this [video](https://youtu.be/Uddhx8Bu2ZM?si=90_i05RjhQarN7Jk&t=1236).
83+
- [Dynamic data masking](../../relational-databases/security/dynamic-data-masking.md): Limit the exposure of sensitive data by masking it to non-privileged users.
84+
- [Always Encrypted](../../relational-databases/security/encryption/always-encrypted-database-engine.md): Protect sensitive data by encrypting it at rest and in transit, ensuring that only authorized users can access the unencrypted data.
8585

8686
It's also possible to audit any operation done on the database using the Audit feature in Azure SQL and SQL Server.
8787

88-
[SQL Server Audit (Database Engine)](../relational-databases/security/auditing/sql-server-audit-database-engine.md)
88+
[SQL Server Audit (Database Engine)](../../relational-databases/security/auditing/sql-server-audit-database-engine.md)
8989

9090
## Related content
9191

9292
- [Intelligent applications and AI](artificial-intelligence-intelligent-applications.md)
93-
- [Vector and embeddings: Frequently asked questions (FAQ)](../relational-databases/vectors/vectors-faq.md)
93+
- [Vector and embeddings: Frequently asked questions (FAQ)](vectors-faq.md)
9494
- [SQL AI Samples and Examples](https://aka.ms/sqlaisamples)

docs/sql-server/artificial-intelligence-intelligent-applications.md renamed to docs/sql-server/ai/artificial-intelligence-intelligent-applications.md

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,12 @@ monikerRange: "=sql-server-ver17 || =sql-server-linux-ver17 || =azuresqldb-curre
1616
---
1717
# Intelligent applications and AI
1818

19-
[!INCLUDE [sqlserver2025-asdb-asmi-fabricsqldb](../includes/applies-to-version/sqlserver2025-asdb-asmi-fabricsqldb.md)]
20-
21-
> [!div class="op_single_selector"]
22-
>
23-
> * [Azure SQL Database](/azure/azure-sql/database/ai-artificial-intelligence-intelligent-applications)
24-
> * [SQL Server & Azure SQL Managed Instance](ai-artificial-intelligence-intelligent-applications.md)
19+
[!INCLUDE [sqlserver2025-asdb-asmi-fabricsqldb](../../includes/applies-to-version/sqlserver2025-asdb-asmi-fabricsqldb.md)]
2520

2621
This article provides an overview of using artificial intelligence (AI) options, such as OpenAI and vectors, to build intelligent applications with the SQL Database Engine in SQL Server and Azure SQL Managed Instance.
2722

23+
For Azure SQL Database, review [Azure SQL Database](/azure/azure-sql/database/ai-artificial-intelligence-intelligent-applications).
24+
2825
For samples and examples, visit the [SQL AI Samples repository](https://aka.ms/sqlaisamples).
2926

3027
## Overview
@@ -103,7 +100,7 @@ Vectors in the SQL Database Engine can be efficiently stored and queried, as des
103100

104101
## Azure OpenAI
105102

106-
Embedding is the process of representing the real world as data. Text, images, or sounds can be converted into embeddings. Azure OpenAI models are able to transform real-world information into embeddings. The models are available as REST endpoints and thus can easily be consumed from the SQL Database Engine using the [sp_invoke_external_rest_endpoint](../relational-databases/system-stored-procedures/sp-invoke-external-rest-endpoint-transact-sql.md) system stored procedure, available starting in [!INCLUDE [sssql25-md](../includes/sssql25-md.md)] and Azure SQL Managed Instance with the **SQL Server 2025** or **Always-up-to-date** [update policy](/azure/azure-sql/managed-instance/update-policy):
103+
Embedding is the process of representing the real world as data. Text, images, or sounds can be converted into embeddings. Azure OpenAI models are able to transform real-world information into embeddings. The models are available as REST endpoints and thus can easily be consumed from the SQL Database Engine using the [sp_invoke_external_rest_endpoint](../../relational-databases/system-stored-procedures/sp-invoke-external-rest-endpoint-transact-sql.md) system stored procedure, available starting in [!INCLUDE [sssql25-md](../../includes/sssql25-md.md)] and Azure SQL Managed Instance configured with the [Always-up-to-date update policy](/azure/azure-sql/managed-instance/update-policy#always-up-to-date-update-policy).
107104

108105
```sql
109106
DECLARE @retval INT, @response NVARCHAR(MAX);
@@ -122,7 +119,7 @@ DECLARE @e VECTOR(1536) = JSON_QUERY(@response, '$.result.data[0].embedding');
122119

123120
Using a call to a REST service to get embeddings is just one of the integration options you have when working with SQL Managed Instance and OpenAI. You can let any of the [available models](/azure/ai-services/openai/concepts/models) access data stored in the SQL Database Engine to create solutions where your users can interact with the data, such as the following example:
124121

125-
:::image type="content" source="media/ai-artificial-intelligence-intelligent-applications/data-chatbot.png" alt-text="Screenshot of an AI bot answering the question using data stored in SQL Server.":::
122+
:::image type="content" source="../media/ai-artificial-intelligence-intelligent-applications/data-chatbot.png" alt-text="Screenshot of an AI bot answering the question using data stored in SQL Server.":::
126123

127124
For additional examples on using Azure SQL and OpenAI, see the following articles, which also apply to SQL Server and Azure SQL Managed Instance:
128125

@@ -131,7 +128,7 @@ For additional examples on using Azure SQL and OpenAI, see the following article
131128

132129
## Vector examples
133130

134-
The dedicated **vector** data type allows for efficient and optimized storing of vector data, and comes with a set of functions to help developers streamline vector and similarity search implementation. Calculating distance between two vectors can be done in one line of code using the new `VECTOR_DISTANCE` function. For more information and examples, see [Vector search and vector indexes in the SQL Database Engine](/sql/relational-databases/vectors/vectors-sql-server?view=azuresqldb-mi-current&preserve-view=true).
131+
The dedicated **vector** data type allows for efficient and optimized storing of vector data, and comes with a set of functions to help developers streamline vector and similarity search implementation. Calculating distance between two vectors can be done in one line of code using the new `VECTOR_DISTANCE` function. For more information and examples, review [Vector search and vector indexes in the SQL Database Engine](vectors.md).
135132

136133
For example:
137134

@@ -165,15 +162,15 @@ To learn more about the integration of Azure AI Search with Azure OpenAI and the
165162

166163
The SQL Database Engine can be used to build intelligent applications that include AI features, such as recommenders, and Retrieval Augmented Generation (RAG) as the following diagram demonstrates:
167164

168-
:::image type="content" source="media/ai-artificial-intelligence-intelligent-applications/session-recommender-architecture.png" alt-text="Diagram of different AI features to build intelligent applications with Azure SQL Database." lightbox="media/ai-artificial-intelligence-intelligent-applications/session-recommender-architecture.png":::
165+
:::image type="content" source="../media/ai-artificial-intelligence-intelligent-applications/session-recommender-architecture.png" alt-text="Diagram of different AI features to build intelligent applications with Azure SQL Database." lightbox="../media/ai-artificial-intelligence-intelligent-applications/session-recommender-architecture.png":::
169166

170167
For an end-to-end sample to build an AI-enabled application using sessions abstract as a sample dataset, see:
171168

172169
- [How I built a session recommender in 1 hour using OpenAI](https://devblogs.microsoft.com/azure-sql/how-i-built-a-session-recommender-in-1-hour-using-open-ai/).
173170
- [Using Retrieval Augmented Generation to build a conference session assistant](https://github.com/Azure-Samples/azure-sql-db-session-recommender-v2)
174171

175172
> [!NOTE]
176-
> LangChain integration and Semantic Kernel integration rely on the [vector data type](../t-sql/data-types/vector-data-type.md), which is available starting with [!INCLUDE [sssql25-md](../includes/sssql25-md.md)] and in Azure SQL Managed Instance configured with the **SQL Server 2025** or **Always-up-to-date** [update policy](/azure/azure-sql/managed-instance/update-policy).
173+
> LangChain integration and Semantic Kernel integration rely on the [vector data type](../../t-sql/data-types/vector-data-type.md), which is available starting with [!INCLUDE [sssql25-md](../../includes/sssql25-md.md)] and in Azure SQL Managed Instance configured with the [Always-up-to-date update policy](/azure/azure-sql/managed-instance/update-policy#always-up-to-date-update-policy).
177174
178175

179176
### LangChain integration
@@ -204,7 +201,7 @@ An example of how easily Semantic Kernel helps to build AI-enabled solutions is
204201
## Related content
205202

206203
- [Intelligent applications and AI Frequently Asked Questions (FAQ)](artificial-intelligence-intelligent-applications-faq.md)
207-
- [Vector and embeddings: Frequently asked questions (FAQ)](../relational-databases/vectors/vectors-faq.md)
204+
- [Vector and embeddings: Frequently asked questions (FAQ)](vectors-faq.md)
208205
- [Create and deploy an Azure OpenAI Service resource](/azure/ai-services/openai/how-to/create-resource?pivots=web-portal)
209206
- [Embeddings models](/azure/ai-services/openai/concepts/models#embeddings-models)
210207
- [SQL AI Samples and Examples](https://aka.ms/sqlaisamples)

docs/relational-databases/vectors/vectors-faq.md renamed to docs/sql-server/ai/vectors-faq.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Vector & Embeddings Frequently Asked Questions (FAQ)
3-
description: Answers to common questions about vector search and vector indexes in the SQL Database Engine.
3+
description: Answers to common questions about vector search and vector indexes in the SQL Server Database Engine.
44
author: WilliamDAssafMSFT
55
ms.author: wiassaf
66
ms.reviewer: damauri, mikeray

docs/relational-databases/vectors/vectors-sql-server.md renamed to docs/sql-server/ai/vectors.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
title: Vector Search & Vector Index in the SQL Database Engine
3-
description: How to create, manage, and search vectors in the SQL Database Engine.
2+
title: Vector Search & Vector Index
3+
description: How to create, manage, and search vectors in the SQL Server Database Engine.
44
author: WilliamDAssafMSFT
55
ms.author: wiassaf
66
ms.reviewer: damauri, pookam, jovanpop, randolphwest, mikeray
@@ -17,7 +17,7 @@ helpviewer_keywords:
1717
monikerRange: "=sql-server-ver17 || =sql-server-linux-ver17 || =azuresqldb-current || =azuresqldb-mi-current || =fabric"
1818
---
1919

20-
# Overview of vector search and vector indexes in the SQL Database Engine
20+
# Vector search and vector indexes in the SQL Database Engine
2121

2222
[!INCLUDE [sqlserver2025-asdb-asmi-fabricsqldb](../../includes/applies-to-version/sqlserver2025-asdb-asmi-fabricsqldb.md)]
2323

docs/sql-server/index.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ landingContent:
8282
- text: Overview
8383
url: artificial-intelligence-intelligent-applications.md
8484
- text: Vectors
85-
url: ../relational-databases/vectors/vectors-sql-server.md
85+
url: ../sql-server/ai/vectors.md
8686
- text: Copilot in SSMS
8787
url: /ssms/copilot/copilot-in-ssms-overview
8888
- text: Microsoft Copilot in Azure SQL Database

docs/sql-server/what-s-new-in-sql-server-2025.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ The following sections identify features that are improved or introduced in [!IN
8888
| [Copilot in SQL Server Management Studio](/ssms/copilot/copilot-in-ssms-overview) | Ask questions. Get answers from your data. |
8989
| [Vector data type](../t-sql/data-types/vector-data-type.md) | Store vector data optimized for operations such as similarity search and machine learning applications. Vectors are stored in an optimized binary format but are exposed as JSON arrays for convenience. Each element of the vector can be stored either using a single-precision (4-byte) or half-precision (2-byte) floating-point value. |
9090
| [Vector functions](../t-sql/functions/vector-functions-transact-sql.md) | New scalar functions perform operations on vectors in binary format, allowing applications to store and manipulate vectors in the SQL Database Engine. |
91-
| [Vector index](../relational-databases/vectors/vectors-sql-server.md#vector-search) | Create and manage approximate vector indexes to quickly and efficiently find similar vectors to a given reference vector.<br /><br />Query vector indexes from [sys.vector_indexes](../relational-databases/system-catalog-views/sys-vector-indexes-transact-sql.md). Requires [PREVIEW_FEATURES database scoped configuration](../t-sql/statements/alter-database-scoped-configuration-transact-sql.md#preview-features). |
91+
| [Vector index](../sql-server/ai/vectors.md#vector-search) | Create and manage approximate vector indexes to quickly and efficiently find similar vectors to a given reference vector.<br /><br />Query vector indexes from [sys.vector_indexes](../relational-databases/system-catalog-views/sys-vector-indexes-transact-sql.md). Requires [PREVIEW_FEATURES database scoped configuration](../t-sql/statements/alter-database-scoped-configuration-transact-sql.md#preview-features). |
9292
| [Manage external AI models](../t-sql/statements/create-external-model-transact-sql.md) | Manage external AI model objects for embedding tasks (creating vector arrays) accessing REST AI inference endpoints. |
9393

9494
## Developer

0 commit comments

Comments
 (0)