AI Compass / Knowledge cards
Knowledge base for agents
the LLM wiki after Karpathy
In April 2026, Andrej Karpathy described a pattern, the “LLM Wiki”. It has three layers: raw sources that the model reads but never changes; wiki pages that the model writes from the sources and keeps up to date; and a rules file, such as the CLAUDE.md, that defines how material is ingested and maintained. Unlike plain document search, the knowledge is merged once and then carried forward.
What it is for
Domain knowledge such as standards, offer building blocks or notes sits in one place that Claude Code reads and updates. You don’t have to explain it again in every chat. Knowledge about the world stays separate from memory about you and your projects.
Steps
- Read Karpathy’s text and let Claude Code set up the folder following this pattern. Then check the structure.
- One knowledge area per wiki.
- Write the ingestion rule into the folder’s
CLAUDE.md: read the new file, discuss it with you, write a source page, update affected pages, flag contradictions. Note the origin for each source page. - For larger collections, organize: one topic per file, a short header with name and description, an
index.mdper folder. State in theCLAUDE.mdthat the indexes are read first. Without this hint, according to AI LABS, Claude falls back to keyword search. - Test queries and check whether the model really searches in the wiki.
- Every few weeks, have it check for contradictions, outdated statements and orphaned pages. Karpathy calls this “lint”.
- Only once that works, have material ingested automatically at regular intervals, with write permission only in the wiki folder.
What Anthropic measured
In November 2026, Anthropic had Claude build wikis from large document collections itself and measured when they help:
- Wiki and search together. From around 350,000 internal files of an acquired software company (about 420 million tokens), Opus 5 agents wrote wiki pages in 128 sessions, merged duplicates and checked statements against the sources. With wiki and search, Claude met 61% of the grading criteria, with search alone 53%, and saved around 20,000 tokens per question. With the wiki alone, it was at most 48%.
- Helps with questions across several documents. For 24 questions about a company acquisition, where several documents often had to be combined, Claude reached 87% with the wiki and 73% with search alone. When the answer was in a single document, the wiki brought no clear advantage. In one case, the wiki grew larger than the documents themselves.
- Key facts verbatim, one page per document. For a report on contract terms, several agents at first wrote into a shared table at the same time and overwrote each other. Of 57 graded facts, 41 made it into the wiki. With one page per contract, written by a single agent and with the terms verbatim, all 57 did.
Limits
- Unchecked sources make the wiki worse. What goes in shapes every later answer.
- According to Karpathy, the approach with index files holds about 100 sources and a few hundred pages. For larger, unchanging collections such as transcripts or books, Jack Roberts recommends a vector search, a search by meaning instead of by keyword.
- “Improves itself” is a claim by the creators. Anthropic’s wiki got better over many maintenance rounds, but only with dedicated compute time for the upkeep and with checks against the sources.
- The video title “Google Replaced The Karpathy’s LLM Wiki” exaggerates. Google’s Open Knowledge Format specification organizes the pattern; it doesn’t replace it.
- Confidential documents only once confidentiality is settled.
Links
- Keeping context clean: reading indexes instead of loading everything saves context.
- Maintaining your Claude Code setup: the wiki’s rules file needs the same upkeep as any
CLAUDE.md. - Web data: settle the access path first: third-party texts that go into the wiki can contain injected instructions.
- Three-tier memory: the counterpart for knowledge about you and your projects.
Sources
- Andrej Karpathy: LLM Wiki, GitHub Gist, April 2026, retrieved 11 Oct 2026
- Jack Roberts: Build a Hermes Knowledge Base That Self-Improves, 14 June 2026, 3:15–6:31, 12:21–13:24. Self-promotion (community)
- AI LABS: Google Replaced The Karpathy’s LLM Wiki, 26 June 2026, 5:20–5:52, 9:05, 10:11. Sponsored by Mobbin
- Jack Roberts: Claude Code + Karpathy’s Obsidian = New Meta, 10 Apr 2026, 8:04–9:08, 16:04–17:11. Self-promotion (community)
- Anthropic, Lance Martin: The components of agent memory, 6 Nov 2026, sections “Dreaming can build new memory representations”, “Dreaming can focus memory on a specific goal”, retrieved 27 Nov 2026
Status
Checked 27 Nov 2026 · Maturity new (pattern openly described, measured by Anthropic on its own collections, not tested by me)
You can try this with your team in the AI Lab. See the AI Lab