Skip to content

Commit d418eb2

Browse files
authored
Merge pull request #249048 from ShawnJackson/tutorial-vector-search-in-ai-apps
[AQ] edit pass: tutorial-vector-search-in-ai-apps
2 parents 050ecf5 + 50bbb69 commit d418eb2

File tree

1 file changed

+23
-13
lines changed

1 file changed

+23
-13
lines changed

articles/cosmos-db/mongodb/vcore/vector-search-ai.md

Lines changed: 23 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Build AI apps with vector search
33
titleSuffix: Azure Cosmos DB for MongoDB vCore
4-
description: Enhance AI-powered applications with Retrieval Augmented Generation (RAG) using Azure Cosmos DB for MongoDB vCore Vector Search.
4+
description: Enhance AI-powered applications with Retrieval Augmented Generation (RAG) by using Azure Cosmos DB for MongoDB vCore vector search.
55
author: gahl-levy
66
ms.author: gahllevy
77
ms.reviewer: sidandrews
@@ -11,33 +11,43 @@ ms.topic: conceptual
1111
ms.date: 08/28/2023
1212
---
1313

14-
# AI Apps with Azure Cosmos DB for MongoDB vCore vector search
14+
# Build AI apps with Azure Cosmos DB for MongoDB vCore vector search
1515

1616
[!INCLUDE[MongoDB vCore](../../includes/appliesto-mongodb-vcore.md)]
1717

18-
## Introduction
18+
Language models available in Azure OpenAI Service can elevate the capabilities of your AI-driven applications. To fully unleash the potential of language models, you must give them access to timely and relevant data from your application's data store. You can accomplish this process, known as Retrieval Augmented Generation (RAG), by using Azure Cosmos DB.
1919

20-
Large Language Models (LLMs) available in Azure OpenAI are potent tools that can elevate the capabilities of your AI-driven applications. To fully unleash the potential of LLMs, giving them access to timely and relevant data from your application's data store is crucial. This process, known as Retrieval Augmented Generation (RAG), can be seamlessly accomplished using Azure Cosmos DB. In this tutorial, we delve into the core concepts of RAG and provide links to tutorials and sample code that exemplify powerful RAG strategies using Azure Cosmos DB for MongoDB vCore vector search.
20+
This article delves into the core concepts of RAG. It provides links to tutorials and sample code that exemplify RAG strategies by using vector search in Azure Cosmos DB for MongoDB vCore.
2121

22-
Retrieval Augmented Generation (RAG) elevates AI-powered applications by incorporating external knowledge and data into model inputs. With Azure Cosmos DB for MongoDB vCore's vector search, this process becomes seamless, ensuring that the most pertinent information is effortlessly integrated into your AI models. By applying the power of [embeddings](../../../ai-services/openai/tutorials/embeddings.md) and vector search, you can provide your AI applications with the context they need to excel. Through the provided tutorials and code samples, you can become proficient in harnessing RAG to create smarter and more context-aware AI solutions.
22+
RAG elevates AI-powered applications by incorporating external knowledge and data into model inputs. With vector search in Azure Cosmos DB for MongoDB vCore, this process becomes seamless. You can use it to integrate the most pertinent information into your AI models with minimal effort.
2323

24-
## Understanding Retrieval Augmented Generation (RAG)
24+
By using [embeddings](../../../ai-services/openai/tutorials/embeddings.md) and vector search, you can provide your AI applications with the context that they need to excel. Through the provided tutorials and code samples, you can become proficient in using RAG to create smarter and more context-aware AI solutions.
2525

26-
Retrieval Augmented Generation harnesses external knowledge and models to efficiently manage custom data or domain-specific expertise. This process involves extracting pertinent information from an external data source and seamlessly integrating it into the model's input through prompt engineering. A robust approach is essential to identify the most pertinent data from the external source within the [token limitations of a request](../../../ai-services/openai/quotas-limits.md). This limitation is elegantly addressed by using embeddings, which convert data into vectors, capturing the semantic essence of the text and enabling context comprehension beyond simple keywords.
26+
## What is Retrieval Augmented Generation?
27+
28+
RAG uses external knowledge and models to efficiently manage custom data or domain-specific expertise. This process involves extracting information from an external data source and integrating it into the model's input through prompt engineering. A robust approach is essential to identify the most pertinent data from the external source within the [token limitations of a request](../../../ai-services/openai/quotas-limits.md).
29+
30+
RAG addresses these limitations by using embeddings, which convert data into vectors. Embeddings capture the semantic essence of the text and enable context comprehension beyond simple keywords.
2731

2832
## What is vector search?
2933

30-
[Vector search](./vector-search.md) is an approach that enables the discovery of analogous items based on shared data characteristics, deviating from the necessity for precise matches within a property field. This method proves invaluable in various applications like text similarity searches, image association, recommendation systems, and anomaly detection. Its functionality revolves around the utilization of vector representations (sequences of numerical values) generated from your data via machine learning models or embeddings APIs. Examples of such APIs encompass [Azure OpenAI Embeddings](/azure/ai-services/openai/how-to/embeddings) or [Hugging Face on Azure](https://azure.microsoft.com/solutions/hugging-face-on-azure/). The technique gauges the disparity between your query vector and the data vectors. The data vectors that exhibit the closest proximity to your query vector are identified as semantically akin.
34+
[Vector search](./vector-search.md) is an approach that enables the discovery of analogous items based on shared data characteristics. It deviates from the necessity for precise matches within a property field.
35+
36+
This method is invaluable in applications like text similarity searches, image association, recommendation systems, and anomaly detection. Its functionality revolves around the use of vector representations (sequences of numerical values) that are generated from your data via machine learning models or embeddings APIs. Examples of such APIs encompass [Azure OpenAI embeddings](/azure/ai-services/openai/how-to/embeddings) or [Hugging Face on Azure](https://azure.microsoft.com/solutions/hugging-face-on-azure/).
37+
38+
The technique gauges the disparity between your query vector and the data vectors. The data vectors that show the closest proximity to your query vector are identified as semantically akin.
39+
40+
## How does vector search work in Azure Cosmos DB for MongoDB vCore?
3141

32-
## Utilizing Vector Search with Azure Cosmos DB for MongoDB vCore
42+
You can truly harness the power of RAG through the native vector search capability in Azure Cosmos DB for MongoDB vCore. This native search fuses AI-focused applications with stored data in Azure Cosmos DB.
3343

34-
RAG's power is truly harnessed through the native vector search capability within Azure Cosmos DB for MongoDB vCore. This capability enables a seamless fusion of AI-focused applications with stored data in Azure Cosmos DB. Vector search optimally stores, indexes, and searches high-dimensional vector data directly within Azure Cosmos DB for MongoDB vCore alongside other application data. This functionality eliminates the need to migrate data to costlier alternatives for vector search functionality.
44+
Vector search optimally stores, indexes, and searches high-dimensional vector data directly within Azure Cosmos DB for MongoDB vCore, alongside other application data. This capability eliminates the need to migrate data to costlier alternatives for vector search functionality.
3545

3646
## Code samples and tutorials
3747

38-
- [**.NET Retail Chatbot Demo**](https://github.com/AzureCosmosDB/VectorSearchAiAssistant/tree/mongovcorev2): Learn how to build a chatbot using .NET that demonstrates RAG's potential in a retail context.
39-
- [**.NET Tutorial - Recipe Chatbot**](https://github.com/microsoft/AzureDataRetrievalAugmentedGenerationSamples/tree/main/C%23/CosmosDB-MongoDBvCore): Walk through creating a recipe chatbot using .NET, showcasing RAG's application in a culinary scenario.
40-
- [**Python Notebook Tutorial**](https://github.com/microsoft/AzureDataRetrievalAugmentedGenerationSamples/tree/main/Python/CosmosDB-MongoDB-vCore) - Azure Product Chatbot: Explore a Python notebook tutorial that guides you through constructing an Azure product chatbot, highlighting RAG's benefits.
48+
- [.NET retail chatbot demo](https://github.com/AzureCosmosDB/VectorSearchAiAssistant/tree/mongovcorev2): Learn how to use .NET to build a chatbot that demonstrates the potential of RAG in a retail context.
49+
- [.NET tutorial - recipe chatbot](https://github.com/microsoft/AzureDataRetrievalAugmentedGenerationSamples/tree/main/C%23/CosmosDB-MongoDBvCore): Walk through creating a recipe chatbot by using .NET, to showcase the application of RAG in a culinary scenario.
50+
- [Python notebook tutorial - Azure product chatbot](https://github.com/microsoft/AzureDataRetrievalAugmentedGenerationSamples/tree/main/Python/CosmosDB-MongoDB-vCore): Learn how to construct an Azure product chatbot that highlights the benefits of RAG.
4151

4252
## Next steps
4353

0 commit comments

Comments
 (0)