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

  1. RAG is stateless — most systems (NotebookLM, ChatGPT uploads) re-discover knowledge from scratch on every question. Nothing compounds.
  2. Compiled knowledge beats retrieved knowledge — cross-references, contradictions, and synthesis should be pre-computed once, then kept current. Not re-derived per query.
  3. 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.
  4. Three layers: raw sources (immutable), the wiki (LLM-maintained), the schema (conventions/workflows, co-evolved).
  5. 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).
  6. Good answers should be filed back — explorations compound in the knowledge base just like ingested sources.
  7. 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 queries
  • log.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