Karpathy's LLM Wiki: What It Is and How It Works
Karpathy's pattern for a knowledge base that an AI agent writes and maintains, and where personal context fits next to it.

Most people use documents with AI the RAG way: upload files, let the model fetch chunks, start over with the next question. Andrej Karpathy's LLM Wiki flips that: the agent reads each source once, writes what it learned into a wiki of Markdown pages, and keeps those pages up to date, so knowledge accumulates instead of being re-derived.
Here's how the pattern works, how it differs from RAG, how to start one, and what it doesn't cover.
What is Karpathy's LLM Wiki?
An LLM Wiki is a personal knowledge base of Markdown files that an AI agent writes and maintains for you. Karpathy described the setup in an X post titled "LLM Knowledge Bases" on April 2, 2026, which passed 20 million views (Karpathy on X, 2026). Two days later he published llm-wiki.md, a gist he calls "an idea file": you paste it into an agent such as Claude Code, Codex or OpenCode, and the agent builds the specifics with you. By October 2026 GitHub showed the gist at more than 5,000 stars and 5,000 forks.
The division of labor is the point. You pick sources, ask questions and decide what matters; the LLM does the summarizing, cross-referencing, filing and bookkeeping. In Karpathy's words: "Obsidian is the IDE; the LLM is the programmer; the wiki is the codebase." He says he rarely edits the wiki directly.
How does the LLM Wiki work?
It runs on three layers and three operations. The layers, as the gist defines them:
- Raw sources: articles, papers, images and data files you collect. The LLM reads them and never edits them, so they stay your source of truth.
- The wiki: a directory of LLM-written Markdown pages (summaries, entity pages, concept pages, comparisons) that the LLM owns entirely.
- The schema: a file such as
CLAUDE.mdorAGENTS.mdthat tells the agent how the wiki is structured and which workflows to follow. Karpathy calls it the key configuration file.
The operations:
- Ingest. Drop a source into the raw folder and tell the agent to process it. It writes a summary page and updates the related entity and concept pages; per the gist, one source might touch 10 to 15 pages.
- Query. Ask questions against the wiki and get answers with citations, as a page, a table, a Marp slide deck or a chart. Good answers get filed back in as new pages, so your questions compound too.
- Lint. Periodically have the agent check for contradictions, stale claims, orphan pages and missing links.
Two files keep it navigable: index.md, a catalog of every page with a one-line summary, and log.md, an append-only record of ingests, queries and lint passes.
How is an LLM Wiki different from RAG?
RAG retrieves raw fragments at query time; an LLM Wiki compiles knowledge once and keeps it current. With RAG, a question that needs five documents makes the model find and piece together the fragments every time, and nothing builds up. In the wiki, the cross-references already exist and contradictions have already been flagged.
It doesn't ban retrieval, though, which is a common misreading. Karpathy writes that the index file "works surprisingly well at moderate scale (~100 sources, ~hundreds of pages)". His own research wiki was about 100 articles and 400,000 words when he posted. Past that, the gist suggests adding a search tool such as qmd, which combines keyword and vector search on your device. Retrieval comes in when the wiki outgrows the index, not before.
The tradeoff is error propagation. Because the agent rewrites sources into summaries, a misreading can get written down as fact and spread across linked pages. That's why the lint pass exists, and why Karpathy prefers to ingest sources one at a time and check the updates.
How do you start an LLM Wiki?
Start with the gist itself, not a template. The document is deliberately abstract; it expects your agent to adapt it to your domain.
- Create a folder with a
raw/directory for sources and an empty directory for the wiki, and open it as a vault in Obsidian. - Start your agent in that folder (for Claude Code, run
claudethere) and paste in the contents ofllm-wiki.md. - Ask it to draft the schema file for your topic: page types, naming, and the ingest, query and lint steps.
- Clip a first article with the Obsidian Web Clipper, Karpathy's own tip, and ingest it while you watch which pages change.
The Obsidian + Claude Code setup guide covers the agent side in detail. If you'd rather stay inside Obsidian, agent plugins such as Claudian and Copilot run Claude Code in a sidebar; the Obsidian AI plugins comparison lists them.
What is an LLM Wiki good for?
It's good for anything where you accumulate knowledge over weeks and want it organized rather than scattered. Karpathy's examples:
- Research: going deep on a topic over months, with an evolving thesis.
- Reading a book: pages for characters, themes and plot threads, built chapter by chapter.
- Business or team: an internal wiki fed by Slack threads, meeting transcripts and customer calls, with humans reviewing updates.
- Personal: journal entries, articles and podcast notes filed into a structured picture of your goals and habits.
- Everything else: competitive analysis, due diligence, trip planning, course notes.
The common thread is a body of sources you collect yourself. The wiki knows what you've fed it.
Where does personal context fit in?
Next to the wiki, as a separate layer. An LLM Wiki answers "what do I know about this topic?" Personal context answers "who am I and what am I working on right now?" for every tool you open.
Karpathy's personal example comes close, but it differs in two ways. That picture of you is built from what you clip and file by hand, and it lives in one folder that one agent reads. Your current context mostly lives somewhere else: in this week's email, your calendar, the Slack thread where a decision changed. And it needs to reach ChatGPT in the browser and Cursor in your editor, not only the agent sitting in the vault.
That's the layer Unabyss handles. It builds your context from Gmail, Google Calendar, Notion, Slack and other apps, keeps it current, and serves it to Claude, ChatGPT and Cursor over MCP. If your wiki lives in Obsidian, the Unabyss Obsidian plugin can sync it in too. The wiki holds what you know; personal context tells every tool who it's working for.