Article source for the LLM Wiki pattern. Saved 2026-10-06.
TL;DR: Andrej Karpathy’s LLM Wiki is a pattern — not a product — where an LLM agent builds and maintains a structured markdown knowledge base from your raw sources. Three-layer architecture: raw/ (immutable sources), wiki/ (LLM-generated pages), and CLAUDE.md (schema). Three operations: ingest (process new sources), query (ask questions), lint (health checks). It replaces RAG with plain markdown for personal/team-scale knowledge. This guide covers the complete setup with Claude Code and Obsidian.
In April 2026, Andrej Karpathy posted on X about a workflow shift: instead of using LLMs primarily for code generation, he had been using them to build personal knowledge bases. The post went viral — 16+ million views — and the follow-up GitHub Gist hit 5,000+ stars within days. It touched a nerve because it solved a problem every knowledge worker has: knowledge bases that collapse under their own maintenance weight.
Why Knowledge Bases Collapse
Every developer has a graveyard of abandoned knowledge systems. Notion databases with 200 pages and no updates since month three. Bookmarks folders with 500 links and no summaries. Obsidian vaults with promising graphs that went stale. The problem isn’t the tools — it’s the maintenance cost.
Building a knowledge base has three steps: collect (easy), organize (hard), maintain (impossible at scale). The grunt work of filing, cross-referencing, summarizing, and updating is where systems die. Adding a single new article means reading it, creating a summary, linking it to existing concepts, updating related pages, and checking for contradictions with existing knowledge.
Karpathy’s insight is simple: LLMs are uniquely good at exactly this kind of bookkeeping. They can read a document, identify key concepts, create structured summaries, generate cross-references, update indexes, and flag contradictions — tirelessly, consistently, at near-zero marginal cost. The human curates what goes in; the LLM does everything else.
“The LLM writes and maintains all of the data of the wiki. I rarely touch it directly.” — Andrej Karpathy
At the time of the post, Karpathy’s wiki on a single research topic had grown to approximately 100 articles and 400,000 words — longer than most PhD dissertations — without him writing any of it directly.
The Three-Layer Architecture
my-research/
├── raw/ # Layer 1: Immutable source documents
│ ├── articles/
│ ├── papers/
│ └── assets/
├── wiki/ # Layer 2: LLM-generated markdown
│ ├── index.md # Content catalog (updated on every ingest)
│ ├── log.md # Append-only chronological record
│ ├── concepts/ # Concept pages
│ ├── entities/ # Entity pages
│ ├── sources/ # Source summaries
│ └── comparisons/ # Comparison pages
├── outputs/ # Dated reports, presentations
├── CLAUDE.md # Layer 3: Schema configuration
└── .gitignore
Layer 1: raw/ — Immutable sources
Your curated collection of source documents — articles, papers, code repos, datasets, images. The LLM reads these but never modifies them. They serve as the verification baseline: every claim in the wiki traces back to a file in raw/.
Layer 2: wiki/ — LLM-generated pages
- concepts/ — Concept pages (e.g., attention-mechanism.md, rag.md)
- entities/ — Entity pages (e.g., openai.md, anthropic.md)
- sources/ — Source summaries (one per ingested document)
- comparisons/ — Comparison pages (e.g., rag-vs-fine-tuning.md)
- index.md — Content catalog, updated on every ingest. The LLM reads this first to navigate.
- log.md — Append-only operation log. Records every ingest, every page update, every contradiction found.
Layer 3: CLAUDE.md — The Schema
The most important file. Defines structure, naming conventions, page templates, and operational workflows. Transforms a generic LLM into a disciplined knowledge worker.
The Three Operations: Ingest, Query, Lint
Karpathy frames it as a compiler analogy: raw/ is source code, the LLM is the compiler, wiki/ is the executable output, lint is tests, and queries are runtime.
Ingest
Drop a new source into raw/ and tell the LLM to process it. The LLM:
- Reads the document and discusses key takeaways
- Creates a summary page in wiki/sources/
- Cascades updates across 10-15 related wiki pages
- Creates new concept or entity pages if needed
- Updates index.md with new entries
- Appends to log.md with affected pages and noteworthy findings
Query
Ask questions against the wiki. The LLM searches index.md, reads relevant pages, and synthesizes answers with wikilink citations. Valuable answers optionally get filed as permanent wiki pages — knowledge compounds.
Lint
Periodic health checks for contradictions, orphan pages, missing concepts, stale claims, investigation gaps. Like eslint for knowledge.
Schema Template (CLAUDE.md)
Every wiki page must have YAML frontmatter with: title, type (concept|entity|source-summary|comparison), sources (paths to raw/), related (wikilinks), created, updated, confidence (high|medium|low).
Obsidian as Frontend
Obsidian provides graph view (every wikilink becomes a visual connection), backlinks, Dataview queries across frontmatter, and QMD for semantic search.
LLM Wiki vs RAG
| Dimension | RAG | LLM Wiki |
|---|---|---|
| State | Stateless | Stateful — knowledge compounds |
| Infrastructure | Vector DB | Folder of .md files |
| Cross-references | Ad-hoc per query | Pre-built by LLM |
| Token cost per query | High | Low (index + targeted pages) |
| Traceability | Chunk-level (lossy) | Source-level (raw/) |
| Scale sweet spot | Enterprise | Personal/team (<100K tokens) |
| Contradictions | Undetected | Flagged during lint |
When LLM Wiki wins: < ~100-200 sources, knowledge compounding wanted, traceability matters, zero infrastructure beyond a folder + LLM.
Community Implementations
- llmwiki (lucasastorian) — upload docs, Claude via MCP
- obsidian-wiki (Ar9av) — framework for AI agents
- second-brain (NicholasSpisak) — personal KB for Obsidian
- llm-wiki-compiler (ussumant) — compiles markdown into wikis
- wiki-skills (kfchou) — Claude Code skills for the pattern
- LLM Wiki v2 (rohitg00) — extended with memory lifecycle, confidence scoring, consolidation tiers, knowledge graph structure
Real-World Results
User vbarsoum on HN: 3 business books (~155K words) → 210 concept pages, ~4,600 cross-references, unprompted synthesis across sources.
Intellectual Lineage
Karpathy cites Vannevar Bush’s 1945 essay “As We May Think” (Memex). The Memex never worked because maintenance was manual. The LLM Wiki solves the maintenance problem.
Criticisms and Limitations
- Not suitable for millions of documents
- Requires an LLM agent with file access
- Knowledge quality depends on the schema quality
- The human still needs to curate sources
- Potential for hallucinated claims in wiki pages