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
Copy file name to clipboardExpand all lines: articles/search/retrieval-augmented-generation-overview.md
+39-23Lines changed: 39 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ ms.custom:
11
11
- ignite-2023
12
12
- ignite-2024
13
13
ms.topic: conceptual
14
-
ms.date: 12/18/2024
14
+
ms.date: 04/15/2025
15
15
---
16
16
17
17
# Retrieval Augmented Generation (RAG) in Azure AI Search
@@ -41,7 +41,7 @@ Microsoft has several built-in implementations for using Azure AI Search in a RA
41
41
+ Azure OpenAI, [use a search index with or without vectors](/azure/ai-services/openai/concepts/use-your-data).
42
42
+ Azure Machine Learning, [use a search index as a vector store in a prompt flow](/azure/machine-learning/how-to-create-vector-index).
43
43
44
-
Curated approaches make it simple to get started, but for more control over the architecture, you need a custom solution. These templates create end-to-end solutions in:
44
+
Curated approaches make it simple to get started, but for more control over the architecture, you need a custom solution. The following templates create end-to-end solutions in:
45
45
46
46
+[Python](https://aka.ms/azai/py)
47
47
+[.NET](https://aka.ms/azai/net)
@@ -58,6 +58,7 @@ A high-level summary of the pattern looks like this:
58
58
+ Send it to Azure AI Search to find relevant information.
59
59
+ Return the top ranked search results to an LLM.
60
60
+ Use the natural language understanding and reasoning capabilities of the LLM to generate a response to the initial prompt.
61
+
+ Optionally, use agentic RAG where an agent evaluates an answer and finds a better one if the original answer is incomplete or low quality.
61
62
62
63
Azure AI Search provides inputs to the LLM prompt, but doesn't train the model. In RAG architecture, there's no extra training. The LLM is pretrained using public data, but it generates responses that are augmented by information from the retriever, in this case, Azure AI Search.
63
64
@@ -94,8 +95,6 @@ Since you probably know what kind of content you want to search over, consider t
94
95
| text | vectors <sup>1</sup> | Text can be chunked and vectorized in an indexer pipeline, or handled externally and then [indexed as vector fields](vector-search-how-to-create-index.md) in your index. |
95
96
| image | tokens, unaltered text <sup>2</sup> |[Skills](cognitive-search-working-with-skillsets.md) for OCR and Image Analysis can process images for text recognition or image characteristics. Image information is converted to searchable text and added to the index. Skills have an indexer requirement. |
96
97
| image | vectors <sup>1</sup> | Images can be vectorized in an indexer pipeline, or handled externally for a mathematical representation of image content and then [indexed as vector fields](vector-search-how-to-create-index.md) in your index. You can use [Azure AI Vision multimodal](/azure/ai-services/computer-vision/how-to/image-retrieval) or an open source model like [OpenAI CLIP](https://github.com/openai/CLIP/blob/main/README.md) to vectorize text and images in the same embedding space.|
97
-
<!-- | audio | vectors <sup>1</sup> | Vectorized audio content can be [indexed as vector fields](vector-search-how-to-create-index.md) in your index. Vectorization of audio content often requires intermediate processing that converts audio to text, and then text to vecctors. [Azure AI Speech](/azure/ai-services/speech-service/overview) and [OpenAI Whisper](https://platform.openai.com/docs/guides/speech-to-text) are two examples for this scenario. |
98
-
| video | vectors <sup>1</sup> | Vectorized video content can be [indexed as vector fields](vector-search-how-to-create-index.md) in your index. Similar to audio, vectorization of video content also requires extra processing, such as breaking up the video into frames or smaller chunks for vectorization. | -->
99
98
100
99
<sup>1</sup> Azure AI Search provides [integrated data chunking and vectorization](vector-search-integrated-vectorization.md), but you must take a dependency on indexers and skillsets. If you can't use an indexer, Microsoft's [Semantic Kernel](/semantic-kernel/overview/) or other community offerings can help you with a full stack solution. For code samples showing both approaches, see [azure-search-vectors repo](https://github.com/Azure/azure-search-vector-samples).
101
100
@@ -156,7 +155,8 @@ In comparison and benchmark testing, hybrid queries with text and vector fields,
156
155
157
156
The following Python code demonstrates the essential components of a RAG workflow in Azure AI Search. You need to set up the clients, define a system prompt, and provide a query. The prompt tells the LLM to use just the results from the query, and how to return the results. For more steps based on this example, see this [RAG quickstart](search-get-started-rag.md).
158
157
159
-
For the Azure Government cloud, modify the API endpoint on the token provider to `"https://cognitiveservices.azure.us/.default"`.
158
+
> [!NOTE]
159
+
> For the Azure Government cloud, modify the API endpoint on the token provider to `"https://cognitiveservices.azure.us/.default"`.
160
160
161
161
```python
162
162
# Set up the query for generating responses
@@ -223,39 +223,55 @@ A RAG solution that includes Azure AI Search can leverage [built-in data chunkin
223
223
224
224
## How to get started
225
225
226
+
There are many ways to get started, including code-first solutions and demos.
227
+
228
+
### [**Docs**](#tab/docs)
229
+
226
230
+[Try this RAG quickstart](search-get-started-rag.md) for a demonstration of query integration with chat models over a search index.
227
231
228
232
+[Tutorial: How to build a RAG solution in Azure AI Search](tutorial-rag-build-solution.md) for focused coverage on the features and pattern for RAG solutions that obtain grounding data from a search index.
229
233
230
-
+Start with solution accelerators:
234
+
+[Review indexing concepts and strategies](search-what-is-an-index.md) to determine how you want to ingest and refresh data. Decide whether to use vector search, keyword search, or hybrid search. The kind of content you need to search over, and the type of queries you want to run, determines index design.
231
235
232
-
+[Chat with your data solution accelerator](https://github.com/Azure-Samples/chat-with-your-data-solution-accelerator)
> Some Azure AI Search features are intended for human interaction and aren't useful in a RAG pattern. Specifically, you can skip features like autocomplete and suggestions. Other features like facets and orderby might be useful, but would be uncommon in a RAG scenario.
237
240
238
-
+[Build your own copilot solution accelerator](https://github.com/microsoft/Build-your-own-copilot-Solution-Accelerator)
+[Use enterprise chat app templates](https://aka.ms/azai) deploy Azure resources, code, and sample grounding data using fictitious health plan documents for Contoso and Northwind. This end-to-end solution gives you an operational chat app in as little as 15 minutes. Code for these templates is the **azure-search-openai-demo** featured in several presentations. The following links provide language-specific versions:
249
+
### [**Templates**](#tab/templates)
247
250
248
-
+[.NET](https://aka.ms/azai/net)
249
-
+[Python](https://aka.ms/azai/py)
250
-
+[JavaScript](https://aka.ms/azai/js)
251
-
+[Java](https://aka.ms/azai/javat)
251
+
[Use enterprise chat app templates](https://aka.ms/azai) deploy Azure resources, code, and sample grounding data using fictitious health plan documents for Contoso and Northwind. This end-to-end solution gives you an operational chat app in as little as 15 minutes. Code for these templates is the **azure-search-openai-demo** featured in several presentations. The following links provide language-specific versions:
252
252
253
-
+[Review indexing concepts and strategies](search-what-is-an-index.md) to determine how you want to ingest and refresh data. Decide whether to use vector search, keyword search, or hybrid search. The kind of content you need to search over, and the type of queries you want to run, determines index design.
253
+
+[.NET](https://aka.ms/azai/net)
254
+
+[Python](https://aka.ms/azai/py)
255
+
+[JavaScript](https://aka.ms/azai/js)
256
+
+[Java](https://aka.ms/azai/javat)
254
257
255
-
+[Review creating queries](search-query-create.md) to learn more about search request syntax and requirements.
258
+
### [**Accelerators**](#tab/accelerators)
256
259
257
-
> [!NOTE]
258
-
> Some Azure AI Search features are intended for human interaction and aren't useful in a RAG pattern. Specifically, you can skip features like autocomplete and suggestions. Other features like facets and orderby might be useful, but would be uncommon in a RAG scenario.
260
+
+[Chat with your data solution accelerator](https://github.com/Azure-Samples/chat-with-your-data-solution-accelerator)
Copy file name to clipboardExpand all lines: articles/search/search-features-list.md
+1-3Lines changed: 1 addition & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,9 +17,7 @@ ms.date: 02/24/2025
17
17
18
18
Azure AI Search provides information retrieval and uses optional AI integration to extract more value from text and vector content.
19
19
20
-
The following table summarizes features by category. For more information about how Azure AI Search compares with other search technologies, see [Compare search options](search-what-is-azure-search.md#compare-search-options).
21
-
22
-
There's feature parity in all Azure public, private, and sovereign clouds, but some features aren't supported in specific regions. For more information, see [Choose a region](search-region-support.md).
20
+
The following table summarizes features by category. There's feature parity in all Azure public, private, and sovereign clouds, but some features aren't supported in specific regions. For more information, see [Choose a region](search-region-support.md).
23
21
24
22
> [!NOTE]
25
23
> Looking for preview features? See the [preview features list](search-api-preview.md).
> For help with complex or custom solutions, [**contact a partner**](resource-partners-knowledge-mining.md) with deep expertise in Azure AI Search technology.
128
128
129
-
## Compare search options
129
+
<!--## Compare search options
130
130
131
131
Customers often ask how Azure AI Search compares with other search-related solutions. The following table summarizes key differences.
132
132
@@ -145,4 +145,4 @@ Key strengths include:
145
145
+ Azure AI integration for transformations that make content text and vector searchable.
146
146
+ Microsoft Entra security for trusted connections, and Azure Private Link for private connections in no-internet scenarios.
147
147
+ [Full search experience](search-features-list.md): Linguistic and custom text analysis in 56 languages. Faceting, autocomplete queries and suggested results, and synonyms.
|[RAG Time Journey](https://github.com/microsoft/rag-time)| Demo code | Code and video demonstrations of Retrieval Augmented Generation (RAG) workflows that use Azure AI Search. Segments include fundamentals, patterns and use-cases, [vector indexing at scale](https://github.com/microsoft/rag-time/tree/main/Journey%203%20-%20Optimize%20your%20Vector%20Index%20for%20Scale), and [agentic search](https://github.com/microsoft/rag-time/tree/main/Journey%20Bonus%20-%20Agentic%20RAG) where you use an agent to evaluate a result and generate a better answer. |
28
+
23
29
## March 2025
24
30
25
31
| Item | Type | Description |
0 commit comments