LLM Wiki Pattern — Andrej Karpathy
Summary
A design pattern for building personal knowledge bases using LLMs. Instead of RAG (re-deriving knowledge from raw documents every query), the LLM incrementally builds and maintains a persistent wiki — a structured, interlinked collection of markdown files.
Key Claims
- RAG is stateless — most systems (NotebookLM, ChatGPT uploads) re-discover knowledge from scratch on every question. Nothing compounds.
- Compiled knowledge beats retrieved knowledge — cross-references, contradictions, and synthesis should be pre-computed once, then kept current. Not re-derived per query.
- The LLM is the writer, the human is the curator — humans curate sources, direct analysis, ask questions. The LLM does summarizing, cross-referencing, filing, bookkeeping.
- Three layers: raw sources (immutable), the wiki (LLM-maintained), the schema (conventions/workflows, co-evolved).
- Three workflows: ingest (process source → update 10-15 pages), query (answer from wiki, file good answers back), lint (health-check for contradictions, orphans, stale claims).
- Good answers should be filed back — explorations compound in the knowledge base just like ingested sources.
- Maintenance is the bottleneck — humans abandon wikis because maintenance burden grows faster than value. LLMs don’t get bored.
Architecture Details
index.md— content-oriented catalog, read first when answering querieslog.md— chronological append-only record of activity- Tools: Obsidian as viewer (graph view, backlinks), LLM as writer, git for version history
- At scale: local search engine like qmd (hybrid BM25/vector search)
Historical Context
Related to Vannevar Bush’s Memex (1945) — personal knowledge store with associative trails. Bush’s vision was private, curated, with connections as valuable as documents. The missing piece was who does the maintenance.
Connections
- RAG vs Compiled Knowledge — core distinction
- LLM as Knowledge Worker — the labor model
- Compounding Knowledge — the key insight
- Andrej Karpathy