Skip to content

Commit ac5bea7

Browse files
docs: fix grammar and typos in lesson 15 README
Correct wording, terminology, and image alt text in the lesson 15 RAG README.
1 parent 645f932 commit ac5bea7

1 file changed

Lines changed: 11 additions & 11 deletions

File tree

15-rag-and-vector-databases/README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ After completing this lesson, you will be able to:
2222

2323
- Explain the significance of RAG in data retrieval and processing.
2424

25-
- Setup RAG application and ground your data to an LLM
25+
- Set up a RAG application and ground your data in an LLM
2626

27-
- Effective integration of RAG and Vector Databases in LLM Applications.
27+
- Effectively integrate RAG and vector databases in LLM applications.
2828

2929
## Our Scenario: enhancing our LLMs with our own data
3030

@@ -36,7 +36,7 @@ For this lesson, we want to add our own notes into the education startup, which
3636

3737
- `Azure AI Search` and `Azure Cosmos DB:` vector database to store our data and create a search index
3838

39-
Users will be able to create practice quizzes from their notes, revision flash cards and summarize it to concise overviews. To get started, let us look at what is RAG and how works:
39+
Users will be able to create practice quizzes from their notes, revision flash cards and summarize them into concise overviews. To get started, let us look at what RAG is and how it works:
4040

4141
## Retrieval Augmented Generation (RAG)
4242

@@ -56,9 +56,9 @@ Suppose you want to deploy a chatbot that creates quizzes from your notes, you w
5656

5757
- **Augmented Generation:** the LLM enhances its response based on the data retrieved. It allows the response generated to be not only based on pre-trained data but also relevant information from the added context. The retrieved data is used to augment the LLM's responses. The LLM then returns an answer to the user's question.
5858

59-
![drawing showing how RAGs architecture](images/encoder-decode.png?WT.mc_id=academic-105485-koreyst)
59+
![Diagram showing RAG architecture](images/encoder-decode.png?WT.mc_id=academic-105485-koreyst)
6060

61-
The architecture for RAGs is implemented using transformers consisting of two parts: an encoder and a decoder. For example, when a user asks a question, the input text 'encoded' into vectors capturing the meaning of words and the vectors are 'decoded' into our document index and generates new text based on the user query. The LLM uses both an encoder-decoder model to generate the output.
61+
The architecture for RAG is implemented using transformers consisting of two parts: an encoder and a decoder. For example, when a user asks a question, the input text is encoded into vectors capturing the meaning of words, the vectors are matched against the document index, and the model generates new text based on the user query. The LLM uses an encoder-decoder model to generate the output.
6262

6363
Two approaches when implementing RAG according to the proposed paper: [Retrieval-Augmented Generation for Knowledge intensive NLP (natural language processing software) Tasks](https://arxiv.org/pdf/2005.11401.pdf?WT.mc_id=academic-105485-koreyst) are:
6464

@@ -76,13 +76,13 @@ Two approaches when implementing RAG according to the proposed paper: [Retrieval
7676

7777
## Creating a knowledge base
7878

79-
Our application is based on our personal data i.e., the Neural Network lesson on AI For Beginners curriculum.
79+
Our application is based on our personal data, i.e., the Neural Network lesson from the AI for Beginners curriculum.
8080

8181
### Vector Databases
8282

8383
A vector database, unlike traditional databases, is a specialized database designed to store, manage and search embedded vectors. It stores numerical representations of documents. Breaking down data to numerical embeddings makes it easier for our AI system to understand and process the data.
8484

85-
We store our embeddings in vector databases as LLMs have a limit of the number of tokens they accept as input. As you cannot pass the entire embeddings to an LLM, we will need to break them down into chunks and when a user asks a question, the embeddings most like the question will be returned together with the prompt. Chunking also reduces costs on the number of tokens passed through an LLM.
85+
We store our embeddings in vector databases as LLMs have a limit of the number of tokens they accept as input. As you cannot pass the entire embeddings to an LLM, we will need to break them down into chunks and when a user asks a question, the embeddings most similar to the question will be returned together with the prompt. Chunking also reduces costs on the number of tokens passed through an LLM.
8686

8787
Some popular vector databases include Azure Cosmos DB, Clarifyai, Pinecone, Chromadb, ScaNN, Qdrant and DeepLake. You can create an Azure Cosmos DB model using Azure CLI with the following command:
8888

@@ -141,9 +141,9 @@ A challenge with retrieval comes in when there is no similar response to the que
141141

142142
### Vector Similarity
143143

144-
The retriever will search through the knowledge database for embeddings that are close together, the closest neighbour, as they are texts that are similar. In the scenario a user asks a query, it is first embedded then matched with similar embeddings. The common measurement that is used to find how similar different vectors are is cosine similarity which is based on the angle between two vectors.
144+
The retriever will search through the knowledge database for embeddings that are close togetherthe nearest neighbors—as they represent texts that are similar. In this scenario, when a user submits a query, it is first embedded and then matched with similar embeddings. The most common measurement used to compare vector similarity is cosine similarity, which is based on the angle between two vectors.
145145

146-
We can measure similarity using other alternatives we can use are Euclidean distance which is the straight line between vector endpoints and dot product which measures the sum of the products of corresponding elements of two vectors.
146+
Other metrics we can use to measure similarity include Euclidean distance, which is the straight line between vector endpoints, and dot product, which measures the sum of the products of corresponding elements in two vectors.
147147

148148
### Search index
149149

@@ -236,7 +236,7 @@ chatbot(user_input)
236236

237237
## Use Cases for using RAG (Retrieval Augmented Generation) and vector databases
238238

239-
There are many different use cases where function calls can improve your app like:
239+
There are many different use cases where RAG can improve your app, such as:
240240

241241
- Question and Answering: grounding your company data to a chat that can be used by employees to ask questions.
242242

@@ -248,7 +248,7 @@ There are many different use cases where function calls can improve your app lik
248248

249249
## Summary
250250

251-
We have covered the fundamental areas of RAG from adding our data to the application, the user query and output. To simplify creation of RAG, you can use frameworks such as Semanti Kernel, Langchain or Autogen.
251+
We have covered the fundamental areas of RAG from adding our data to the application, the user query and output. To simplify creation of RAG, you can use frameworks such as Semantic Kernel, LangChain or AutoGen.
252252

253253
## Assignment
254254

0 commit comments

Comments
 (0)