Skip to content

Commit 810711c

Browse files
committed
^
1 parent 3a9ebfe commit 810711c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

07_Vector_Search_Cosmos_DB/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Vector search is an important component of the RAG (Retrieval Augmented Generati
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. Both the vectorized 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 generates a response back to the requestor based on the information it has been given.
19+
In this example, assume textual data is vectorized and stored within an Azure Cosmos DB for MongoDB vCore database. Both 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 generates a response back 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 back to the requestor.](media/vector_search_flow.png)
2222

0 commit comments

Comments
 (0)