Full Transcript
Hello everyone. Welcome back to our channel learn with me. In previous class we completed in prompt engineering series customer support chatbot. In today's class we are going to discuss rag topic. So before understanding rag, first let's see how AI works without rag. So without rag models like in a chat GPT cloud or Gemini works based on something called LLM. LLM stands for large language models. So these models are trained on huge amount of data. So whatever answer they give, it is based on the data they were trained on. So but there is one problem. If you ask any question about latest updates, sometimes the model may not know the answer. Because the model is trained only up to a certain time. It does not have real-time or new data. In that cases the AI may give an incorrect answer or give a general answer or say I don't know. So for example, let me take an example. Let me show you a simple example. Open chat GPT and ask what is your training data cut off? It may something like my knowledge is updated up to an August 25. Now if you ask what are the updates in 2026? It may not know the answer or give an incorrect or in a guessed answer. This happens before because the model is not trained on that latest data. So to solve this problem a technique is called rag. So in rag will be introduced. Rag stands for retrieval augmented generation. Okay, what is retrieval? Retrieval means searching and getting relevant information like in a Google search or finding answers in your book or searching file in a your laptop. That is retrieval. Retrieval means searching and getting relevant information. We take some example. So you go to a librarian. So you ask in a librarian, "Give me a Java book." The librarian told you, "Go and find the book." You search in a book and find relevant content. This process is called retrieval. Retrieval means searching and finding the relevant information is called retrieval. The next is augmented. Augmented means adding in a extra information. So, in drag, we add retrieved data to the AI. So, now AI will give in a generated in a new answers. So, let me take another example. So, AI alone knows Python is in a programming language. But, after augmentation, it also sees your document. Python is used in your company for in a automation. Now, answer becomes more accurate plus personalized. So, augmentation means adding extra information to the AI. We We add retrieved data to the AI. That is an augmentation. So, let me take in a another real-time example. So, teacher already knows in a subject, but before teaching, it reads your notes also. So, now explanation becomes better. That extra information is an augmentation. The next is generation. So, generation means creating the final answers. So, now AI has both retrieved data and augmented info. So, it produces in a human-like response and a accurate response. Okay, now we understand. Retrieval means searching and finding the relevant information. Augmentation means the retrieved data we will give in a AI. So, the AI will generate in a accurate answers. That is an a rag. So, rag is an a system where AI retrieves the information, add it to the knowledge, and generate in a better answers. So, let me take in a real example. So, reads the book is an a retrieval and understand that notes is an augmentation. Writing answers in exam is an a generation. Here you take an a workflow. First, user ask in a question. So, the retrieval process. So, according to the question it find an a relevant information. That finding the relevant information given to an a AI is an a augmentation. Then AI will generate an a answer. Accurate answers is an a generation. These are the steps in rag, retrieval augmentation generation. Why rag is powerful? Without rag, AI guesses or may given a wrong answers. But with rag, it uses in a real data and gives an a correct answers and works with an a private data. So, where we used in rag? Like in a company chatbots, student assistant, and e-commerce customer support. Okay, in simple, instead of depending only on trained data, we also provide our own data to the AI. That is an a rag. So, example, let's say you are building an a chatbot for any company. Before asking questions, we upload company privacy policy, company documents, and product details. So, now AI has both own trained knowledge and our provided data. When we ask in a question "What is your company refund policy?" Instead of guessing, the AI will searches the uploaded document and finding the correct information and given a accurate answers. So, rag helps AI move from guessing answers to given a accurate answers using any real data. Think like this, without rag, AI is like in a student answering from a memory. But with rag, AI is like in a student who can open your book and then answer. Right? Without rag, AI answer based AI answer based only on trained data. So, it may not know the latest or specific information. But, with RAG, we provide our own data and AI uses that to the that to give an accurate and relevant answers. That is in a RAG. I hope you understand this class exactly what is RAG and how the RAG will works and how the RAG used in real-life examples. So, see you in the next class. If you like this video, don't forget to like, share, and subscribe to our channel.