From the course: Introduction to Large Language Models (LLMs) and Prompt Engineering by Pearson
Unlock this course with a free trial
Join today to access over 25,200 courses taught by industry experts.
Building a RAG bot
From the course: Introduction to Large Language Models (LLMs) and Prompt Engineering by Pearson
Building a RAG bot
Let's take a look at our retrieval augmented generation code. And just like in our slides, I am going to split this up into two components. First we'll talk about the retrieval in RAG. Now, funny enough, this is basically going to look exactly like our semantic search notebook that we looked at a couple of lessons ago. So really, I'm not going to spend too much time here. What I will point out as a difference is I am going to be making a new index. So I'm not using the same dataset that I used in the lesson a couple of lessons ago. I'm going to make a new index and I'm going to use a different embedding model. I'm not doing all of the work to figure out which embedding model I should be using, quote unquote. I'm assuming I've done all of that work from lesson two, I believe. So we know how to test embedding engines against each other. We know how to set up testing sets. We've already done that. So for now, I'm just making a new index, using the text embedding small engine, and calling…