You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This article provides an overview of using artificial intelligence (AI) options, such as OpenAI and vectors, to build intelligent applications with Azure SQL Database and [Fabric SQL database](/fabric/database/sql/overview), which shares many of these features of Azure SQL Database.
21
25
22
-
For samples and examples, please visit the [SQL AI Samples repository](https://aka.ms/sqlaisamples).
26
+
For samples and examples, visit the [SQL AI Samples repository](https://aka.ms/sqlaisamples).
23
27
24
28
Watch this video in the [Azure SQL Database essentials series](/shows/azure-sql-database-essentials/) for a brief overview of building an AI ready application:
@@ -35,7 +39,7 @@ The following links provide sample code of various options to build intelligent
35
39
| AI Option | Description |
36
40
| --- | --- |
37
41
|**[Azure OpenAI](#azure-openai)**| Generate embeddings for RAG and integrate with any model supported by Azure OpenAI. |
38
-
|**[Vectors](#vectors)**| Learn how to store and query vectors the database. |
42
+
|**[Vectors](#vectors)**| Learn how to store and query vectors in the database. |
39
43
|**[Azure AI Search](#azure-ai-search)**| Use your database together with Azure AI Search to train LLM on your data. |
40
44
|**[Intelligent applications](#intelligent-applications)**| Learn how to create an end-to-end solution using a common pattern that can be replicated in any scenario. |
41
45
|**[Copilot skills in Azure SQL Database](#microsoft-copilot-skills-in-azure-sql-database)**| Learn about the set of AI-assisted experiences designed to streamline the design, operation, optimization, and health of Azure SQL Database-driven applications. |
@@ -130,8 +134,6 @@ For additional examples on using SQL Database and OpenAI, see the following arti
130
134
131
135
## Vectors
132
136
133
-
### Vector data type
134
-
135
137
In November 2024, the new **vector** data type was introduced in Azure SQL Database.
136
138
137
139
The dedicated **vector** 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 on the [**vector** data type](/sql/t-sql/data-types/vector-data-type) and related functions, see [Overview of vectors in the SQL Database Engine](/sql/relational-databases/vectors/vectors-sql-server).
While older versions of SQL Server engine, up to and including SQL Server 2022, doesn't have a native **vector** type, a vector is nothing more than an ordered tuple, and relational databases are great at managing tuples. You can think of a tuple as the formal term for a row in a table.
160
-
161
-
Azure SQL Database also supports columnstore indexes and [batch mode execution](/sql/relational-databases/query-processing-architecture-guide#batch-mode-execution). A vector-based approach is used for batch mode processing, which means that each column in a batch has its own memory location where it's stored as a vector. This allows for faster and more efficient processing of data in batches.
162
-
163
-
The following example shows how a vector can be stored in SQL Database:
For an example that uses a common subset of Wikipedia articles with embeddings already generated using OpenAI, see [Vector similarity search with Azure SQL Database and OpenAI](https://devblogs.microsoft.com/azure-sql/vector-similarity-search-with-azure-sql-database-and-openai/).
181
-
182
-
Another option for leveraging Vector Search in Azure SQL database is integration with Azure AI using the integrated vectorization capabilities: [Vector Search with Azure SQL Database and Azure AI Search](https://devblogs.microsoft.com/azure-sql/vector-search-with-azure-sql-database/)
183
159
184
160
## Azure AI Search
185
161
@@ -195,7 +171,7 @@ Azure SQL Database can be used to build intelligent applications that include AI
195
171
196
172
:::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":::
197
173
198
-
For an end-to-end sample to build a AI-enabled application using sessions abstract as a sample dataset, see:
174
+
For an end-to-end sample to build an AI-enabled application using sessions abstract as a sample dataset, see:
199
175
200
176
-[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/).
201
177
-[Using Retrieval Augmented Generation to build a conference session assistant](https://github.com/Azure-Samples/azure-sql-db-session-recommender-v2)
@@ -213,7 +189,7 @@ A few of samples on using Azure SQL with LangChain:
213
189
214
190
End-to-end examples:
215
191
216
-
-[Build a chatbot on your own data in 1 hour with Azure SQL, Langchain and Chainlit](https://devblogs.microsoft.com/azure-sql/build-a-chatbot-on-your-own-data-in-1-hour-with-azure-sql-langchain-and-chainlit/): Build a chatbot using the RAG pattern on your own data using Langchain for orchestrating LLM calls and Chainlit for the UI.
192
+
-[Build a chatbot on your own data in 1 hour with Azure SQL, Langchain, and Chainlit](https://devblogs.microsoft.com/azure-sql/build-a-chatbot-on-your-own-data-in-1-hour-with-azure-sql-langchain-and-chainlit/): Build a chatbot using the RAG pattern on your own data using Langchain for orchestrating LLM calls and Chainlit for the UI.
217
193
218
194
### Semantic Kernel integration
219
195
@@ -229,7 +205,7 @@ An example of how easily Semantic Kernel helps to build AI-enabled solution is h
229
205
230
206
[Microsoft Copilot in Azure SQL Database (preview)](../copilot/copilot-azure-sql-overview.md) is a set of AI-assisted experiences designed to streamline the design, operation, optimization, and health of Azure SQL Database-driven applications.
231
207
232
-
Copilot provides relevant answers to user questions, simplifying database management by leveraging database context, documentation, dynamic management views, Query Store, and other knowledge sources. For example:
208
+
Copilot provides relevant answers to user questions, simplifying database management by using database context, documentation, dynamic management views, Query Store, and other knowledge sources. For example:
233
209
234
210
- Database administrators can independently manage databases and resolve issues, or learn more about the performance and capabilities of your database.
235
211
- Developers can ask questions about their data as they would in text or conversation to generate a T-SQL query. Developers can also learn to write queries faster through detailed explanations of the generated query.
@@ -255,7 +231,7 @@ Copilot provides relevant answers to user questions, simplifying database manage
255
231
256
232
-**Document-based Q&A**: Ask Copilot questions about general SQL database capabilities, and it responds in natural language. Copilot also helps find documentation related to your request.
257
233
258
-
Copilot for SQL database utilizes table and view names, column names, primary key, and foreign key metadata to generate T-SQL code. Copilot for SQL database does not use data in tables to generate T-SQL suggestions.
234
+
Copilot for SQL database utilizes table and view names, column names, primary key, and foreign key metadata to generate T-SQL code. Copilot for SQL database doesn't use data in tables to generate T-SQL suggestions.
0 commit comments