LLM Wiki Pattern
A persistent, LLM-maintained knowledge base where the LLM writes all pages and the human curates sources.
Last updated: 2026-04-12
Overview
Proposed by Andrej Karpathy, the LLM Wiki pattern inverts the typical RAG workflow. Instead of the LLM rediscovering knowledge from raw sources on every query, it maintains a structured wiki of synthesized pages that compound over time.
The core insight: a wiki is a persistent, compounding artifact. Every source added makes the whole richer. Every question asked can leave behind a new page. The human never (or rarely) writes wiki content — the LLM owns that layer entirely.
The human’s job is to: source interesting material, ask good questions, and review the graph. The LLM’s job is to: ingest, summarize, cross-reference, flag contradictions, and keep the index honest.
Key Points
- Three layers: raw sources (immutable), wiki pages (LLM-maintained), schema/CLAUDE.md (governs behavior)
- Four operations: INGEST, QUERY, LINT, and ad-hoc NOTE
- Cross-references are the value — a wiki page with no backlinks is an orphan; the graph view in Obsidian reveals the knowledge structure
- LLM writes, human curates — reversing typical note-taking labor
- Schema is config — CLAUDE.md is the “source code” of how the wiki behaves; editing it changes LLM behavior
- index.md + log.md are infrastructure: the catalog and the audit trail
- Echoes Vannevar Bush’s Memex concept but solves the maintenance problem Bush couldn’t — LLMs don’t forget to update links
Connections
- obsidian — recommended editor; graph view, backlinks, and plugin ecosystem make it ideal
- andrej-karpathy — originator of this pattern
Sources
- llm-wiki gist by karpathy — added 2026-04-12