Skip to content

Commit 435ed98

Browse files
committed
Renamed "Azure Cosmos DB for MongoDB vCore" to "vCore-based Azure Cosmos DB for MongoDB"
updated all the "Azure Cosmos DB for MongoDB vCore" references to "vCore-based Azure Cosmos DB for MongoDB" Story #16445
1 parent 426a796 commit 435ed98

File tree

5 files changed

+14
-14
lines changed

5 files changed

+14
-14
lines changed

05_Provision_Azure_Resources/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Bicep deployment is available in the [`deploy` folder of the lab repository](htt
66
Currently deploying the following:
77

88
- Resource Group (this is done manually in the Azure Portal)
9-
- Azure Cosmos DB API for MongoDB vCore account
9+
- Azure vCore-based Azure Cosmos DB for MongoDB account
1010
- Azure OpenAI resource
1111
- Chat GPT-3.5 `completions` model
1212
- text-embedding-ada-002 model `embeddings` model

06_Create_First_Cosmos_DB_Project/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Learn more about the pre-requisites and installation of the emulator [here](http
1414

1515
>**NOTE**: When using the Azure CosmosDB emulator using the API for MongoDB it must be started with the [MongoDB endpoint options enabled](https://learn.microsoft.com/en-us/azure/cosmos-db/how-to-develop-emulator?tabs=windows%2Cpython&pivots=api-mongodb#start-the-emulator) at the command-line.
1616
17-
**The Azure Cosmos DB emulator does not support vector search. To complete the vector search and AI-related labs, you must use an Azure Cosmos DB API for the MongoDB vCore account in Azure.**
17+
**The Azure Cosmos DB emulator does not support vector search. To complete the vector search and AI-related labs, you must use an vCore-based Azure Cosmos DB for MongoDB account in Azure.**
1818

1919
## Authentication
2020

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
# Use vector search on embeddings in Azure Cosmos DB for MongoDB vCore
1+
# Use vector search on embeddings in vCore-based Azure Cosmos DB for MongoDB
22

3-
>**NOTE**: Azure Cosmos DB for MongoDB vCore supports vector search on embeddings. This functionality is not supported on RUs-based accounts.
3+
>**NOTE**: vCore-based Azure Cosmos DB for MongoDB supports vector search on embeddings. This functionality is not supported on RUs-based accounts.
44
55
## Embeddings and vector search
66

77
Embedding is a way of serializing the semantic meaning of data into a vector representation. Because the generated vector embedding represents the semantic meaning, it means that when it is searched, it can find similar data based on the semantic meaning of the data rather than exact text. Data can come from many sources, including text, images, audio, and video. Because the data is represented as a vector, vector search can, therefore, find similar data across all different types of data.
88

9-
Embeddings are created by sending data to an embedding model, where it is transformed into a vector, which then can be stored as a vector field within its source document in Azure Cosmos DB for MongoDB vCore. Azure Cosmos DB for MongoDB vCore supports the creation of vector search indexes on top of these vector fields. A vector search index is a collection of vectors in [latent space](https://idl.cs.washington.edu/papers/latent-space-cartography/) that enables a semantic similarity search across all data (vectors) contained within.
9+
Embeddings are created by sending data to an embedding model, where it is transformed into a vector, which then can be stored as a vector field within its source document in vCore-based Azure Cosmos DB for MongoDB. vCore-based Azure Cosmos DB for MongoDB supports the creation of vector search indexes on top of these vector fields. A vector search index is a collection of vectors in [latent space](https://idl.cs.washington.edu/papers/latent-space-cartography/) that enables a semantic similarity search across all data (vectors) contained within.
1010

1111
![A typical embedding pipeline that demonstrates how source data is transformed into vectors using an embedding model then stored in a document in an Azure Cosmos DB vCore database and exposed via a vector search index.](media/embedding_pipeline.png)
1212

@@ -16,15 +16,15 @@ Vector search is an important RAG (Retrieval Augmented Generation) pattern compo
1616

1717
A vector index search allows for a prompt pre-processing step where information can be semantically retrieved from an index and then used to generate a factually accurate prompt for the LLM to reason over. This provides the knowledge augmentation and focus (attention) to the LLM.
1818

19-
In this example, assume textual data is vectorized and stored within an Azure Cosmos DB for MongoDB vCore database. The text data and embeddings/vector field are stored in the same document. A vector search index has been created on the vector field. When a message is received from a chat application, this message is also vectorized using the same embedding model (ex., Azure OpenAI text-embedding-ada-002), which is then used as input to the vector search index. The vector search index returns a list of documents whose vector field is semantically similar to the incoming message. The unvectorized text stored within the same document is then used to augment the LLM prompt. The LLM receives the prompt and responds to the requestor based on the information it has been given.
19+
In this example, assume textual data is vectorized and stored within an vCore-based Azure Cosmos DB for MongoDB database. The text data and embeddings/vector field are stored in the same document. A vector search index has been created on the vector field. When a message is received from a chat application, this message is also vectorized using the same embedding model (ex., Azure OpenAI text-embedding-ada-002), which is then used as input to the vector search index. The vector search index returns a list of documents whose vector field is semantically similar to the incoming message. The unvectorized text stored within the same document is then used to augment the LLM prompt. The LLM receives the prompt and responds to the requestor based on the information it has been given.
2020

2121
![A typical vector search request in a RAG scenario depicts an incoming message getting vectorized and used as input to a vector store index search. Multiple results of the vector search are used to build a prompt fed to the LLM. The LLM returns a response to the requestor.](media/vector_search_flow.png)
2222

23-
## Why use Azure Cosmos DB for MongoDB vCore as a vector store?
23+
## Why use vCore-based Azure Cosmos DB for MongoDB as a vector store?
2424

25-
It is common practice to store vectorized data in a dedicated vector store as vector search indexing is not a common capability of most databases. However, this introduces additional complexity to the solution as the data must be stored in two different locations. Azure Cosmos DB for MongoDB vCore supports vector search indexing, which means that the vectorized data can be stored in the same document as the original data. This reduces the complexity of the solution and allows for a single database to be used for both the vector store and the original data.
25+
It is common practice to store vectorized data in a dedicated vector store as vector search indexing is not a common capability of most databases. However, this introduces additional complexity to the solution as the data must be stored in two different locations. vCore-based Azure Cosmos DB for MongoDB supports vector search indexing, which means that the vectorized data can be stored in the same document as the original data. This reduces the complexity of the solution and allows for a single database to be used for both the vector store and the original data.
2626

27-
## Lab 3 - Use vector search on embeddings in Azure Cosmos DB for MongoDB vCore
27+
## Lab 3 - Use vector search on embeddings in vCore-based Azure Cosmos DB for MongoDBvCore
2828

2929
In this lab, a notebook demonstrates how to add an embedding field to a document, create a vector search index, and perform a vector search query. The notebook ends with a demonstration of utilizing vector search with an LLM in a RAG scenario.
3030

@@ -36,6 +36,6 @@ On the **Settings** screen, select the **Resource** tab, then copy and record th
3636

3737
![The Azure OpenAI resource settings screen displays with the endpoint and key values highlighted.](media/azure_openai_settings.png)
3838

39-
>**NOTE**: This lab can only be completed using a deployed Azure Cosmos DB API for MongoDB vCore account due to the use of vector search. The Azure Cosmos DB Emulator does not support vector search.
39+
>**NOTE**: This lab can only be completed using a deployed vCore-based Azure Cosmos DB for MongoDB account due to the use of vector search. The Azure Cosmos DB Emulator does not support vector search.
4040
4141
Please visit the lab repository to complete this lab.

09_LangChain/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ LangChain agents can leverage tools and toolkits. A tool can be an integration i
1010

1111
## LangChain RAG pattern
1212

13-
Earlier in this guide, the RAG (Retrieval Augmented Generation) pattern was introduced. In LangChain, the RAG pattern is implemented as part of a chain that combines a retriever and a Large Language Model (generator). The retriever is responsible for finding the most relevant documents for a given query, in this case, doing a vector search on Azure Cosmos DB MongoDB vCore, and the LLM (generator) is responsible for reasoning over the incoming prompt and context.
13+
Earlier in this guide, the RAG (Retrieval Augmented Generation) pattern was introduced. In LangChain, the RAG pattern is implemented as part of a chain that combines a retriever and a Large Language Model (generator). The retriever is responsible for finding the most relevant documents for a given query, in this case, doing a vector search on vCore-based Azure Cosmos DB for MongoDB, and the LLM (generator) is responsible for reasoning over the incoming prompt and context.
1414

1515
![LangChain RAG diagram shows the flow of an incoming message through a retriever, augmenting the prompt, parsing the output and returning the final message.](media/langchain_rag.png)
1616

@@ -20,4 +20,4 @@ When an incoming message is received, the retriever will vectorize the message a
2020
2121
## Lab 4 - Vector search and RAG using LangChain
2222

23-
In this lab, you will learn to use LangChain to re-implement the RAG pattern introduced in Lab 3. Take note of the readability of the code and how easy it is to compose a reusable RAG chain using LangChain that queries the products vector index in Azure Cosmos DB MongoDB vCore. Lab 4 concludes with the creation of an agent with various tools for the LLM to leverage to fulfill the incoming request.
23+
In this lab, you will learn to use LangChain to re-implement the RAG pattern introduced in Lab 3. Take note of the readability of the code and how easy it is to compose a reusable RAG chain using LangChain that queries the products vector index in vCore-based Azure Cosmos DB for MongoDB. Lab 4 concludes with the creation of an agent with various tools for the LLM to leverage to fulfill the incoming request.

11_User_Interface/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Connect the chat user interface with the chatbot API
22

3-
In the previous lab, you configured and deployed the Backend API code that integrates Azure Cosmos DB for MongoDB vCore with Azure OpenAI. When the Azure resource template for this lab was run to deploy the necessary Azure resources, a front-end web application written as a SPA (single page application) in React was deployed.
3+
In the previous lab, you configured and deployed the Backend API code that integrates vCore-based Azure Cosmos DB for MongoDB with Azure OpenAI. When the Azure resource template for this lab was run to deploy the necessary Azure resources, a front-end web application written as a SPA (single page application) in React was deployed.
44

55
You can find the URL to access this front-end application within the Azure Portal on the **Web App** resource with the name that ends with **-web**.
66

@@ -35,7 +35,7 @@ Go ahead, ask the service a few questions about CosmicWorks and observice the re
3535

3636
## What do I do if the responses are incorrect?
3737

38-
It's important to remember the model is pre-trained with data, given a system message to guide it, in addition to the company data it has access to via Azure Cosmos DB for MongoDB vCore. There are times when the Azure OpenAI model may generate an incorrect response to the prompt given that is either incomplete or even a hallucination (aka includes information that is not correct or accurate).
38+
It's important to remember the model is pre-trained with data, given a system message to guide it, in addition to the company data it has access to via vCore-based Azure Cosmos DB for MongoDB. There are times when the Azure OpenAI model may generate an incorrect response to the prompt given that is either incomplete or even a hallucination (aka includes information that is not correct or accurate).
3939

4040
There are a few options of how this can be handled when the response is incorrect:
4141

0 commit comments

Comments
 (0)