October 31, 2026 · 12 min read

LLM Wiki: Karpathy's Pattern for Businesses

Graphic title card for the article “LLM Wiki: Karpathy's Pattern for Businesses” with a stylised motif: a card file with letter tabs, individual index cards sticking out.
Graphic: HumanITy

An LLM wiki is a collection of Markdown files that an AI writes from your sources and keeps up to date itself. The AI reads each new source, summarizes it, links it to existing pages and flags contradictions. It then answers questions from the wiki instead of going back to the raw documents. The AI researcher Andrej Karpathy described the pattern in April 2026. The difference from RAG: the knowledge is compiled once and then maintained, instead of being searched for again with every question. For a small business, an LLM wiki fits where one person collects knowledge on a topic over weeks. It is not built for customer data or for knowledge with different access rights.

I work with AI employees built on Claude Code every day, and their knowledge lives in Markdown files too; how that compares to Karpathy's pattern is covered below. Everything about agents is collected on my page AI Agents: Understand, Build, Manage.

Where the LLM wiki comes from: Karpathy's post

On April 2, 2026, Karpathy posted on X under the heading "LLM Knowledge Bases" that a large share of his work with language models was going less into code and more into knowledge, stored as Markdown and images. His wiki on one research topic then had about 100 articles and roughly 400,000 words. Two days later he published a GitHub file titled "LLM Wiki".

Karpathy calls it an idea file, meant to be handed to your AI agent, for example Claude Code or OpenAI Codex, which then works out the details with you. There is no finished program, only a pattern. In the X post he says he sees room for a real product instead of a hacky collection of scripts.

He splits the roles like this: you pick the sources and ask the questions, the AI does the summarizing, cross-referencing and bookkeeping. His comparison: Obsidian, a note-taking app for Markdown files, is the IDE, the language model is the programmer, the wiki is the codebase.

How an LLM wiki is built: three layers

Layer What it holds Who writes it
Raw sources articles, papers, images, data files you; the AI only reads and never changes anything
Wiki summaries, pages on people, companies and concepts, comparisons, an overview only the AI
Schema an instruction file such as CLAUDE.md or AGENTS.md with structure, rules and workflows you and the AI together, over time

The raw sources are the source of truth. The wiki belongs to the AI: you read it, it writes it. Karpathy calls the schema the key file, because it turns a generic chatbot into a disciplined wiki maintainer. According to Anthropic, Claude Code reads a CLAUDE.md at the start of every session; if a repository uses an AGENTS.md instead, it can read that.

Two helper files come on top: index.md, a catalog of every page with a one-line summary that the AI reads first when answering, and log.md, an append-only record of what was ingested, asked or checked, and when.

Three operations: ingest, query, lint

Ingest. You add a source to the raw folder and tell the AI to process it. It reads it, discusses the key points with you, writes a summary, updates the index and topic pages and adds to the log. According to Karpathy, a single source can touch 10 to 15 wiki pages. He prefers to ingest one source at a time and read the summaries.

Query. The AI finds the relevant pages and answers with references to them. The key idea: good answers get filed back into the wiki as new pages instead of disappearing into the chat history.

Lint. A term from programming. You have the AI check regularly for contradictions between pages, claims newer sources have superseded, pages without inbound links, concepts without their own page, and gaps a web search could fill.

LLM wiki vs RAG: the difference

With RAG, a system searches your documents for relevant passages with every question and hands them to the model, as explained in What Is RAG in AI? RAG Systems Explained. Karpathy's criticism: the model rediscovers the knowledge with every question, and nothing builds up.

RAG LLM wiki
When the work happens with every question when a source is ingested
What is stored text chunks, as number sequences in a vector database readable Markdown pages with cross-references
Contradictions stay scattered across the sources get flagged on the pages
What you can check where the answer came from every wiki page itself
Size thousands of documents are possible according to Karpathy the index is enough at about 100 sources and a few hundred pages
Access rights search can filter by permission one folder: whoever can read it reads everything

The table is my assessment; the basic idea and the size figure come from Karpathy. He writes that he expected to need fancy RAG, but at his size the index was enough. If the wiki keeps growing, he recommends a search tool over the pages. Then you are close to RAG again, just with search over curated pages instead of raw documents. How much a model can read at once depends on its context window, see Context and Context Windows in AI Explained.

Pros and cons

What speaks for an LLM wiki:

  • Knowledge compounds. Cross-references and flagged contradictions are already there, and every source makes the wiki richer.
  • Everything is readable. Plain text files in any editor; in a Git repository you also get every change with a date.
  • Maintenance does not get skipped. Karpathy: people abandon wikis because upkeep grows faster than value. An AI does not get bored.

What speaks against it (my assessment):

  • Mistakes travel. A wrong summary sits in the wiki and its cross-references, and later answers build on it. That is why the raw sources stay untouched and Karpathy reads the summaries. Why language models get things wrong in the first place is covered in AI Hallucinations: Why AI Makes Things Up.
  • It is not a product. You build the workflow yourself, with your agent.
  • No permissions. A folder has no roles; once different people may see different things, the pattern stops fitting.
  • Data protection. The language model reads everything you ingest. Settle where that is processed first, see Local AI and Privacy: Cloud or Server?

How I maintain knowledge for my AI employees

For me, every AI employee is a folder where Claude Code works, and the whole workforce lives in a Git repository. Each folder holds the personnel file, working instructions, skills, knowledge and job folders. Part of that is wissen/learnings.md (wissen is German for knowledge) with every rule that came out of my feedback, newest on top, disproven ones struck through. The learnings sit in a separate file that the CLAUDE.md points to, and they are read before every task. For Conny, my content editor-in-chief, that file has grown to 1,347 lines since July 20, as of September 2026.

What it shares with Karpathy's pattern: the CLAUDE.md plays the role of his schema, the knowledge lives in readable text files with version history, and it grows with every correction instead of me repeating the same instruction in the next chat. The difference: learnings are rules for a role, not a reference work on a topic. How such a folder is built is in What Is an AI Employee?, and why the learnings do not belong in the instruction file itself is in CLAUDE.md vs AGENTS.md: What Survives.

For the risk of mistakes traveling, the same rule applies for me as everywhere: author and reviewer are never the same instance. How one AI checks another's work is explained in LLM as a Judge: How AI Checks AI Work.

For knowledge from customer conversations, with approvals and separate permissions, an LLM wiki is the wrong approach. That is what an AI knowledge base built from calls is for, and, once the relationships between entries matter, a knowledge graph built from calls.

Getting started as a small business

An LLM wiki pays off for a topic one person collects knowledge on over weeks: watching competitors, a funding application, notes from trade articles. You need an AI agent that may read and write files, such as Claude Code or Codex. Obsidian is optional.

  1. Create the folders. One for raw sources, one for the wiki, plus the instruction file.
  2. Write the schema together. Give the agent Karpathy's idea file, let it propose rules for your topic, and cut what you do not need.
  3. Ingest sources one at a time. Check the first summaries against the original to see early whether the rules fit.
  4. Ask questions and file good answers.
  5. Have it checked regularly. A lint pass at a fixed interval, and you read the findings.

An example schema, made up for illustration:

# Wiki rules
- raw/ is read-only, never change it.
- Every new source: summary in wiki/sources/, update affected
  topic pages, update index.md and log.md.
- Every claim in the wiki names its raw source.
- If a source contradicts an existing page: keep both claims
  with their sources and flag them, never overwrite silently.
- Answers name the wiki pages they come from.

Keep personal data and customer documents out until the data path is settled.

Frequently asked questions

What is an LLM wiki?

Markdown pages a language model writes from your sources, links and keeps current. The pattern comes from Andrej Karpathy.

What is the difference between an LLM wiki and RAG?

RAG searches the raw documents with every question. An LLM wiki compiles the knowledge once at ingest, maintains it, and answers from finished, linked pages.

Do I need Obsidian for an LLM wiki?

No. The wiki is ordinary text files. Karpathy reads it in Obsidian, any editor works.

How big can an LLM wiki get?

Per Karpathy, an index works surprisingly well up to about 100 sources and a few hundred pages. Beyond that you need search.

Is an LLM wiki suitable for customer data?

Not really. It has no access rights, and the model reads everything in it. A knowledge base with permissions fits better.

Where to go from here

Pick a topic you are reading about anyway and ingest five sources one at a time. After two weeks you will know whether the wiki saves you work. Why the instruction file matters so much is explained in Context Engineering vs Prompt Engineering. How others store their knowledge for AI agents is what we discuss in my community AI Employee Framework.

Kevin Welter

Kevin Welter

Developer, IT architect, author of technical books (Kubernetes, cloud infrastructures) and speaker. Runs his business with an AI workforce of fourteen AI employees and shows solo business owners in his community how to hire their first AI employee.

More about AI employees

Your first AI employee up and running within an hour

Join the community

$5/month founding price, first 50 members