LLM Wiki Methodology

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:

  1. Create a source record in sources/
  2. Extract all meaningful information
  3. Update or create 10–15 wiki pages with cited facts
  4. Update index.md
  5. Append to log.md

QUERY

Answer a question using the wiki:

  1. Identify 3–5 most relevant pages
  2. Synthesise answer with wikilink citations
  3. If the answer surfaces new synthesis, persist it as a wiki page update
  4. Append to log.md

LINT

Periodic health check:

  1. Scan for contradictions between sources
  2. Identify orphan pages (no inbound links)
  3. Flag stale pages
  4. Note coverage gaps
  5. 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 INGEST
  • log.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