miajia
Knowledge SystemsContext Engineering

Karpathy's LLM Wiki: Let AI Build Your Knowledge Base, Not Do Your Thinking

EN · Mia Builder Notes · April 2026

The Essay

Last week Karpathy posted a GitHub Gist (24K likes) about an idea that’s very simple but goes very deep:

Stop having AI dig up answers for you from scratch every time. Have it build you a knowledge base that keeps growing.

He’s been using this method himself: one research topic grew into a structured wiki of 100 articles and 400,000 words, and he didn’t write a single word of it. The LLM maintains all of it.

Sounds amazing, right? But after digging in, I found two core questions he never answers head-on. And those two questions are where this idea really gets worth digging into.

First, let’s look at what he actually did.


I. What he actually did: from RAG to incremental compilation

How most people use AI with their knowledge today

You upload 10 PDFs to ChatGPT and ask it a question. What happens behind the scenes is called RAG: your documents get chopped into chunks and stored as vectors, and every time you ask something, it finds the most relevant chunks, stitches them together, and generates an answer on the spot.

NotebookLM, ChatGPT file uploads, enterprise knowledge bases: under the hood, they all work this way.

The problem: every query is one-and-done. Today you ask, “How do these 5 papers differ on Surgery Note quality?” The AI grabs a few passages from each of the 5 documents and synthesizes them once, on the spot. Ask again tomorrow and it starts over from zero.

Papers 7 and 43 are actually discussing the same edge case? RAG has no idea. Paper 12’s conclusion got overturned by paper 38? RAG doesn’t know that either. Because it’s only retrieving, not understanding.

Karpathy’s approach: make AI the programmer of your knowledge base

His thinking goes in a completely different direction:

Instead of stitching answers together from raw documents at query time, have AI continuously maintain a structured wiki.

Here’s how it works:

1. You hand the AI a new article

Not “summarize this for me,” but “read this article, pull out the key information, then update my wiki.”

2. What the AI does isn’t writing a summary. It’s “compiling”

  • Reads the new article
  • Reads the wiki’s index (so it knows what pages already exist)
  • Decides: which existing pages does this article relate to?
  • For each related page: open it → read what’s there → integrate the new information → flag contradictions between old and new → add cross-references
  • If a brand-new concept shows up: create a new page
  • Update the index

One article might trigger updates to 10–15 wiki pages. That’s not “archiving.” That’s “compiling”: turning scattered pieces of information into a structured knowledge network.

3. At query time, you’re searching knowledge that’s already been compiled

Next time you ask, “How many kinds of Surgery Note quality problems are there?”, the AI doesn’t have to hunt for fragments across 100 original articles. The answer is already in the wiki, and it’s cross-referenced, de-conflicted, and kept up to date.

RAG = a map operation (processes each document fragment independently, every time)
Wiki = a reduce operation (incrementally aggregates into structured knowledge)

Three layers

He designed three layers:

Raw Sources — the articles, papers, and data you’ve curated. Immutable. The AI reads them but never writes to them. This is your source of truth.

Wiki — markdown files the AI generates and maintains. Entity pages, concept pages, comparisons, overviews. The AI owns this layer completely: it creates pages, updates content, and maintains cross-references. You read it; the AI writes it.

Schema — a config file that tells the AI “how the wiki is organized, what format pages follow, and what rules updates obey.” Think of it like CLAUDE.md. You and the AI evolve this file together.

Three core operations

Ingest: a new article comes in → the AI compiles it → the wiki gets updated. He prefers to process one at a time and review it himself, but you can also batch them.

Query: ask the wiki a question → the AI searches the relevant pages → synthesizes an answer. The key: a good answer can be written back into the wiki as a new page. Your exploration itself keeps adding up.

Lint: periodically have the AI audit the wiki: hunt for contradictions, stale information, orphan pages, and “concepts that lots of pages mention but that don’t have a page of their own yet.”

He said one thing I especially love:

“Obsidian is the IDE; the LLM is the programmer; the wiki is the codebase.”

Where it genuinely beats RAG

RAG LLM Wiki
Cross-document synthesis ❌ Re-stitched every time ✅ Already compiled
Cross-references ❌ Rediscovered every time ✅ Built at ingest time
Contradiction detection ❌ Doesn’t happen ✅ Actively flagged during lint
Knowledge accumulation ❌ Stateless ✅ Compounds over time

But there’s one place RAG is more reliable: factual lookup. For a question like “What dataset did paper A use?”, RAG points you straight at the original text, with nothing lost in an intermediate compilation layer. The wiki may have compressed that detail away when it compiled.


II. Two core insights

Once you’ve read his gist, the technical details are easy enough to follow. But two things kept pulling me back.

Insight 1: he shared an idea, not code

Karpathy didn’t open-source any implementation. No GitHub repo, no npm package, no Docker image. What he posted is just a markdown file: an “idea file.”

He spells it out right at the top of the gist:

“This is an idea file, it is designed to be copy pasted to your own LLM Agent. Its goal is to communicate the high level idea, but your agent will build out the specifics in collaboration with you.”

And he hammers it home again at the end:

“This document is intentionally abstract. It describes the idea, not a specific implementation.”

The same day, he posted another tweet:

“In this era of LLM agents, there is less of a point/need of sharing the specific code/app, you just share the idea, then the other person’s agent customizes & builds it for your specific needs.”

This isn’t laziness. It’s a paradigm shift.

Open source used to mean sharing code. You wrote a handy tool, open-sourced it, and other people cloned it and used it.

Now he’s saying: you don’t have to anymore. Describe the idea clearly, and everyone’s AI agent will build a custom implementation for their own needs. One idea file can be instantiated into 100 different knowledge bases, fitted to 100 different domains and workflows.

Code is concrete, goes stale, and comes with dependencies. Ideas are abstract, composable, and work across tools.

He even suggests that the PR (Pull Request) should become a “Prompt Request”: you don’t submit code, you submit a clear description of your intent, and AI implements it.

The basic unit of open source is shifting from code to intent.

This gist is the proof: 24K likes, zero lines of code.

Insight 2: accumulation ≠ wisdom, and the LLM’s wisdom ≠ your wisdom

This is a layer of thinking I’m adding on top of Karpathy’s, and I think it’s the most important question in this whole paradigm, and the easiest one to overlook.

Karpathy’s design makes the wiki smarter and smarter. But what about the person using it?

You throw 100 articles into the wiki, and AI compiles them all neatly. Whenever you need something, a quick search gets you a beautiful synthesized answer.

But you yourself… are really just “browsing what AI organized for you.” Your brain never went through the struggle of understanding, making connections, and forming its own judgments.

It’s the same reason people who’ve relied on Google Maps for 5 years can’t find their way around anymore. Once a tool takes over a cognitive task, the matching ability in the person withers.

There are two completely different kinds of “knowing” here:

The AI’s knowing Your knowing
Where it lives Wiki markdown files Your own neural network
How it’s recalled Search → read Intuition → association
When it’s available When you’re at a computer In meetings, in the shower, mid-conversation
Creativity Recombines existing knowledge Cross-domain analogies, intuitive leaps

You hear a question in a meeting and, without checking the wiki or opening your laptop, within 3 seconds you can tell what kind of problem it is. That’s real wisdom.

The wiki says “Surgery Note quality problems have 3 root causes.” But if you close the wiki, can you name those 3 from memory? If you can’t, that knowledge belongs to the AI, not to you.

So the key question isn’t “how do I make the wiki better.” It’s “how do I use the process of building the wiki to make myself smarter.”

I designed two modes to tackle this:

📥 Accumulate mode (when you’re busy): throw it at the AI and it compiles it into the wiki automatically. Your knowledge base just got smarter, but you haven’t yet. This knowledge gets marked “pending internalization.”

🧠 Internalize mode (when you’re curious):

You pick a topic, and the AI asks you first:

“Without looking at anything, what can you say about this topic right now?”

You write 3–5 sentences on your own first. Then the AI diffs your answer against what’s in the wiki:

  • ✅ What you got right — you’ve already internalized it
  • 🔍 What you missed — that’s a learning opportunity
  • ❌ What you got wrong — that’s the highest-value learning signal
  • 💡 What you said that the wiki doesn’t have — that’s your unique insight; write it back into the wiki

The gap is where the learning happens. Behind this is the “testing effect,” a well-established finding in cognitive science: trying to recall first and then checking the answer makes things stick 2–3x better than just reading the answer.

Finally, distill one thesis sentence in your own words: no peeking at the wiki, your own language. If you can write it = the knowledge has moved into your brain. If you can’t = you haven’t truly understood it yet.

The end goal isn't to build a good wiki
It's to become a domain expert yourself through the process of building it

The wiki is the byproduct
The mental model in your head is the real product

III. How to get started

Karpathy uses Obsidian as his IDE. So do I.

The minimum setup:

  1. Create an Obsidian vault
  2. Create a raw/ folder for the original articles (use Obsidian Web Clipper to save web pages in one click)
  3. Tell your AI agent: “Read this article, pull out the key information, and update the relevant pages in the wiki”
  4. Spend 20 minutes a week in “internalize mode”: close the wiki, think it through on your own first, then compare the gap

Remember: you don’t need to write the wiki yourself. What you need is to curate what’s worth reading, ask the right questions, and regularly test what you’ve actually learned.


Karpathy’s original Gist: https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f


Tags

#AIKnowledgeManagement #Karpathy #LLM #PersonalKnowledgeBase #SecondBrain #Obsidian #RAG #DeepLearning #AITools #ProductivityTools