0:00 In 1945, an engineer called Vannevar Bush imagined a machine that could store all of his books, records, and communications. He called it an enlarged intimate supplement to his memory. 80 years later, his wishes came true, and now we have an avalanche of AI slop, big flashy videos, a bunch of 3D brains floating around, and whatever the hell this thing is. So, why are second brains so synonymous with garbage? I mean, aside from the fact that they're really easy marketing, they seem sufficiently complex such that, you know, an engineer might have to be involved in the making of it. They're also very easy to sell to people that don't understand how this stuff works as a way to improve their business productivity, you know, sell more products, and so on and so forth. In reality, though, I hold that personal knowledge bases can be good. I use mine for a business that does a fair amount of money every month, and what I want to do in this video is actually want to run you guys through a practical way that you can set one up for yourself. Best part of all is it'll only take you maybe 3 or 4 minutes. So, what is a personal knowledge base really? Well, it's just a 0:56 searchable pile of your own stuff plus AI looking that up before it answers you. Now, engineers in the past would call that process retrieval, and when you are augmenting an AI generation with it, naturally, it is retrieval augmented generation, or rag, which you probably heard about before. Back in the day, rag was super useful and used super commonly because AI models were pretty short on context windows, meaning you couldn't really fit a lot of things in there. And if you wanted to give an AI the ability to answer a wide variety of things and not hallucinate, uh you sort of needed to use the approach. Nowadays, we have way larger context windows capable of storing up to approximately 35 to 50 books worth for most open consumer models, meaning you can literally just dump everything that you want a model to talk to you about inside the context window, and it'll do just fine. Although, if you were to store 35 books worth of content, probably cost you a lot of money, so that is not recommended. However, the nuanced reason why something like a personal knowledge base makes sense, and the mechanisms I'm about to show you will improve its ability to answer questions for you, 1:58 especially on your own or proprietary data, is when you have a giant stack of context all in a model's context window, the model assumes everything is equally important. And so, if your knowledge base has information in it from forever ago, say, you know, a couple years ago you had a certain product price and, you know, your your knowledge base is being consulted to help you put together a proposal or something like that, it will treat that price the same as it will treat a new price. And that's just sort of how it works. It'll be really confident because to it, it's just like, "Hey, piece of text here, piece of text here. I don't know which one's true. I'm just going to return the first and easiest thing I can find." Now, a simple solution to that, which I'm going to run you through, is called recency weighting, where you stamp every new piece of information that comes into the system with a date. Then, you apply a little boost to things that were stamped with a date that is more recent, and then you apply a little bit of it a decrease in power to things that were stamped with a date that was a long time ago. That way, AI models will understand, "Okay, I should probably 2:54 look for things that are newer as opposed to things that are older." But, there's still a problem. The more text that you put in, the harder it is for an AI to effectively retrieve any one individual thing. This is a very known problem in large language models called context rot, where performance tends to go down the more context you have in the window. So, while theoretically speaking, you could add 35 books worth or maybe over a million tokens of content, uh in terms of practical uses, one, it'll cost way too much money in order for you to run that effectively. Two, it'll probably take way too much time because now the AI has to loop over 35 books worth. And three, it is less likely to be accurate than if you did it in the way I'm about to show you. A solution to that is called retrieval. Instead of sending all the data, what you do is you just have it somewhere else, and then you have the AI model search for what it's looking for first. And it can search it relatively efficiently uh through other plain text or through vector embeddings, which aren't super important right now. This is just scratching the surface, by the way. The current state-of-the-art 3:48 solutions tend to combine all of those things into one and then make them way better. In my case, which is called Engram, our knowledge base holds around 35 to 50,000 records at a time. We hold all of my get history, we hold all of our Claude sessions collectively as a company, as well as our video transcripts, and I make a lot of videos, you guys probably know, so I hope you can imagine that's a lot of tokens. As information comes in, we recency weight them to avoid the problem of, you know, when we consult an AI pulling information that might no longer be useful. And we also periodically sweep through it to remove anything that might no longer be valuable to us. Then when I ask Claude a question, literally any question about anything, and you can replace Claude with your own large language model if you use a different one, um it'll run an extremely fast bit of inference to quickly pick a right search term to consult that knowledge base. Then it will search the results, usually in under half a second or so, before returning me a handful of best matches, appending that to the prompt of the query that I asked, and then using 4:49 that information to answer. Which sounds pretty simple, but you would not believe the degree to which this makes my experience seamless. I never have to worry about storing any information anywhere. I never have to worry about Claude's memory failing. I never have to worry about it grabbing me the wrong information because it is almost always going to grab the recency weighted information that I actually want it to return me, not some random artifact of a conversation we talked about four weeks ago. So, how do you actually build something like this? Well, the first step is maintaining consistent context pipelines into your knowledge base. So, in my opinion, this step matters the most because obviously knowledge bases are only as good as the data. You need consistent context in via pipelines that refresh essentially every time an event occurs that produces data within your company. What you do is you define all of your sources first. So, maybe your email, for instance, or your website, or all of the leads that you have ever had conversations with, all of the Slack messages in your company, all of the transcripts of the calls from your 5:50 company phones, especially if they're VoIP. And then you build a small script called a connector. What that connector does is it pulls in only what is new data since the last run. Then it stamps that data with the current date and time. Example, my email connector uses the Gmail API with read-only access. That's important. You don't want to give this thing right access because it'll have total control of your life otherwise. Um when I ran it the first time, it pulled a full year of email from my last three accounts into the pipe. Now when I ran it a second time, it only had to grab the time since the last run. And to keep in mind, this thing is running on my own schedule. I set it to run once every 15 minutes. But obviously, depending on compute load, you guys can set it to run however you want. I would highly recommend you also add Claude sessions. That's even easier. So if you're using ChatGPT or Claude, all of those sessions are actually stored on your computer as plain text already. Makes them very easy to index. So the key thing is they normally are deleted after 30 days. This allows you to consult conversations that you had 6:50 months ago, which honestly usually are quite vital in building out ideas and nuggets from bigger projects, as well as not having you repeat yourself. So you can literally copy and paste this video transcript into your favorite agent and then ask it, "Hey, what are my sources?" and it could probably do a pretty good job of enumerating a few of them. Not to mention building out the rest of the pipeline, which looks like this. Now you can't actually just add the content itself. As much as that would be cool, the main way that this works is you turn every one of these long items into the long item itself, then some metadata, including a list of notes about what's actually in it. Usually rephrased a bunch of times to really capture the idea correctly. And that's what this next step does, which is called letting a cheat model write the summaries. You know, raw text itself is really hard to search, especially for AI models that are going to be doing this stuff via keyword matching. But if instead you do two things, first, create a short summary of the topic that you are putting into your system, essentially of the data, including the question that 7:51 somebody would probably type in order to find it, you solve that completely. Then, I'd also add what are called atoms, which are exact error messages, the exact fixes, any commands that work, let's say if you're building some sort of program or product, and decisions for why the person did what they did during that time period. What this allows you to do is essentially consolidate all of the various implicit decisions that people in your company are making, and then make them explicit, aka verbalize them, turn them into what's called institutional memory of your organization. Very powerful stuff, because now you have literally any workflow or process you or any agent could ever possibly want. Obviously, this step involves another of large language model. The way that I do it is I use Claude Haiku 5.5 right now. Before, I was using 4.5. In the future, I'll probably be using 6.5. But, basically, whatever the cheapest, um, you know, AI model is for the provider that you trust with this information, and then just give it a prompt, which your AI model can build from this transcript, and then have it create this 8:51 metadata, create that list of short notes, plus that list of atoms, every time something makes it into the system. The value here is now Claude or your other agent gets to search for the summaries. It doesn't even have to search for the raw data itself. And then, when it matches something in the summary, then it's just pointed to the raw data, so it actually gets the whole thing. Okay, so from here on out, all you have to do is actually make this searchable. Uh, most people overcomplicate this. They use things like vector databases. Uh, you don't have to use embeddings at all. Literally, the simplest and easiest way to do this is just plain text search. Uh, and this was like crazy when I figured this out. Um, you know, we read a lot of different ways that people were solving this problem, and obviously I built a lot of systems with RAG for a variety of clients up until that point. But, the second I realized, "Wait a second, you don't need RAG for this. There are people out there that are just doing this with plain text." I mean, inference time went down by like 9/10. The cost associated with maintaining all of these vector DBs, the embeddings cost, all of that went down by 9/10. And 9:42 yeah, we just have massive strings of text basically maintaining everything. The specific plain text algorithm is BM25. This one's been around since the 1990s. It just gives every document that you add, which is a piece of data, um like a score based off of the frequency of the words that you are using to search it up. Uh and turns out that's all you need. You know, Claude intelligently can infer the rest. I saw this way too late, but Boris Cherney, who's the uh guy initially behind the creation of Claude Code, the product that you and I use literally every day, said something like, you know, plain search outperformed every possible other approach by a lot. And uh yeah, I mean, just an insane realization that we've been overcomplicating things like RAG for a really long time. Anyway, aside from that, just make sure to keep it fresh. So, you do need to have some sort of script in the background that reruns and rechecks that the connector is working. If the connector does not working, then you're not getting new data into your engram, and then obviously all of it fails. This obviously no reason to be using this thing if it's not catching up with fresh 10:37 data on a regular time period. You will find things like, I don't know, API keys will get rotated, um some permissions will change, some routes won't work anymore, whatever. So, just make sure that you have something in your script to constantly update it. And yeah, there you go. Now you have the exact same second brain system that I and many multi-billion dollar companies out there use. This is initially built on top of a second brain system I read about from Cohere. Um they make obviously large language model products as well as, you know, actually build RAG systems. I saw their ingestion pipeline, and I thought to myself, how the hell can we add this in our company? And I actually ran some tests comparing it to like pre-existing RAG approaches that I had attempted. Saw it wasn't even close. I was like, "Okay, we need to dive really, really deep into this." If you guys want a prompt that lets you rebuild this whole thing in a copy-paste, um maybe you'll have an easier time doing that than just copying the transcript of this video, just click the second link in the description and you'll be taken to Maker Zero. It's It's home for literally all of my resources, 11:32 both you know, AI resources, broad educational and informational resources, curriculums, roadmaps, literally everything you need is just down below and it doesn't cost you a cent. Um, all you have to do is join and then I think you need to move over to the community tab and then you'll find it under recently uploaded. Copy, paste, it'll be on the left hand side of the page. Aside from that, thank you very much. If you guys like this video, please subscribe and leave a comment down below telling me what you guys would like me to record next. I get virtually all of my ideas directly from the comments these days and I really appreciate it every time. Catch all y'all in the next video.