The Ultimate Knowledge Base: Bring YouTube Into Your AI Second Brain

summarized

TLDR

The Open Knowledge Format (OKF) provides a universal standard for building AI-readable knowledge bases from YouTube channels, enabling agents to answer complex questions by citing specific videos and timestamps. Cole Medin demonstrates a complete OKF knowledge base for his 200-video channel and provides free skills to replicate the process for any channel. The pipeline involves extracting transcripts, canonicalizing concepts and entities, and linking them into a markdown-based knowledge graph.

Key points

  • OKF creates an agent-to-knowledge-base standard, similar to MCP for tools and A2A for agents.
  • Cole Medin built a full OKF knowledge base for his 200-video YouTube channel, allowing agents to answer questions with citations and timestamps.
  • The knowledge base structure includes a readme, an index with themes, raw transcripts, and separate concept and entity files.
  • Canonicalization aggregates repeated concepts and entities across videos, handling fuzzy matching for variations like 'PIV loop' vs 'plan-implement-validate'.
  • Three free skills are provided to build a knowledge base from any YouTube channel URL, using different transcript extraction services.
  • The process is token-heavy but enables quick navigation and summarization of large channels without watching every video.
  • SER API is highlighted as a tool for real-time web search integration into AI agents, avoiding scraping and proxy management.

Tools mentioned

Techniques

  • Canonicalization of transcripts into concepts and entities
  • Fuzzy matching for variant terminology
  • Knowledge graph construction via markdown links
  • Agent skill-based pipeline for automated knowledge base creation
Transcript (captions)
A couple weeks ago, I covered Google's new open knowledge format. It's a standard for creating knowledge bases for our personal agents and second brains. And it's a big deal because it takes the Carpathy LLM wiki which totally took the world by storm and it gives us a universal format so we can build knowledge bases not just for ourselves but to share with everyone. It defines a specification. So just like MCP created the agent to tool standard and A2A created the agent to agent standard. OKF is creating the agent to knowledgebased standard for us. And I love these standards because every single new one is a step towards making AI as accessible as it possibly can. I mean, think about how revolutionary MCP was for everyone last year. And so, I've been thinking about like, how can I share with you the power of OKF as simply as possible? What if I build a knowledge base that's so incredibly useful that you're just going to want to try it right now? So, what I've done is I've created an OKF knowledge base or bundle for my entire YouTube channel. You heard that right. 200 videos all packaged up ready for you to ask any questions over. And we are also going to talk about how we can do this for other YouTube channels because of course I'm not expecting you to want to stop with mine. So, over to my cloud code now. Let me show you this knowledge base in action and then I'll show you how I built it and how you can use a couple of skills that I have for you to build your own knowledge base for any YouTube channel. And so right here, I decided to ask a more complex question upfront. What is my entire endto-end process for building a new feature with AI coding agents? The kind of thing where you would have to watch a very full video or even a couple of videos to get the answer here, but I'm asking my agent to walk me through it step by step and even citing the specific videos where I teach each one. And so it digs around for a while here. It has the whole LLM wiki set up with the index file so it knows where to start, where to look, and then it gives me a very comprehensive answer. Take a look at this, which I read this off camera, by the way, and it's a perfect answer. It cites all the sources like the concepts and even the specific videos with the timestamps where it got the answer from. This is just so incredibly useful. And let me show you a couple of other questions just really quick here. When is rag dead? When is it still essential? the kind of question you probably have yourself or at least you did at one point. You don't always want to watch an entire video just to get the answer. So, we can get the answer at a high level and then click into the specific one if we want to learn more. Same kind of thing here. How does my second brain actually work under the hood? What are the key components and what videos explain each part? So, getting the summary and then we can dive more into it if we want to. So, not only are we able to use the knowledge base to get highle overviews and quick answers, but also to navigate larger YouTube channels, most of the channels you're probably following have hundreds of videos. And so, it's hard to keep up with everything. This knowledge base plus your second brain can be the ticket to do so. And to get started using this knowledge base yourself, it is just a single prompt you have to send into your agent. Maybe you have a second brain built on top of Claude code. You're using Hermes or OpenCloud, whatever. Just one prompt. So, I'll link to this GitHub repo in the description that has the full knowledge base for my YouTube channel. And if you scroll down in the readme right here, you just copy this prompt, send it into your agent, and you are off to the races. It will learn OKF if your second brain doesn't know the format already. It'll clone the knowledge base and then immediately be ready for you to ask any questions you want. So, I'll cover more in a little bit how I actually built the knowledge base. But first, I want to give you a highle overview of the structure so you can see how things are pieced together. So we start with the readme. This is just for you to understand the knowledge base and have this prompt to install it. The first file for the agent to view is the index. This is how it always works in every wiki. And so if your agent knows OKF already, it already knows how to navigate everything. The more important part of this index here is the themes. This is what gives the agent the highle overview of the knowledge that's actually here. What are the kinds of questions that we can answer? And so it starts here and then based on the user's question or your question, it's going to go through the different concepts and entities that we have laid out in the index document. And everything that we have here in the concepts, in the entities, in the index itself, it is just markdown. Everything is YouTube videos turned into markdown transcripts and then all the core concepts and entities extracted from them. And because everything is just markdown here, it's very easy for both us and our agents to navigate through everything. And so you're not always going to be doing this. Typically, you'll just have your agent search through the files. But if you want to sift through things yourself, you can just do so right in your IDE like VS Code or a platform like Obsidian. I use Obsidian and cover it all of the time. And so we can see all the files here. It also gives us the better formatting if we do want to take a look at the information here, maybe as you know, we're checking the sources that are cited from our agent, for example. And then the other thing that's definitely worth showing you quick is the brain for this knowledge base. Looking at the graph view in Obsidian, I think you can appreciate how much information is put together in this knowledge base and how everything is connected together as well. So we can see like this is how context engineering relates to vibe coding and we can see like oh man, it's hard to even read all this information. Here's how validation relates to the sub aent pattern. like we have all these connections that allow your agent to sift through the information and traverse through the graph very easily. And before you ask, yes, it took a lot of tokens with the LLM to build out this entire knowledge base. There's a reason I'm only doing it for my YouTube channel to start. Even though I would love to just get a huge list of all the best AI YouTube channels and build it all for you, I'll have to do that over time. But I also really love seeing how much information is here because it really shows us that without LLMs, we can't ever hope to build something like this. I mean, you can have a much more simplified version, but using a large language model to scale how much you can pull out information and connect information together. That is the beauty of the LLM wiki. One of the most important tools for your AI agents is web search. It is the way to give it access to current information. And no matter what you're building, you're going to need it. But you also don't want to build the web search capability yourself. You do not want to be maintaining scrapers, rotating proxies, fighting captas. I've done all of that before myself. SER API, the sponsor of today's video, is the shortcut that you need. It is a web search API that turns live Google results, YouTube videos, Bing, other search engines into structured JSON for your agent with a single call. No scraping code, no proxy management, and no anti-bot headaches. And it's incredibly easy to build SER API into your AI agents as a tool, like I'm showing right here with my custom Pantic AI agent. And this goes well beyond just getting plain Google search results as well. For example, you can use their Google Scholars API to get peer-reviewed papers to create a research agent. Or if you're training a model, you can use your Google images API to get images back with pre-classified titles, thumbnails, and URLs. News, trends, maps, they all come back the same structured way. And what I really like is everything is model agnostic. It doesn't matter the LLM or framework that you use cuz it's just an API where you or the agent defines the parameters and then you get the results back in the structure JSON that gives you everything you would get in a Google search. And every query is real time. So you're not just getting a cache copy of the results. Get started with SER API using 250 free credits by clicking the link in the description or scanning the QR code on screen. Cool. So, the next thing I want to show you really quickly is how I built up this knowledge base or this OKF bundle because you can replicate this even for something besides YouTube. You can use this kind of process to create any knowledge base you want. And obviously, there's quite a big process we had to go through here to extract hundreds of videos and pull out all the key concepts and ideas. And so there's a sort of pipeline that I built for my second brain here that I'll show you in the skills that I have for you in a little bit, but let's cover this first. So the first thing we have to do with all the YouTube videos is extract the transcripts. I want the transcripts as markdown documents because that's the best format for our LLM to work with and that's the format for the entire knowledge base in the first place. And so this raw folder right here, this has the transcripts for every single one of my YouTube videos. So clicking into any one of them like this, we can see the exact timestamps for the different sentences. This is the full video. It's a lot of text that we're dealing with here. But I want the raw transcripts in this knowledge base as well. That's obviously the best place to go to site sources and give exact timestamps if you want to watch the full video. And so then after we have the raw transcripts for each video, we're going to go through a process of canonicalization. Try saying that fast five times in a row. This is where we're going to look at all the transcripts at a bird's eye view and figure out the things that repeat themselves. What are the core entities and concepts that we want to write out as the individual files and then connecting things together, linking them back to their original videos so that we have the knowledge graph built up as well. So going back to our knowledge base here, we have the transcripts in the raw folder, but that is just the starting point here because the transcripts, they're not speaking to a specific topic. Usually a video covers many different topics. So if we really want to hone in, that's why we want to create our concept files covering A2A protocol abstraction distraction or we can look at entities and we can see all the tools that I cover on my channel like we have uh BMAD method or bolt.new. So if we click into AGUI for example, all the information here is aggregated from the different YouTube videos where I talk about this. So bringing everything together into a single entity file. And then we have our concepts like abstraction distraction for example. It's a framework or library that promises to do so much for you that it ends up costing you the flexibility, control and understanding you actually need like lang chain for example. And actually it calls it out right here. Like it knows me so well. It did such a good job building up this knowledge base. But again I talk about abstraction distraction in quite a few different videos usually when I'm talking about choosing the right AI agent framework. And so bringing that all together in one place here. And then I can also scroll down here to see the sources where in my YouTube videos do I talk about abstraction distraction give me the exact timestamps as well. And connecting these different documents together is also what builds up the graph view automatically in Obsidian because it builds this up whenever I'm referencing another document from one like what we're looking at right here. And the canonicalized step right here is definitely the most complicated because there's a lot that goes into guiding the agent so it knows what sorts of entities and concepts deserve their own dedicated file. And really the trickiest thing out of all of this is different concepts that you're talking about in your videos aren't always going to be talked about in the same way. So for example, the core AI coding workflow that I teach is the PIV loop. It's short for plan, implement, and validate. And so in one video I might call it the PIV loop. In another video, I might call it the plan implement validate workflow or the piv workflow or plan buildver verify. I mean, this is a little bit of a forced example, but you get the idea here where the agent has to recognize that this is talking about the same thing. So, we're going to aggregate all that together into that dedicated file in the knowledge base. So, we need to fuzzy match the variance. It's not just keyword matching. We need the LLM to reason here and figure out this all belongs in the piv loop markdown within our concept folder. And if there's something that it identifies as just a one-off tool that I only mentioned once, it probably doesn't deserve a place because if I covered every single tool I mentioned, even once in the knowledge base, it would be too large. It would not scale. Your agent would just have trouble navigating through everything. And so, we just want to take the core concepts and entities that are covered more than once and then build up the knowledge base like we've been looking at in VS Code and Obsidian. All right, so the last thing I have for you here that I promised I would get to is the skills to help you build your own YouTube channel knowledge base. And so they just live right here within the repository that has the knowledge base for my channel. And so I talk about them in the read me right here. You really only have to pick one of these skills and it'll go through the full pipeline we just covered to build up the knowledge base just given a single URL for a YouTube channel. That's the only input that you need. The reason I have three skills here is because I just wanted to give you different options of services to use to pull the transcripts from YouTube. And so, personally, I use the Super Data API. I've been using that for a long time to pull transcripts from YouTube. The problem is it's a paid service, and I'm not expecting you to pay money to build these knowledge bases here. It's the most reliable in my experience, but honestly, I would encourage you to just start with one of the free options here. It's just tricky because you can't use the YouTube data API directly for anything but your own channel. So you have to go through these these third parties like the YouTube transcript API YT DLP in order to pull the transcripts from any channel if you're trying to make a knowledge base that's not from your own channel. But anyway, looking at one of the skills here, we'll just take the channel 2 KB one. So I'll go intoclaude skills channel 2 KB. There's a script here to fetch the transcripts from a channel. The rest of it is just the skill.md, which is the full instructions for the agent, walking it through the process of building the knowledge base the same way that I did. So, we're telling it to read the OKF spec, so it understands the format to create the knowledge base in here, and then it's going to pull the transcripts, go through the process of canonicalization, and writing out all the files for our entities and concepts. And it's pretty simple overall because this skill doesn't have to explain much since the OKF spec is really where most of the explanation is done. So if it reads that and it knows how to produce the OKF format, that's really all you need besides a little bit of instruction for how we pull the information and work within our file system. And now to run this, we just go into our coding agent like cloud code, run / channel 2KB, and then you just give it the full channel URL or your channel handle like at ColeMaden. Now, this is a long process that is going to be tokenheavy. Obviously, we're creating a lot of documents here, but I think this is well worth your time building up a knowledge base for any channel you normally follow. That's why I wanted to build my own channel knowledge base for you. So, you can immediately pull this and just start asking away like I was showing at the start of the video here. And so, that's all that I have for you here. I encourage you build a knowledge base for a channel. Use mine, ask questions here. You get answers so incredibly quickly compared to watching through every single video. And of course, I still want you to still watch my content. It still gives you the deeper dive that you often need, but this is even just a way to navigate through channels more effectively. And so, if you appreciate this video, you're looking forward to more things on OKF using AI coding assistance, building AI agents, I would really appreciate a like and a subscribe. And with that, I will see you in the next

Frontier News · by Hyperjump Technology