A pattern for building a persistent, AI-maintained knowledge base that compounds over time — the operational foundation of this vault.
Overview
The LLM Wiki pattern replaces ad-hoc AI queries with a continuously maintained knowledge artifact. Rather than retrieving raw document fragments and synthesising answers from scratch on every query (the RAG approach), an LLM incrementally builds and maintains a structured wiki of markdown files. Knowledge is compiled once and kept current through incremental ingestion.
[Source: karpathy-llm-wiki-pattern, 2026-04-11]
Three-Layer Architecture
| Layer | Description | Mutability |
|---|---|---|
| Raw sources | Original documents, articles, gists, field notes | Immutable |
| The wiki | LLM-generated markdown pages: summaries, entities, cross-references | Updated by LLM |
| The schema | CLAUDE.md — defines structure, conventions, workflows | Edited by human |
Core Operations
INGEST
Process a new source document:
- Create a source record in
sources/ - Extract all meaningful information
- Update or create 10–15 wiki pages with cited facts
- Update
index.md - Append to
log.md
QUERY
Answer a question using the wiki:
- Identify 3–5 most relevant pages
- Synthesise answer with wikilink citations
- If the answer surfaces new synthesis, persist it as a wiki page update
- Append to
log.md
LINT
Periodic health check:
- Scan for contradictions between sources
- Identify orphan pages (no inbound links)
- Flag stale pages
- Note coverage gaps
- Append findings to
log.md
Why This Works Better Than RAG
| Dimension | RAG | LLM Wiki |
|---|---|---|
| Knowledge accumulation | Re-derived every query | Compounds over time |
| Cross-source synthesis | Happens at query time, not persisted | Captured in wiki pages |
| Contradiction detection | Implicit | Explicit (LINT operation) |
| Maintenance burden | Low (no wiki to maintain) | Delegated to LLM |
| Latency per query | Higher (retrieval + synthesis) | Lower (wiki already compiled) |
Navigation Files
Two files are essential for navigating a large wiki:
index.md— content catalog organised by category; updated on every INGESTlog.md— append-only chronological record of all INGEST, QUERY, and LINT operations; newest entries at top
Inspiration
The pattern echoes Vannevar Bush’s 1945 Memex concept — a personal knowledge machine that links and trails through information. LLMs make it tractable by handling the maintenance burden that would otherwise cause a human-curated wiki to atrophy.
[Source: karpathy-llm-wiki-pattern, 2026-04-11]
Practical Notes for This Vault
- See [[CLAUDE.md]] for the full schema governing operations in this vault.
- Topic categories for this vault are domain-specific: farming practice, soil science, equipment, people, organisations, research, crops, business, events.
- The first source ingested was [[sources/karpathy-llm-wiki-pattern]] (the gist describing this methodology).
Sources
- [[sources/karpathy-llm-wiki-pattern]] — Andrej Karpathy’s gist defining the pattern