From the course: Hands-On AI: Building Your First Conversational AI Chatbot
Unlock this course with a free trial
Join today to access over 25,200 courses taught by industry experts.
Upgrade 1: RAG (retrieval-augmented generation)
From the course: Hands-On AI: Building Your First Conversational AI Chatbot
Upgrade 1: RAG (retrieval-augmented generation)
- [Tutor] In this chapter, we'll introduce more ways to upgrade our chatbot. In this video, we'll implement RAG, Retrieval-Augmented Generation. Instead of showing the full integration and testing, we'll focus on upgrade code itself. I'll walk you through how RAG works, and show you the core upgrade logic. Once you understand the upgrade code, it's your turn to apply it to your own chatbot and try it out. RAG retrieves information from an external source, and then generates a response based on that information. Instead of relying purely on what the model has learned during training, RAG allows the system to actively look up relevant information from a knowledge base. Here's how it works. When the user submits a question, the system first uses a retriever model, like dense passage retrieval, or traditional search methods, like BM25, to scan through a large collection of documents and pull out the most relevant passages. These retrieved passages are then combined with the user's…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.