LLM Wiki Pattern

source
knowledge-managementllm-agentspersonal-knowledge-baserag

A pattern proposed by Andrej Karpathy for using LLMs to build and maintain personal knowledge bases. Published as a GitHub gist (LLM Wiki).

Core idea

Most LLM-document interactions follow the RAG pattern: upload files, retrieve chunks at query time, generate an answer. Knowledge is re-derived from scratch on every question. Nothing accumulates.

The LLM Wiki pattern inverts this. The LLM incrementally builds a persistent wiki — structured, interlinked markdown files that sit between the user and raw sources. When a new source arrives, the LLM reads it, extracts key information, and integrates it into existing pages. Cross-references are maintained. Contradictions are flagged. The synthesis reflects everything ingested so far.

The wiki is a compounding artifact. It gets richer with every source added and every question asked.

Architecture

Three layers:

  1. Raw sources — immutable input documents. The LLM reads but never modifies them.
  2. The wiki — LLM-generated markdown files. Summaries, entity pages, concept pages, comparisons, synthesis. The LLM owns this layer entirely.
  3. The schema — a conventions document (e.g. CLAUDE.md) defining wiki structure, workflows, and rules. Co-evolved by human and LLM over time.

Operations

  • Ingest — process a new source into the wiki. A single source may touch 10-15 pages. The LLM reads the source, discusses takeaways, writes a summary, updates entity/concept pages, updates the index.
  • Query — search the wiki, synthesize an answer with citations. Good answers can be filed back as new wiki pages, so explorations compound.
  • Lint — health-check for contradictions, stale claims, orphan pages, missing cross-references, concepts without their own page.

Key insight

Wikis fail because the maintenance burden (updating cross-references, keeping summaries current, noting contradictions) grows faster than the perceived value. LLMs eliminate this friction — they handle all the bookkeeping that causes human-maintained wikis to decay.

Karpathy’s formulation: “Obsidian is the IDE; the LLM is the programmer; the wiki is the codebase.”

Lineage

The pattern traces to Vannevar Bush Memex (1945) — a personal, curated knowledge store with associative trails between documents. Bush’s vision was private, actively curated, with connections as valuable as documents themselves. The part he couldn’t solve was maintenance. LLMs handle that.

Applications

  • Personal knowledge (goals, health, self-improvement)
  • Research (papers, reports, evolving thesis)
  • Reading companions (chapter-by-chapter filing, character/theme pages)
  • Business/team wikis (fed by Slack, meetings, project docs)
  • Competitive analysis, due diligence, course notes