|
| 1 | +--- |
| 2 | +title: Intelligent Applications and AI Frequently Asked Questions (FAQ) |
| 3 | +description: "Answers to common questions about using AI with the SQL Database Engine." |
| 4 | +author: yorek |
| 5 | +ms.author: damauri |
| 6 | +ms.reviewer: damauri, randolphwest, mathoma |
| 7 | +ms.date: 08/14/2025 |
| 8 | +ms.update-cycle: 180-days |
| 9 | +ms.service: sql |
| 10 | +ms.topic: faq |
| 11 | +ms.collection: |
| 12 | + - ce-skilling-ai-copilot |
| 13 | +ms.custom: |
| 14 | + - intro-quickstart |
| 15 | +helpviewer_keywords: |
| 16 | + - "NL2SQL" |
| 17 | + - "Natural Language" |
| 18 | + - "Intelligent Applications" |
| 19 | + - "AI" |
| 20 | +monikerRange: "=sql-server-ver17 || =sql-server-linux-ver17 || =azuresqldb-current || =azuresqldb-mi-current || =fabric" |
| 21 | +--- |
| 22 | + |
| 23 | +# Intelligent applications and AI Frequently Asked Questions (FAQ) |
| 24 | + |
| 25 | +[!INCLUDE [sqlserver2025-asdb-asmi-fabricsqldb](../includes/applies-to-version/sqlserver2025-asdb-asmi-fabricsqldb.md)] |
| 26 | + |
| 27 | +> [!div class="op_single_selector"] |
| 28 | +> |
| 29 | +> - [Azure SQL Database](/azure/azure-sql/database/ai-artificial-intelligence-intelligent-applications) |
| 30 | +> - [SQL Server & Azure SQL Managed Instance](artificial-intelligence-intelligent-applications.md) |
| 31 | +
|
| 32 | +This article contains frequently asked questions about vectors and embeddings in the SQL Database Engine. |
| 33 | + |
| 34 | +For samples and examples, visit the [SQL AI Samples repository](https://aka.ms/sqlaisamples). |
| 35 | + |
| 36 | +## Can I create a retrieval-augmented generation (RAG) solution completely in T-SQL? |
| 37 | + |
| 38 | +Yes, you can create a Retrieval-Augmented Generation (RAG) solution using T-SQL. This type of solution leverages the SQL Database Engine's capabilities to manage and query your data effectively. You can use T-SQL to implement the necessary data retrieval and processing logic, while also integrating with external AI services for the generation aspect. Vector can be stored natively in SQL engine and connection to LLM to provide the natural language understand capabilities are possible via `sp_invoke_external_rest_endpoint`. |
| 39 | + |
| 40 | +- [Implement a RAG solution and call OpenAI right from Azure SQL DB to ask questions about your data](https://github.com/Azure-Samples/azure-sql-db-chatbot) |
| 41 | +- [Predictable LLM results with Structured Output and sp_invoke_external_rest_endpoint](https://devblogs.microsoft.com/azure-sql/predictable-llm-output-with-sp_invoke_external_rest_endpoint/) |
| 42 | + |
| 43 | +## Why would I create a RAG solution completely in T-SQL? |
| 44 | + |
| 45 | +If you want to improve an existing application without having to re-architect it to support AI capabilities, use the SQL engine built-in features to implement AI functionalities directly within your database queries. You'll only need to update your T-SQL code to incorporate AI features, rather than making extensive changes to your application architecture. |
| 46 | + |
| 47 | +- [Migrate and modernize Windows Server, SQL Server, and .NET workloads](https://www.youtube.com/watch?v=H_2OgOL3fpo&t=982s) |
| 48 | +- [Modernize applications with Azure SQL, Open AI and Data API builder](https://github.com/Azure-Samples/azure-sql-modernize-app-with-ai) |
| 49 | + |
| 50 | +## Are there any end-to-end samples using Azure SQL or Fabric SQL for RAG? |
| 51 | + |
| 52 | +Sure, you can find end-to-end samples for RAG using Azure SQL and Fabric SQL here: |
| 53 | + |
| 54 | +- [RAG samples using Azure SQL](https://ai.awesome.azuresql.dev/?q=Azure%20SQL%20samples%20tagged%20with%20%22RAG%22) |
| 55 | +- [RAG samples using Fabric SQL](https://ai.awesome.azuresql.dev/?q=Fabric%20SQL%20samples%20tagged%20with%20%22RAG%22) |
| 56 | + |
| 57 | +## Can I have RAG working on structured data, like columns and rows? |
| 58 | + |
| 59 | +If you need to work with structured data, you can still leverage RAG by combining it with other techniques, such as using embeddings to represent your structured data in a way that can be understood by the AI model. This allows you to perform retrieval and generation tasks on structured data while still benefiting from the capabilities of RAG. |
| 60 | + |
| 61 | +- [Improve the “R” in RAG and embrace Agentic RAG in Azure SQL](https://devblogs.microsoft.com/azure-sql/improve-the-r-in-rag-and-embrace-agentic-rag-in-azure-sql/) |
| 62 | + |
| 63 | +## Why does sending a full, complex schema to an LLM lead to poor SQL generation—and how can I fix it? |
| 64 | + |
| 65 | +If you have a complex and large database schema, with hundreds of tables and views, it is better to use a multi-agent approach to help to reduce the noise and allow AI models to focus on specific areas of the schema. A full description along with a working end-to-end sample is available here: |
| 66 | + |
| 67 | +- [A story of collaborating agents: chatting with your database the right way](https://devblogs.microsoft.com/azure-sql/a-story-of-collaborating-agents-chatting-with-your-database-the-right-way/) |
| 68 | + |
| 69 | +## Related content |
| 70 | + |
| 71 | +- [Intelligent applications and AI](./artificial-intelligence-intelligent-applications.md) |
| 72 | +- [Vector and embeddings: Frequently asked questions (FAQ)](../relational-databases/vectors/vectors-faq.md) |
| 73 | +- [SQL AI Samples and Examples](https://aka.ms/sqlaisamples) |
0 commit comments