“I want to give ChatGPT 10x more docs” - RAG Explained

Igor Larruz shows how RAG lets you feed ChatGPT your own documents. He walks through embeddings and vector databases, then builds a working chatbot using VectorShift, uploading a 75-page zombie plan PDF and turning it into 98 searchable chunks.
Chapters
All right, so in today's video we'll be exploring and then also applying some more advanced concepts when it comes to using LLMs, because there's a lot of buzzwords that get thrown around carelessly. Agents, chatbots, automations, rack, and all of these have a place, but the definitions of some of them have become so blurry that many of these definitions, especially with agents, are going to differ depending on who you ask. But all of them are undeniably important, especially for the future of tools and use cases. As we explore, explore them on this channel. And I'll also say this, all of these topics might be a little out of your comfort zone, purely depending on how much time you have spent engaging with these topics. But although we are about to review some theory, just to turn around and apply that theory in practice in a practical application today, I would just encourage you to stick with some of these more complicated concepts as all the advantages that you might be looking for are going to be hiding outside of your comfort zone. So I'll do my best to explain all of this and at the end of the video, you'll walk away with some practical applications that you could be using today. But since some of these stuff gets a little more advanced and you'll need a little bit of patience and it might take some brain power on your part to understand some of this. With that being said, let's dissect some of these buzzwords and I want to start out with some definitions. So we are both on the same page when we talk about some of these concepts. Namely, I want to define three words. First of all, automations, secondly, agents, and thirdly, rag. If we define these terms, we'll be ready to move on and zoom in on RAG and how it empowers automations and agents. And then in the end, I'll go ahead and give you multiple examples of how to actually work with rag. Empower LLM with your very own documents and super personal context. The dream of most businesses. So the point of this video is realistically showing you where we're today. And at this point I would also love to point out that this video is sponsored by vectorshift. They offer one of the easiest way to actually use RAG in your everyday workflow. And when they reached out, I was super excited because at the top of my list it actually said rag, Agents, explanation and tutorial video. So, so we get to do that. And I'll go a little more depth than I usually do on this channel. The first half of the video, by the way, it's going to be a bit more teacher mode rather than the excited here's what's new vibe that is typical to this channel. Okay, here's what you need to know. All right, so there's three big terms that we got to define here. Rag, automations, and agents. And we need to do this to be on a level playing field and to actually communicate when it comes to these more advanced concepts. Especially the definition of agents is very fuzzy these days and I want to just get that straight. We'll also talk about agents in practice briefly. Okay, but starting out with rag, it stands for retrieval, augmented generation. And what it means in practice is that you can massively expand the amount of knowledge that you can provide to LLM. And from all of my teaching around this, I always return to this nice little graph. It's just so beautiful and in my opinion, relatively simple to understand. This is a medium article by Bede and I just love this explanation because look, if you talk to something like ChatGPT, aka an LLM, basically what happens is you go from query, which is you, your prompt, it's the question you ask, or the thing you type into that chat box and it goes straight to the LLM and then the LLM gives you a response. Correct? That is the basic flow of things. Now with React, this changes a little bit because from the basic prompt that you sent, I don't know, right? When I say about penguins, for example, you actually do not directly move to the LLM. First you move to something called an embeddings model. And this is just technical terminology for basically a transformation of the prompt that you sent happening. Okay, so you don't need to know the technical details. All you need to know that your prompt is going to be turned into a so called embedding. And then the reason it's turned into embedding, because embeddings are storable into something that is referred to as a vector database. Again, no need to understand the technicalities here, but just know with vector database technology you can store a lot of embeddings. Embeddings are very tiny. Many, many embeddings fit inside of a vector database. And then what happens next is this. Step number three, you take the embedding with the prompt that you send back out of the vector database, you, you transform it back from an embedding into text and you feed that prompt back to the LLM. And then from the LLM you get the response as per usual. Now you might be asking yourself, Igor, why are we taking this round Trip, this makes no sense. Why can't we just send our prompt to the LLM and then get a response? Well, the secret sauce here is that you can turn a lot of documents, that you might have a lot of data, any type of context, into embeddings that then you store inside of your vector database. So when this final step happens and we retrieve the prompt back from the database and turn it from an embedding to text, you can take a whole lot more than just your prompt. You can search over the whole vector database, over all the embeddings stored in there, and then you can take all of the necessary info plus your prompt back into the LLM and then you get a response. The massive advantage of this is that you can use all of the data inside of the vector database with the LLM and you only bring what's necessary into the context window. Rather than working with something like ChatGPT, trying to upload 2030 documents here and hoping that it retrieves everything, no, you store that in the vector database and then you retrieve it whenever it's appropriate. And if not, it's just left in there. And that's the whole point of Rack. You basically get to access external data that is stored on the side when necessary. Now look, this does require some extra technology. This is not the way attaching or the knowledge base inside of ChatGPT exactly function. They never exactly communicated what technology they're using in the background. But people generally agree that most likely this is not RAG in the background. Because. Because with rag, you can attach a whole lot more, but it's also slower. That's one of the downsides. We'll talk about that later. But this is essentially what RAG is, okay? And this is just one of the building blocks to more advanced use cases. So now that we defined rag, let's talk about automations and then agents, because automations are thrown around a whole lot. But at the end of the day, a lot of people seem to think that automations are some revolutionary thing that emerged hand in hand with AI. And the truth of the matter is, automations are as old as the very first computer. Every conditional statement written could be considered an automation with a broad definition. If ego raises his hand, then play a sound effect. Now, if this would happen automatically and with code in the background, then this would be considered an automation. Now, the big change that happened recently is the fact that you can plug these LLMs like GPT4O, etc. Into your automation workflow so you can bring some intelligence to automation. All Of a sudden it's not just, hey, if Ego raises his hand, then play a sound effect. You can do things like if Ego raises his hand, use the ChatGPT Vision API, look at the frame, check if he has all 5 fingers up. If he only has 4 fingers up, then play a different sound effect. This is just a very simple example. And actually integrating the Vision API into Autom Automations is not that simple. It's way simpler with text, just because a lot of the tools that make automations happen without needing code usually only work with text anyway. The point being automations are just this causal relationship of hey, if this happens, then make this happen. And why people are getting really excited about some of them is because you have this intelligence in the middle all of a sudden that you can access from OpenAI or others. Now we get to the buzzword of the year, I guess. Agents. Well, what are they? The name's Bond. They're essentially a combination of everything we talked about. RAG and automations and prompts. But there's this whole long term reasoning idea that goes along with agents, which if I were to summarize, is more like you just state your goal, the agent figures out what steps and what actions need to be taken for you to get to your goal, and then the agent also takes all of those steps rather than a prompt which is like, hey assistant, I want you to do this task in this way. Here's all the other info you need. Now go do what you can. And then the assistant provides you with the best information possible. But it doesn't really take responsibility for the task being done. Whereas an agent is all about, okay, let me figure out how to get there. Let me also click the buttons and do the things necessary to get you to that goal. That's the idea of an agent. Now is this something that you should be using today? Honestly, no, not at all. We're just too early. Now this is not to say that there's no agentic workflows that work for people or that certain organizations use today already. This is more to say that for most everyday people and most everyday use cases, there's just no agentic workflow that is worth the hassle. A lot of times the workflows are hard to set up. They're unreliable as the long term planning and reasoning capabilities of the LLC LLMs are just not there yet. For these more action oriented workflows, you face hallucinations and even things like RAG that are absolutely necessary to do some of these more complex tasks don't supplement the Workflow. Well, so my opinion is that today this agentic feature is more of a dream than a reality. And it's a well founded dream. It's this utopia of technology actually doing the work for us. Or you could also call it dystopia. I suppose it all depends on your viewpoint. But my point here is this, that most everyday consumers should not be worrying about agentic workflows yet. What you should be worrying about right now is the things that I cover on the channel a lot. It's how do you communicate your personal context to the LLM? What kind of data and other context can you provide it for it to do a better job? What kind of use cases even exist out there? And then how can I combine all of that into a little chatbot that I can interact with today? Because if you build a little chatbot, if you use RAG dot, then you get the option to enhance it with rag. And then moving forward, when we get better models that are even better at reasoning and some of these agentic workflows become simpler and more reasonable, you're going to be able to take almost everything that you get here in the beginning and, and move it to this new workflow. Because communicating your personal context, formatting your data and figuring out what kind of goals you have that AI could aid you with are all things that you could already do today. All right, and now the time has come. We're going to dive into the practical part where I will be building two AI powered pipelines. One of them is going to be a classic chatbot and the other one a stripped down pipeline that includes rag and then you can plug it into whatever you want. So without further ado, let's switch to my screen here and look at the interface of vectorshift yet again. They're the sponsor of this video, but they built an amazing platform that gives you a lot of flexibility. And again, this is actually a video that I've been looking to make since a while. So when you log in, it looks actually quite simple, but it runs very deep. Now the good thing is that they do have a marketplace with various presets for you. So that's exactly where we're going to begin. We're going to be looking at two pipelines here. First things first, we're going to start with a standard chatbot. All we need to do is hit this import button and all of a sudden we have the entire chatbot with a bunch of notes that explain things. I won't be going into these notes. You can read these yourself. What I'll be doing here is showing you how to work this and how to get results with this as soon as possible. So, quick overview of the interface. It's actually very simple. Here on top, you have various functionalities nested inside of different categories. As you can see, as we're starting with one of these presets, which I, by the way, recommend, there's many great ones in the marketplace. We don't have to be using this a whole lot. I would recommend first getting working results and then looking into what you can integrate this into or where you could be pulling additional data from. So, as you can see, this is the simplest implementation of a chatbot. Right here on the left you have an input field, which is basically when the user types something into box, this gives him the opportunity to input something. All right, Then we just follow these lines. So one line goes into the knowledge base reader right here, and the second line goes into the OpenAI LLM. Okay? So whatever the user types gets passed to two points, the knowledge base and the OpenAI LLM. And at this point, I would like to remind you of the theory that we just looked at, because I told you, for vector databases to work, you need to pass the prompt to the vector database and you need to turn it into embedding on the way. And that's exactly what is happening here. This knowledge base reader takes in the prompt and then looks over the knowledge base that is attached here. And we'll look at how to customize this in just a second here. But for now, just realize that the prompt is getting fed to the knowledge base and also goes straight to the LLM. The LLM is basically an API call to whatever OpenAI model you want to call. Right here, I'll switch this to GPT4.0 mini right here, as that is the sweet spot spot when it comes to performance versus pricing. Okay. And as you can see, in this OpenAI LLM building block right here, we have a system prompt. You are a helpful assistant that answers user questions based on context and conversational history. Okay? And then at the bottom it says if you're unable to answer the question, or if the user requests, direct them to these support resources. And then there's the vectorshift documentation. You can book a call or go to the discord to get support. So obviously you could customize this and you could put in your own support links right here. So the chatbot has a fallback whenever it doesn't a certain response. But more importantly, here at the bottom is the prompt that gets fed to the LLM every single time along with the system prompt. Okay. And this prompt consists of three parts. First of all, you have the conversational history marked as history. Now, where does that come from? This might be a little confusing. You can see this little history word right here on the left. And if you just follow the line, you're going to see this chat memory block. And what this chat memory block basically does is really beautifully explained for you right here. If you're new to this or you can just listen to me. Basically takes the form full conversation that has happened so far, and it feeds it back to the LLM so it is aware of the context and of the previous conversations that you had. This is basically how you build chatbots. You save every single message to a list, and then every time the user prompts, you feed the list back along with the newest prompt. And that's exactly what's happening here. As you can see, the history gets fed, the user question gets fed, right, you see here user question. And the line goes back to the input, so the original prompt gets fed along with the history. And then last but definitely not least, we have the context. And the context, as you can see right here, links to the knowledge base. And that's what we'll talk about now. But the completionist in me just kind of wants to finish this up. So let's briefly talk about this output, because it is very simple. As it takes the system prompt plus these three variables, it generates an output, and this is what the chatbot would respond to you with. By the way, it's really easy to deploy as a standalone website or on a website. We'll look at that right after talking about the knowledge base, because now it's time to show you how to practically use RAG with a chatbot inside of a pipeline. You have the theory, you have the base layout of the practice here. Now, how do I customize this? How do I upload my own files? And how do I integrate my files into other pipelines? Well, right here you can see that there is a simple dropdown. The dropdown gives us two options right now. Vectorshift documentation and AIaKB1. And this is the one thing in this account that I did create already. It's the AI Advantage Knowledge Base one. And if I want to shift to it, I simply select it and then confirm that I am sure that I want to do that. And now I switched it up to the knowledge base. But wait a minute, where do I manage the knowledge base? Where do I create it? Well, here we're inside of the chatbot editor. So we have to go back out to the original page, which you can always do in this sidebar. If you just look at these words, you might already be able to guess where the knowledge base is hidden. Exactly right. It is under the Knowledge tab. And no worries, everything autosaves here. So our chatbot is still here. But in the knowledge tab you see the AIA KB1. This is literally the only thing that I did in preparation for this video. So you just hit create new knowledge base here with this plus. And then in here you can just add a document or you could even do something like scrape a URL. You give it a website, it looks for the entire website and imports the data into here. And then you can use the various sites that you scraped as your knowledge base or you connect one of these applications as an integration to get the knowledge base from there. So you could be using a type form, you could be taking things from your Google sheets, whatever. The opportunities here are vast. That's the whole point of using a more advanced system like this, where you get customizability versus just for example, building a GPT. But back to this knowledge base. So once I created it, I simply said choose upload files and then I can drag and drop files into here, or I can pick one of the files that I already uploaded here under files. What I did here is I uploaded this wonderful, wonderful PDF called Zombie Plan. Now I kid you not, this is literally a post apocalyptic plan on what to do when a zombie apocalypse happens. It has been issued by this county in where else could it be? Florida. So this is the official Okeechobee County Zombie Apocalypse Annex and includes various gems like a level system for the different levels of a zombie apocalypse. You have the prep period, you have the emergency period, assistance period, and the recovery period. If you scroll through this, this is full of very specific knowledge that you will absolutely not find inside of GPT4. And that is why I included it as sort of a fun and lighthearted example in here. And if you just dig into this, it includes various gems like the assessment that there is currently no assessment of any pro zombie or radical zombie rights groups, but history indicates that there will be some group that takes this odd stance in the face of the apocalypse. I kid you not, this is a real document and we'll be uploading it here as a file. Okay. And then inside of my knowledge base, it allowed me to add this document here from my files and Voila. After about three to four minutes, it turns this zombie plan PDF that is a glorious 75 pages long, as you can see here, into various embeddings. And again, this is where you need to understand the theory that we discussed in the beginning, because otherwise all of this stops making sense at this point. As you can see, The Zombie Plan PDF of 75 pages has been turned into a total of 98 different vectors, meaning there were 98 embeddings created and they were stored inside of 98 vectors. Now, why 98? It's 75 page PDF? Well, it's because of a process, and this is a new term that I'm introducing here that is called chunking. And essentially what chunking does is easier shown than explained, because right here, if I just open up the preview here, you can see that chunk number one includes everything in the PDF up until the words redevelopment activities. If I take the PDF and I look for redevelopment activities, I will find that they are right here. So the first chunk includes everything up until this point. Okay, so it's basically the entire first page is the first chunk, and the next chunk should begin with levels of the zombie apocalypse. There you go. Levels of the zombie apocalypse. It also includes the header right here. And this goes on nicely. You can see page two is this chunk, page three is this chunk. But at a certain point, these pages start getting more and more dense and all of a sudden chunk 21 is page 15 as it splits it up differently. Now, why is this important? It's important because if you're going to be accessing this much data, it can get messy. Okay, Already at this point, we have a total of 98 chunks, and this is just one PDF. Now imagine what happens if you show up here with 20 PDFs. That's going to be a whole lot of chunks that the LLM will need to look through. That's why we need to understand at least the basics of how the technology works with chunking and embeddings and storing them in a vector database and then retrieving them. Because you get to customize some of this stuff, and it's quite simple to customize, but you do need this level of understanding. So let me go back to my pipeline, just to recap, I uploaded a PDF here, created this knowledge base, and then added the PDF to the knowledge base, which then after a few minutes was turned into all these vectors. And now I can access this inside of my chatbot. So I'll go back to pipelines, I'll hit edit, and here in my knowledge base, as you can see, I have this AIA KB1 that I just showed you how to create. And now I can pull in all the data from the knowledge base into my results in this chatbot, because I'm infusing all of this context that comes from the knowledge base into GPT4.0 mini right here. And then of course, the output that gets produced will be passed to the output and displayed to the user as a chatbot output. Now let's talk a little bit more about this knowledge base before we move on to actually completing this bot. And then showing you a second use case. If I click this cogwheel right here, you will see that there is variety of settings. So the very first one already says max chunks per query. And this basically asks how many chunks am I supposed to pull in as context every single time a user queries something? Now remember, the way this is linked up is that the input goes into the knowledge base because we need it. We need to know what the user is looking for. So for example, if I go into the text and look for a word like shotgun, I will find that there's only one occurrence of it on page number eight right here. So it doesn't need to pull in the entire PDF. It only needs to look at the chunk that includes this word. And as it only appears one time, it only needs one chunk. But depending on your use case and the data that you feed it, you might need multiple chunks. And then you would want to bump up this number from two to something higher. In my case, two works super well. A lot of things inside of this wonderful document are tackled once. Like let's work with the example of a chainsaw that is also mentioned here. Chainsaws look great in the movies but will not be reasonable Self defense weapons during the Gray Plague. All right, so let's just take this keyword and let's test it based on this keyword. Right, let's just think about this for a second. If I go into my chatbot here and ask, hey, what about chainsaws? Should I be using those in Apocalypse? Then it should reply to me exactly this, that they look great in movies but are not a reasonable self defense weapon during the Great plague. And it will get that from the chunk that has been created for this particular page or this particular section of the PDF. So let's give this a shot. Let's go up here and press this button which is deploy changes, which is basically going to save and deploy all of this. That's more than saving it. Everything is live and we can start using it. How do we Use it well. You could hit play here and say run pipeline. But actually my favorite way is hitting export pipeline and going to chatbot. Okay, so if I do this, I can give this a name. I'm going to call this the AIA Chatbot one. And then the input is the user question. In the beginning we only have one input and the output is output one. We only have one output. In the end you can check auto deploy here and this will create the chatbot for you. And then what I'll do here is I'll hit export in the top right and you can see this thing is already live because we already deployed it. So I'm going to do the simplest thing possible here and I'm just going to open the chatbot and there you go. This is your live hosted version that you could share with a co worker, colleague, friend, family, whatever. And I'm going to ask it. Is using a chainsaw a good idea in a zombie apocalypse? Question mark. And now the assistant is processing it and let's see what it says. May not be the best idea. While they look impressive in movies. Yeah, there you go. This is the rag at work. They're impractical for self defense situations. Chainsaws are loud and could attract more zombies to your location. And they require fuel and maintenance which may be hard to manage in apocalyptic scenario. Instead, it is recommended to use quieter and more manageable weapons such as bladed weapons, etc. There you go. It even pulled in additional context from the documents for me. I bet that if I looked for this keyword I would find it somewhere in here. There you go. It was actually in the same chunk in the same page, so it was really easy for it to pull it in. Now mind you, this is why it's important to understand chunking. Because if this information was hidden not on page eight, but maybe on page 12, it would never be looking for that information and it would not be pulled present within the chatbot. It pulled this additional info because it was inside of the same chunk that it was already looking at. This is important to understand because it's going to change some of the decisions that you make while building this chatbot. Okay, going back to this page, one step back. As you can see, you can customize a lot of things about this chatbot. I'm not going to go into every single option here, but basically you could do something like limit the messages per conversation. Maybe you can say only 10 messages so that people don't abuse your API key that might be linked in the background. You can obviously also customize the look and feel of the chatbots. I'm going to call this the AIA Apocalypse Advisor. And you can customize some of the branding like so. I think you get the point. Don't forget to deploy your changes because that makes them live. And then again, if you go to export, you can either look at the chatbot just like we did on a website that is hosted under this URL. You could even protect it with authentication. I can even protect it with a password right here. So I'll just go ahead and say asdf. And now if I open the chatbot, you will see that it's protected. I need to type the password ASDF for me to access it. This is great to have. Additionally, you can connect it to Slack, activate it inside of a Slack channel. That's one of the simplest and most common use cases. But you can also hook it up to Twilio for it to send WhatsApp messages, SMS messages for you. These bots that you build, they're universal. If you want to go even beyond that, a Vector shift allows you to host your own API, like so. And that could literally link to anything. All right, so that's the basic bot that we built there. And I believe that I showed you how to use Rag and practice. But I want to go a step further here and show you some more options, people, because there really is a lot that you can do here. We're going to go back to the marketplace and I'll take something very simple here. I'm just going to take the simple chat with my files pipeline. Okay, I'm going to import this like so just by clicking it. And here we are. This is a very, very simple pipeline. One thing that is different here from the last one is that there is this chat file reader. What the chat file reader allows the user to do is they can upload their very own files. So you can build a chatbot where the user can upload files, just like you can upload files to ChatGPT. And this is just one of many options that you have in here. If start exploring and looking at the various options, you'll find that you can integrate a ton of various things. Like for example, I could pull in a YouTube video and it could read a specific transcript and then I could hook that up and the transcript could be a part of the prompt. Or I could go even fancier and I could use one of these logic points and I could start splitting the text of the YouTube video transcriptions. So maybe just the hook of the YouTube video goes into here and now. How do you do this? I believe by me showing you this one more time and how to integrate it into something else, you will be able to figure out how to do many of these steps by yourself. So let's see how to integrate a knowledge base here. Because none is present here. As you can see, there's an input as before, there's an output as before, there's a LLM in the middle as before. And we also have the memory as before. Right? It's this history variable, as you can see. Otherwise the bot would have permanent amnesia. But we now also have is this chat file reader. That's great. But that's. That's not the knowledge base. So how do I add it? I go to knowledge base and I drag and drop a knowledge base in here. We saw this before, so you might already know what to do. We need to select the knowledge base that we're going to be using. The AIA knowledge base one with the one PDF in it. And now what do I do? How do I make this work? How do I connect this? Because right now if I go ahead and try it out, if I deploy it and run it and ask, what about chainsaws? It's not going to give me anything. Look at that. I get an error message here. And I can see that these various nodes here ran, right? This one has a green check mark, this one has a green check mark, this one doesn't. Because I didn't upload any file that's not even possible right here. I would need to open up the separate website. But you can see that the OpenAI LLM actually ran and the output ran. And here's the output. It seems like you're asking about chainsaws, but you haven't provided any specific context. So just because this thing is in here, it does nothing. I need to connect it. How do I connect it? Let me show you. So you need to start by connecting the input into the knowledge base. Because as we talked about before, the knowledge base needs the input for prompt to search over all the embeddings that are stored inside of the vector database. Otherwise it doesn't know what to look for and it doesn't know which chunks it should retrieve and hand over to the LLM over here. So we definitely need this one connection. We established it like so by simply dragging and dropping. And now we can do the second connection, which is the output of the knowledge base once we found the correct chunks. And we can just plug that into here. But look at that it doesn't even work. There's no point. Where do we connect this? I want to connect it into here. Doesn't work. Well, what I'll do here is I'll go to a new line and I'll say context and here inside of context you can press this little button which makes it really simple to add a little variable and then you can just change the name of it. So I'll just name this context. And as you can see by adding a little variable like so, it actually opens up a new field here on the side. And now the LLM is not just pulling in the question, which is what the user inputs, not just pulling in the file, which is what the user uploads over here. Not just adding the history to that, it's also adding the context, the context. Where does it come from? Well, nowhere. Right now we don't have a connection. So let me take the results right here and as you can see, ahaha, we have a connection point and there you go, we hooked it up and now we added a knowledge base to this pipeline. And now if I deploy these changes and I go ask the same question, what about chainsaws? It should give me a response. Now I didn't reference the zombie apocalypse, but as you can see here, while they might appear effective and dramatic in movies, are not recommended as practical self defense weapons during a zombie apocalypse. Perfect. That's exactly the answer from the knowledge base in here. So this pipeline is working and we get a successful output. Again I can deploy the changes, I can share the chatbot like so I'll call him bot 2. Ah, that name already exists. Let's call him bot 3. And here we are again with the one change that. Now we can upload files as you can see, can see here. If I look on the final website as it's hosted right here, this little file upload button allows me to upload something to it and it will also consider that as context. And there you go. That's how you build chatbots or pipelines with RAG integrated into it. And one very last thing that I want to show you is that you can take these pipelines, right? These are not just chatbots and you can use them in various ways. So if I go ahead, I want to export this, you can also export this as an automation where you're not waiting for the user to do something with it. Meaning that the input field will be linked to something else, like a slack channel, for example. Meaning if you connect your slack account here and you say new message and you link that to a specific channel. Every time you send a new message on a channel, it will run through this pipeline and then the output again you can link to something else, to a Google Sheet or your Gmail, automatically send an email, whatever it might be. You can hook these things up. That's why they're called pipelines. It's the plumbing in between something coming in and something coming out. And you can decide where you want to plug the thing into that comes in and where you want to send the output that comes out. And then it just operates autonomously. And that's how these technologies work. That's how RAG can support some of these workflows. But as you can see, as soon as you venture into automations and chatbots, all of these techniques that we're learning, like prompting or rag, and now we learned about vector databases and chunking, all of it starts coming together to work autonomously. And today I showed you what's possible today quite easily. But this is really the idea that if you take it one step further, we're in this agentic future where these things don't just happen automatically, but the LLM also makes the decision on what should happen and where the routing should go. You won't be picking the integration agent, might be saying, hey, this belongs on this Slack channel and this belongs in this email and this belongs in an email to this particular person. And this we should post on social media, etc. That's really the idea of agent. It's taking what we looked at today and also giving it autonomous decision making and long term planning along with it. You could think of it as a separate AI kind of governing this whole interface and building various things in here. That's what an agent is. But the wonderful thing is with tools like this available today, you can become that agent and set these things up in a way that is useful to you. All right? And that is how to use Rack today. Thanks to VectorShift for sponsoring this video. You can try everything that I showed you today on the free plan in the description below. Obviously, if you want to be using this seriously, there are subscriptions available, links in the description and let me know in the comment what you might want to build with this. Or if you enjoy more educational tutorials like this one. I'm thinking about making more of these. All right, that's all I got for today. See you soon.










