Transcription
Have you ever wished that your AI could use your business's deep knowledge perfectly, not just searching the internet or guessing?
After selling my top 100 UK startup and building AI operating systems for literally hundreds of businesses, I'm going to show you the game changer for retrieval augmented generation. Today, I'm going to show you two new powerful ways to build this in NA10 so that by the end of the video, your AI agents will be 10 times smarter. And the best part is you need zero coding experience to do this.
Now, none of this will make any sense unless you understand what Rag is and why most businesses, tutorials, and agencies are using it completely incorrectly. So, we've got this AI system here and we've got this chatbot. So, imagine that you and I have a secretary and whenever we ask this individual questions about our business, our client's business, they use their short-term memory, right? And they forget things and they get things incorrectly. rag or retrieval augmented generation is like giving that individual a huge filing cabinet and instead of relying on their memory whenever we ask them a question they just shoot over pick up the relevant file and show it to you.
So, for example, in this case, if we were to ask our chatbot a question, I could say something like, "Hey, what are the $100 million money models?" Like this. We then send this one off. And as you can see in the scenario right here, it's then using the whole system, it's checking our filing cabinet to get the correct answer and the correct data. Instead of actually using three complete different books worth of context, and then we'll actually get an answer back within the chat window. And as you can see, we get this beautifully detailed system that answers the question better and it has access to all the information.
Now, understanding how it works is one thing, but if you actually don't know how to get the secretary to what we call vectorize and store your data in the filing cabinet, you're never going to be leveraging any of this. Now, here's a key thing that most people get wrong is that they give a level one secretary. The level one secretary is bad at organizing things. This is what we call the vectorization process. And what I'm going to show you here is how you can actually instead of getting a level one, which might be an open AI small embeddings model, I'm going to show you how you can use a level 10 embeddings model, which is one of the biggest influences on the quality of answers you're getting and that most people are missing.
Now, believe this or not, there are actually leaderboards for this stuff. I'm not joking. Genuine leaderboards do exist for this. And as you can see the title of this one, actually, one of my buddies who works professionally AI said this. It's really funny. These are embedding models. Now, embedding models, just think of it as the secretary. This is how good is a secretary at doing their job. Now, most people when they embed their company data for their clients or for their business, use a really crap secretary. And what I'm going to show you to do here is use one in the top 10, not a really bad math level one secretary. And most people don't even really touch on how good the secretary is. So, I'm going to show you how to use level seven in your system.
So, to do that, we're going to head over to NHSN. that I'm going to shoot over to the community and grab a blueprint. So, one of the things that I'm really big on doing here is making the process as easy as possible. So, if you come down here, let me just download this rag system very quickly. Come over here and download that. You head over to nat.io, which if you don't know is an platform that we're going to use today to build this. You come over here, you click on import from file. You select that file and then the whole thing will be plugandplay and upload, which means you can use this to basically just all the company documents, whatever you want to.
So the way this is going to work is we want to basically get like give it data. So there's many ways to do this. You can do it with Google Drive. So it's all set up automatically. We cover lots of cool stuff like that in the community. But what I want to do here is add this module which is on form submission. We just simply say I want you to insert a document and file. Right? Then we're going to add in this pine cone vector store which is super easy. So let me show you how you build this one very quickly step by step. So all I'm going to do is just simply delete this very quickly so you can see the whole process.
All right. So we come down here. We're going to have a insert. Uh, we're going to go for form which would be N8 form which is great. You come down to trigger on form event. Awesome. Call this one something like bench press nation cuz guys if we're not working out chest what on earth are we doing? And we just say here upload company docs or whatever the thing is that you'd like to do. This is a really simple way by the way to get your files into NHM. We can also use Google Drive. Got loads of tutorials on how to do that. And then literally that is all you need. Of course, we are not savages. So, we must add an emoji. And since this is a cool powerful automation, I'm going to show you strong one. And guys, the quality I've got from this is insane compared to the other models I've used. So, come down to add a form element. Call this one file like so. Element type is literally file. And you see, you need no coding to do any of this stuff, guys. It's crazy. Then just click on execute step. This opens up. Then choose a random file. I've picked a money models one. You click submit and then you come back to this and then it appears in there automatically. By the way, this works for CSV files, Word documents, PDFs, anything that you like.
Now, the next thing we need to do is use a kind of like a rag system. So, to do that, we're going to click and if this sounds complicated, completely normal, by the way. No one knows what any of this stuff means when they get started. I just want you to type in the word pine cone. That's it. Pine cone vector store. And the one you're looking for is add documents for vector store. So, essentially what's happening here is we give it files and then pine cone is like great, give me the files. I am your um I am your secretary. In fact, well, Pine Cone's not the secretary. Pine cone is kind of the person that hands it off to your secretary, as we'll see.
So, to do this, we're going to head over now to pine cone to grab something. And then once you're on pine cone.io, you just create a brand new account. You can log in, which is really flipping cool. And then you'll see this page. So, I'm going to create an index. I'm going to call this one something like, well, I just got back from New York City and I've been eating the pizza. So, I'm going to call this one pizza. Okay? So, all lowercase. Now, most people, guys, come and use this really small one over here. We're actually going to go with multilingual E5 large seventh on the leaderboard. How cool is that? Our level 10 secretary. She's really, really cool and badass. And guys, I want you to touch nothing else. Just come down and create the index. That's it. We're good to rock and roll. Once that's done, the green light means that we're ready to rock and roll. The next thing we do is grab the API key, right? So, come down here, create an API key, call it something like pizza or whatever you'll remember. I definitely won't forget pizza, right? And then you copy the code. You come back over to NAN. You double click on that thing, come down here, create a new credential, throw that in there, click save, and then you're good to go. And then from the list, we should see pizza. And we do. We just select pizza. And that's cool. And that's all we need to do.
Now, this is where the magic comes. This is how we find our level 10 secretary. You come down to embedding. You're going to come down. Instead of going for the open eye model, guys, I just want you to click on embeddings. Hugging face inference. Now, the role that hugging face plays in this is it enables us to access all of these really cool embedding models that are just hosted and managed all over there. So, we don't need to do loads of crazy wild connections.
Now, all you're going to do is, and by the way, I'll put all these links down below for you so you can grab it. Is you're going to head over to hogingface.co, create an account, takes two seconds. Then, I want you to come over to your little profile photo. I need to add one obviously. And then we're going to come down here to access tokens. Dead simple. And then what you're going to do is create a new token. and give it a name. Again, we'll call this one pizza. And then I want you to just give it access to all the stuff. And once you've done that, you're going to come down and then I believe it's got everything that it physically needs, which is fantastic. And then click on create a token. And then just copy that information. Then we're back over to NAN. We double click on this guy. We're going to create a new credential here. Uh, or I'll just update this one here with you together. Uh, and all you're going to do, guys, once you're on this one here, is come on to API key, hit enter, hit save, and it should say connection tested successfully, guys. And that is the extent of the technical craziness that you need to know. Uh, somebody joining the community and having a good time. Cool.
Now we've done that. What we want to do now is add a little bit more information. So you click on this document thing and click on default data loader. Type of data is JSON or binary. So this basically is just saying are you giving me a file or are you giving me JSON text? We're going to give it PDFs and documents. So we just change it to binary. That's very cool. Text splitting simple. We're going to click on custom and click off this. Now, the reason we custom is because in our filing cabinet with our secretary, there's loads of ways we could organize it, right? We could put like one book per section or we could put a couple of pages per section. Generally speaking, we want each kind of folder in the filing cabinet to be large enough to get context, which is really important. So, we click on text splitter. I like recursive character text splitter. What this means, okay, is we organize every document by 2,00. But then the the chunk overlap is saying, well, I'll take the last 200 words of that file and I'll also put it in the next one. So you kind of get this beautiful overlap and you'll find that text is kind of overlapping and awesome. It just kind of helps with the retrieval side of things, guys. And now that's done, we are ready to go. So all we're going to do is come here. We're going to click on this and execute workflow. Fantastic. And then just upload some files.
And before we upload the documents, we just need to do one thing, which is to click on the hugging face model. And in the model under model name, guys, I just want you to pop in this. I'll again I'll put it down below so you can just improve it and just paste it in and then you'll be ready to rock and roll. Okay, I've uploaded Horos's box. I'm going to click submit like so. And as you can see guys, this is uploading perfectly and all of this right here is going to be added to our beautiful pizza database. Some say it is actually the most powerful pizza data place on the world. I mean I'm not saying that but people have said that I'm beautiful. This is working perfectly in the background.
Now, uploading this data is one thing, but if you don't know how to prompt it in your actual agent, you're going to leave about 100% of the results on the table. So, we really want to make sure that we can do that. So, while this is fully vectorizing, I'll show you exactly how you do that step by step. So, we're going to come down here and we're going to add in an AI agent by clicking on this guy, which is flipping awesome. I actually just got back from New York yesterday. I was competing in NA10's first ever AI agent competition where Nate and I, we went down there and we were building these kind of systems. It was so freaking cool. But let me tell you, uh, the diet definitely starts today.
So, we come down here and we want a module to trigger this. There's a million ways we can do it. We're just going to chat trigger to show you how corus works. So, we come off this and what we're going to do is bring this guy over here and just connect it. We're going to give it a model. A little hack, by the way, is you want a model that's great at calling tools. Not all of them are good at doing that. I'm going to give this one a model from Anthropic. GPT5 works also really well. Uh, and I have Claw Claude for Sonnet. If you haven't connected this, by the way, you just come down here. You head over to enthropic.com and just add a couple of bucks and credits and you're ready to rock and roll. Then no need for a memory, but we are going to give it a tool. This tool lets it call the system and this is the thing that we use to combine everything. So this has complete. So if I head over to our pizza pine cone console, you can see all the data. How freaking cool is this? And you can see here's this section right here that has everything. So we're going to test this one together and see how great it actually is.
So we're here. We've got the model. The tool we're going to give it now guys is really simply you might have guessed it. That nice thing that falls from trees. The pine cone. Pine cone vector store. Very very cool. Now previously I've used superbase. I'm really liking pine cone after testing extensively cuz I went down many deep rabbit holes for you to make as helpful as possible. We need to give an embedding. What we can actually do is just do the old classic copy and paste and duplicate this guy. Beautiful. And bring him over. And it's the same thing because if you think about the embedding is the secretary. What we want to say is that secretary knows the filing cabinet. So, we need to bring the same one back over. So, she's working on the installing. We need to work work on the retrieving. If we sent a different secretary, um, she doesn't know. By the way, this model in particular that you're using here, this multilingual one, as you might have guessed, not only is it super high performance, it's also exceptional at multi different languages, hence multilingual name. Then we click on this guy a little bit more. We're going to give it description. So, it's important to do this. We could say this is a rag database. It contains all the knowledge you need for anything to do with Alex Hormosi. Beautiful. And but we can give multiple different ones here. We select the index which for us is beautiful pizza. We can add this rerank result which by the way is great. So and I'll explain what rerank does in a second. That's the second hack here. Limit's going to be 20. So that's basically saying to the secretary how many files do you want me to bring back? Um, four we don't need. We want 20.
Now the reason we're giving 20 here is because we're going to have this reanker here from cohhere. If you don't have this you just lally go over to uh Google and type in cohhere reranker like so. Uh, you open up the page, you come over, you sign in uh, and basically you just get a very simple code which I will do right now. And once you're logged in, literally all you're doing guys is API keys, come over like so. And you can just create a brand new key, call it pizza if you like, generate trial key, and then you can copy it. You come back over to the scenario, click on coher ranker over here, enter in the API key like so, click save, and then that will work for you perfectly.
Now, the re-ranker, okay, is kind of like a secretary, a super secretary, right? So, our secretary is bringing back 20 files. And then the re-ranker is saying, "Look, give me those 20 files. I'm actually going to sit down and I'm going to look at all 20 and I'm I'm going to decide which of those 20 files, which four of them are the best four to give to the boss, to give to the person that's asking all these questions." And guys, that's literally all you're doing. So, now we can ask it a question. We click on open chat. We can say, "Oh, actually before we do this, of course, we need to give it a prompt so it knows what it's doing."
To do that, we click on the AI agent. You're going to come down here to more options and add a system message in. And then what we're going to do is full screen this so you can see. And you click on this guy and you paste all this sort of stuff, which is freaking cool. I'll put a link down below for this so you can just grab it and and use this one yourself. But essentially, we give it toolgating rules. We explain what it must do. We explain its role, its domains, principles, and crucially output format. how I want it to communicate with me. And then I've given loads of key information on retrieval ranking behavior, worksheets, toning style, scoping, all that sort of stuff.
Now, what's really cool here, guys, I've included an inbuilt reranker, which I basically, now if you think about it like this, the prompt we give it isn't optimized for rack. So, you may say, "Tell me about this." Right? Now, the secretary may misunderstand that in any number of ways. You could say, "Tell me about money models." She might take that too literally. Sometimes that happens. Right? So, what we want to do is build in what we call a query re-ranking agent. So, we can do this in two ways. We can prompt it, but even better, and I won't do it in this video. I'll show that in a follow-up video. I'm doing it in my community this weekend. We can actually full kind of class on it, the power of these re-ranking agents. So, if you want to check that out, uh, you can do, but effectively the idea here is that we have somebody that's in between us and secretary. He'll say, I'll say, tell me this. And what it will actually do is turn that into several different commands for the secretary, meaning that she's going to be or he's going to be way better at getting the thing that we need. How freaking cool is that?
So, you come down here, open chat. I'll say something like, "Tell me uh what the money models are and how I could apply it to my roofing company business that does $100 million a year and we want to scale." Something completely random like that. We hit enter. And what's really cool, guys, is actually you see these things turning. You can see how it works and you can actually see the process. So if something's ever not perfect, you can always find out by clicking on these and seeing what they're doing. So you can see the quer query reanker, how that's all working and how it's calling it and how that basically works. Bam. And just like that, guys, we've had it fully complete. So I open chat right here and we can see there you go. I wonder if I can just bring this out a little bit so you can see it's given me a TLDDR, a definition, everything that we needed. And as you can see, it's followed it exactly. It's pulled down all the correct information.
Now, the next thing that we need to do is actually take this information and present it in a front- end web app that you could use for your team or or basically, you know, your clients or whoever it is. But look sexy and amazing. You can download it. You can do a million things. Watch this video on screen to learn exactly how to do.