NeuralOS
GuideIntermediate

Karpathy's "LLM Wiki" method · make your AI actually accumulate knowledge

In April 2026, Andrej Karpathy —co-founder of OpenAI, former director of AI at Tesla— published a short document that blew up (over 16 million views): the "LLM Wiki" pattern. The idea is brilliant in its simplicity: instead of your AI forgetting and you repeating everything each time, have IT build and maintain a markdown wiki — a knowledge base that GROWS with every conversation and that you can read. In this guide I'll walk you through his exact method, in plain English, why it works so well, and how to set it up with a ready-to-paste prompt. It's the natural next step after the CLAUDE.md file.

Jun 18, 202612 min
Before this, check out the memory guide
This resource goes deep on the simplest and most powerful option for giving your AI memory: the files you read. If you haven't seen it yet, start with the [AI memory tools](/recursos/memoria-para-tu-ia-herramientas) guide — that's where the full menu is. Here we go all in on the master's technique.

The problem Karpathy set out to solve

Every time you work with your AI, you explain things, you explore ideas together, you reach conclusions… and all of it evaporates the moment you close the chat. Next time, the AI remembers nothing and you explain the same thing all over again. Karpathy frames it like this: the knowledge doesn't accumulate — every conversation starts from scratch.

His idea for breaking that is brilliant in its simplicity: have the AI write and maintain its own wiki — a knowledge base that grows with every conversation, instead of evaporating.

The line that sums it up
Karpathy puts it this way: "Obsidian is the IDE; the LLM is the programmer; the wiki is the code." You don't write the wiki — the AI writes it and maintains it; you read it and use it.

The idea: a wiki your AI builds on its own

The AI incrementally builds a wiki: a collection of markdown files linked to one another, living between you and your sources (your documents, notes, repos). You read it; the AI writes it and maintains it. Everything you learn together gets recorded and connected — so, over time, that wiki becomes more valuable than scattered notes.

Why does it work, when we humans always abandon our wikis? Karpathy gives the exact answer: "the tedious part of maintaining a knowledge base isn't the reading or the thinking — it's the office work (the bookkeeping)... Humans abandon wikis because maintenance grows faster than value. LLMs don't get bored, they don't forget to update a cross-reference, and they can touch 15 files in a single pass."

The 3 layers of the method

Karpathy organizes the system into three layers. Understanding them means understanding the whole method:

The architecture
1. The raw sources: your documents, articles, original repos. They're immutable — the AI reads them but NEVER modifies them. Your source of truth.
2. The wiki: a folder of markdown files the AI generates. The AI owns this entire layer: you read it, the AI writes it.
3. The schema: a document (your CLAUDE.md or AGENTS.md) that tells the AI how the wiki is organized. It's what turns it into a "disciplined librarian" instead of a generic chatbot.
Here's where it connects to your CLAUDE.md
Notice that the third layer is exactly the Step 1 file (CLAUDE.md / AGENTS.md). That's why this method is the natural evolution of that file: it stops being just "your rules" and becomes the manual for how the AI maintains your wiki.

The 3 operations (what the AI does with the wiki)

The method has three actions, with the names Karpathy gave them:

Ingest. You hand it a new source (an article, a repo). The AI reads it, talks the key points over with you, writes a summary page into the wiki, and updates the index. A single source can touch 10-15 wiki pages, connecting them together.

Query. You ask it something. And here's the good part: good answers get filed back into the wiki as new pages. That way your own explorations accumulate in the knowledge base, just like the sources you ingest.

Lint. You ask the AI to run a health check on the wiki: it looks for contradictions between pages, outdated claims, orphan pages (with no links reaching them). It keeps the wiki healthy on its own.

Two special files
Karpathy recommends an index.md (the catalog of the whole wiki, organized by content) and a log.md (a chronological, append-only record). His tip: if each log entry starts with a consistent prefix like ## [2026-04-02] ingest | Title, you can search it with simple tools.

The prompt to set up your LLM Wiki

Paste this into your agent (Claude Code, Codex, etc.) to kick off your own wiki following Karpathy's pattern. It's designed so the AI asks you the questions and builds the structure with you.

Prompt · set up your LLM Wikitext
Let's set up an "LLM Wiki" following Andrej Karpathy's pattern: a markdown knowledge base that you (the AI) build and maintain, and that I can read.

STRUCTURE (3 layers):
1. raw/ — my raw sources (articles, repos, notes). You READ them but NEVER modify them.
2. wiki/ — markdown pages that YOU generate and maintain, linked to one another. You own this layer.
3. The schema — update my CLAUDE.md (or AGENTS.md) explaining how the wiki is organized, so you maintain it with discipline.

Special files: create an index.md (catalog by topic) and a log.md (chronological, append-only; each entry starts with "## [DATE] operation | Title").

OPERATIONS you'll know how to do:
- INGEST: when I hand you a source, read it, tell me the key points, write a summary page into wiki/, link it, and update index.md and log.md.
- QUERY: when I ask you something, answer AND if the answer is valuable, file it as a new page in the wiki.
- LINT: when I ask you to, review the wiki: contradictions, stale data, orphan pages, and propose fixes.

Start by asking me the questions you need about what my wiki will be about, then create the initial structure (folders, index.md, log.md, and the schema section in my CLAUDE.md).

Who is this method for?

When it's worth it for you
You work with your AI on a project or topic and you're tired of repeating the same things every time.
You want the knowledge to accumulate and improve over time, not evaporate when you close the chat.
You like to read and control what your AI "knows" (they're text files, not a black box).
You already use a CLAUDE.md and want to take it to the next level.

In NeuralOS: the living wiki, no folders to set up

The vision, already tangible
Karpathy's method is powerful, but it requires YOU to set up the folders and keep up the discipline. In NeuralOS, every agent already has its memory, its instructions (its schema), and its knowledge base in one interface — the living-wiki idea without you having to assemble files by hand. The engine that maintains it in the cloud is part of the road we're building; the experience is already there.

The original source (read it in full)

All of this comes from the document Karpathy published himself. I recommend reading the whole thing — it's short and worth its weight in gold.

Andrej Karpathy · "LLM Wiki" (original gist)
The original document where Karpathy describes the full pattern (April 4, 2026).

Where this goes next

Your AI forgets everything · the real tools that fix it
The full menu of memory tools (this method is the advanced version of Step 1).
Graphify · give your AI a complete map of your project
When your wiki grows so big you need to see how it all connects: the knowledge graph.
The C-A-R protocol · build bug-free software with your AI
With memory and knowledge in place, the method for having your AI build without leaving hidden bugs behind.
#memory#karpathy#knowledge#claude
Ready to build?

Start building in
under 3 minutes

Join 4,200+ builders. No credit card. Build your first app with AI in minutes.