0:00Alright, let's get into something really cool today
0:03we're gonna build our very own private AI
0:06one that can read your personal documents,
0:08understand them and answer your questions about them and the best part
0:12we're gonna do it all using free powerful open source tools
0:17so let's just dive right in and see how this all comes together
0:20so let me just ask you this
0:22have you ever wished you had a personal AI assistant?
0:25You know one that could just chew through reports,
0:27pdfs any file you give it
0:29but and this is the big but
0:31without you having to upload your private data to some company's cloud
0:35or get locked into another monthly subscription.
0:37Well that is exactly what we're building today
0:40and we're not talking about some half baked concept here
0:44the agent we're about to create is 100% private.
0:47It runs entirely on your local machine.
0:49It works even if you're completely offline
0:52it uses this incredible stack of free open source software
0:55and you're going to love this
0:56it's a low code setup
0:58you don't have to be a programming genius to get this thing working
1:01okay, so to make this magic happen we need a tool kit
1:04think of it as the dream team for our local AI
1:07there are three key pieces of software
1:09that are going to work together to create our intelligent agent.
1:11Let's meet them first stop is a tool called N 8 n
1:15the best way to think
1:15About this is as the orchestrator or maybe the central nervous system.
1:19It's a low code platform where we can visually drag and drop nodes,
1:23connect everything together and basically build the logic,
1:26the brain of our AI without writing a bunch of complicated code.
1:30Next we've got qdrant. This is our AI's long term memory.
1:34It's a special kind of open source database called a vector database.
1:37And its whole job is to store the meaning of your documents,
1:41not just the words. So the AI
1:42can find and recall the right piece of information in an instant.
1:46And finally, the engine itself, alamama.
1:49This thing is brilliant.
1:51It's a tool that lets you download and run incredibly powerful
1:54large language models.
1:55These are the actual brains behind the whole operation
1:58right on your own computer.
1:59This is what gives our agent its ability to reason
2:02and have a conversation. Okay,
2:04so we've got these three powerful tools.
2:06How in the world do we get them all working together?
2:08You might be thinking this is the complicated part,
2:10but it's actually shockingly simple.
2:12All thanks to a preconfigured starter kit
2:14that really does all the heavy lifting for us.
2:17The entire setup really just boils down to these three simple steps.
2:21You clone a project from Github,
2:23you open that folder in your terminal and you run one single command.
2:27That one command uses Dockers to fire up N8,
2:30qudron and a llama,
2:32all perfectly configured to talk to Each other right out of the box.
2:35It's fantastic. So with our foundation all set up,
2:39the next critical step is to teach our AI how to learn.
2:42This means we're going to build a workflow
2:44that takes any document you upload
2:46and gets it ready for the AI's memory.
2:49what's actually happening under the hood here is pretty fascinating.
2:52When you upload a file, it doesn't just get saved first.
2:55It gets broken down into smaller,
2:57more manageable chunks.
2:59Then a special kind of AI model called an embedding model
3:02reads each chunk and turns it into a set of numbers,
3:05a vector. Think of it like a unique digital fingerprint
3:08that captures the meaning of that text.
3:10And then all those fingerprints get stored in our quadrant memory.
3:13Now this is a really, really important point.
3:16We're actually using two different types of AI models.
3:19The embedding model, think of that as a super efficient librarian.
3:23Its only job is to read everything,
3:25understand it, and organize it perfectly on the shelves.
3:29Then you have the chat model.
3:30That's like a subject matter expert you can talk to.
3:33They're the one who actually uses the librarian
3:35system to find the right book
3:36and give you a smart answer.
3:38They have different jobs, but they work together perfectly.
3:40And the best part is you're not locked in.
3:43The whole system is super flexible.
3:45If you want to try a new librarian or a different expert,
3:48you don't need To be a coder,
3:49you can just open up the Docker desktop app
3:51and pull new open source models right into Alabama
3:54with a click. It's that easy.
3:56Okay, so our AI can read documents and it can remember them.
4:00The final step is to build the actual brain of the operation,
4:04the part that ties your question,
4:06the document memory, and that chat model all together.
4:09So we jump back into NN's visual Builder
4:12and it's kind of like snapping Legos together.
4:14The user's message comes in.
4:16That message goes to a tool called a vector store retriever,
4:19which instantly searches our qdrant database
4:21for the most relevant fingerprints.
4:23Then that useful info
4:25along with your original question gets handed over to the chat model
4:28which crafts the final answer for you.
4:31So with all the pieces connected,
4:33our AI is ready for action.
4:35But before we see the final result,
4:36I want to cover a quick pro tip
4:38for a really common error you might run into.
4:40And trust me,
4:40seeing this error is actually a fantastic learning opportunity.
4:44Sooner or later,
4:45especially if you start experimenting with different embedding models,
4:48you might see a pretty intimidating looking error pop up
4:51after you've already uploaded some documents.
4:53But don't worry, it is super easy to fix.
4:55Once you understand what it's telling you,
4:57the error will look something just like this.
5:00It's going to start talking about a vector dimension mismatch.
5:03I know it sounds super technical and Complicated,
5:06but I promise the concept behind it is actually incredibly simple.
5:10Vector dimension is just the digital fingerprint size
5:13that your embedding model,
5:14your librarian creates. See,
5:17different models create different sized fingerprints.
5:19Some might be small, some might be large.
5:22This error is just the system telling you, hey,
5:24the new librarian you hired
5:25is trying to find fingerprints that are a different size
5:27than the ones we already have on file
5:29from the old librarian. That's it.
5:31They just have to match. And the fix is piece of cake.
5:34First you just make sure your N&N workflow is officially using
5:38the new embedding model you want.
5:40Then you pop over to the qdrant dashboard
5:42and just delete the old collection of documents.
5:44That's it. The next time you upload files,
5:46they'll get stored with the correct new fingerprint size
5:49and that error will be gone for good.
5:51And with that, you're done.
5:53Your private local AI is fully operational.
5:56It can take in new documents and answer questions
5:59using only the knowledge inside them.
6:01You can even generate a little snippet of code to embed
6:03this chat widget right on your own personal website.
6:07And this really gets to the heart of it
6:08as the source material says so well,
6:10this whole setup is so powerful
6:12precisely because it combines all these amazing best in class
6:16free and open source tools together.
6:18You're getting the power of a super sophisticated AI system,
6:21but with 100% of the Control and privacy in your hands.
6:25So that really just leaves us with one final thought.
6:28Now that you have the blueprint to build a personal AI
6:31that can learn from literally any document you give it,
6:33what are you going to create?
6:35The possibilities are absolutely endless.