( x ) File

How to Build Andrej Karpathy’s AI Knowledge Base in Claude

 ·  May 24, 2026 · 9:57 PM

For years, productivity enthusiasts have obsessed over building a "Second Brain." If you have ever scrolled through tech forums, you have likely seen endless screenshots of highly complex Obsidian vaults or intricate Notion workspaces filled with interconnected nodes, complex tags, and a dizzying web of plugins.

But there is a glaring problem: most people spend more time organizing their knowledge base than actually using it. At the start of 2026, Andrej Karpathy—one of the world's most respected AI researchers—quietly shared how he manages his own personal knowledge base. His setup doesn't rely on databases, vector embeddings, RAG (Retrieval-Augmented Generation), or complex software. It relies entirely on simple text files, folders, and a smart Large Language Model (LLM) acting as a digital librarian.

Based on a system implemented by the YouTube channel Systems Made Better, this guide will show you how to build a self-improving, zero-maintenance AI knowledge base in Claude in just 45 minutes.


Why This System Beats Traditional Tools

Traditional knowledge management tools ask you to be the librarian. You have to tag the articles, you have to manually link related concepts, and you have to build the indexes.

This AI-driven approach flips the script: You dump data, and the AI organizes it. * No complex infrastructure: No vector databases or coding required. It uses raw local folders and markdown (.md) files.


How It Is Setup: The 4-File Architecture

The entire architecture lives locally on your computer. It consists of exactly three folders and one master file sitting inside a top-level folder (e.g., Productivity Knowledge Base or Business Brain).

📁 Your Knowledge Base Folder
 ├── 📄 claude.md (The Schema / Librarian Instructions)
 ├── 📁 raw/
 ├── 📁 wiki/
 └── 📁 outputs/

1. claude.md (The Master Schema)

This file sits at the root of your directory. It acts as the "system prompt" or rules of engagement for Claude. When you point Claude to this folder, claude.md instructs the AI exactly how to read, structure, and behave as the librarian of the system.

2. The raw/ Folder

Think of this as your digital junk drawer. Whenever you read a great article, clip a quote, take a screenshot, or finish a meeting, you drop it straight into raw/. Do not organize it. Do not format it. This is strictly a friction-free capture zone.

3. The wiki/ Folder

This is where the magic happens. You never edit this folder by hand. The AI completely generates and maintains this directory. It reads your raw data and synthesizes it into neatly structured topic pages and indexes.

4. The outputs/ Folder

Whenever you ask your knowledge base a question, brainstorm a problem, or request a summary, Claude compiles its answers, briefings, and reports into this folder.


How It Works: The 5-Step Compounding Loop

The system operates on a continuous loop that ensures the knowledge base automatically gets smarter the more you use it.

Step 1: Initialize the System

Create your folder structure locally. Open a workspace in Claude (using a tool like Claude Co-work or Projects) and point it to your root folder. Provide an initial prompt instructing Claude to adopt the persona of an expert librarian based on the structure defined in your root claude.md.

Step 2: The Knowledge Dump

Gather your existing scattered information and place it into the raw/ folder.

Step 3: Build the Wiki

Once your raw material is in place, you give Claude a single, transformative command:

"Read everything in RAW and compile a wiki in the WIKI folder following the rules in claude.md. Create the index.md first, then one markdown file per major topic, linking related topics together."

Claude will automatically sift through your chaotic notes, identify recurring themes, map connections you didn't even know existed, and build a clean, searchable, interconnected web of documentation.

Step 4: Interrogate and Refine

With the wiki built, you can now query your second brain. For example, you can ask: "Based on my knowledge base, what is the best way to manage my energy while scaling my business output?"

Claude won't just pull a static quote; it will synthesize insights across multiple authors and entries you've saved. Crucially, when Claude generates an excellent answer or briefing, that file is saved directly into the outputs/ folder, becoming new raw material for the AI to study.

Step 5: The Self-Improving "Health Check"

Because AIs can occasionally misinterpret data or suffer from formatting drift, you introduce a monthly automated maintenance check. You program a Claude Custom Skill or Scheduled Task with an evaluation framework.

During a health check, Claude runs a comprehensive audit to find:

  1. Philosophical Contradictions: Structural discrepancies between how different articles frame a concept.
  2. Attribution & Source Drift: Claims or notes missing proper references back to the raw/ files.
  3. Information Gaps: Holes in your knowledge framework, prompting Claude to suggest 3 new article candidates or perform web searches to fill the gaps.
  4. Stale Content: Articles older than 90 days that might need updating.

Implementing the System Responsibly

While this system is revolutionary, it is highly intensive. Running massive wiki builds or monthly multi-stage health checks consumes significant context windows and token usage.

To run this smoothly without draining your API credits or session limits immediately:

Final Verdict

Building a second brain shouldn't feel like a part-time job. By offloading organization, indexing, and synthesis to Claude, you can focus purely on what matters: capturing great ideas and applying them to your life and business. Spend 45 minutes setting this up over the weekend, and in three months, you will possess a proprietary digital asset uniquely tuned to your own intellect.

@youtube

@youtube

More from @youtube