LLM Wiki 101

Persistent LLM-maintained knowledge bases — Karpathy's pattern, distilled

v1 · 2026-05-09 · 2 tracks · ~45 min

ENalso in ภาษาไทย

What you'll learn

Track A

Foundations

  • What is an LLM Wiki?
  • Why not just RAG?
  • Zettelkasten ancestry
  • The three layers
  • Page template + citation discipline
  • Operating it by hand
Track B

Engineering

  • Schema design choices
  • Tooling: Obsidian + Git
  • Failure modes (drift)
  • Integration with agents
  • Evaluation metrics
  • Cheatsheet

The central claim

"The wiki is a persistent, compounding artifact." — Andrej Karpathy

  • RAG: stateless — re-derive every query
  • LLM Wiki: stateful — accumulates synthesis
  • The novelty isn't the architecture (70 years old)
  • The novelty is delegating maintenance to the LLM

Three layers, three operations

LayerMutabilityAuthored by
RawNever editedHuman (curates)
WikiUpdated per ingestLLM (with review)
SchemaRare, deliberateHuman (constitution)

Three operations

  • Ingest — turn a new source into wiki updates (multi-page)
  • Query — retrieve accumulated knowledge to answer
  • Lint — periodic health check

RAG vs LLM Wiki

DimensionRAGLLM Wiki
StateStateless per queryStateful, compounds
RetrievesRaw chunksSynthesised pages
ConnectionsEmbedding similarityWikilinks
ProvenanceChunk → source (loose)Page → claim → source (tight)
Best forLookup / per-query QADomain mastery / research

Production hybrid: wiki first (cheap), RAG fallback (current).

Ancestry — Zettelkasten

Niklas Luhmann built ~90,000 paper index cards. ~50 books + ~550 articles came out of that system.

  • Atomicity — one idea per note
  • Cross-referencing — explicit links between notes
  • Unique IDs — stable identifiers (numbered hierarchies)

"LLM Wiki = Zettelkasten + an LLM doing the maintenance."

The genealogy

EraSystemMaintenance
1950s+Paper ZettelkastenAll manual
1980sNoteCards (hypertext)Mostly manual
1995+Wikis (Cunningham)Manual + collab
2020sRoam, ObsidianManual + plugins
2024+LLM WikiLLM does bookkeeping

Standard page template

---
id: concept:llm-wiki
type: concept
status: active
confidence: 0.5
sources: []
---

# Title

## Summary
One paragraph.

## Claims
- <Claim.> `[src: raw/...] {conf: 0.5}`

## Relationships
- composes → [[entity-id]]

Citation discipline (the rule)

Every claim cites a raw file with a confidence number.

  • Forces grounding (no priors padding)
  • Enables decay (low conf + old = stale)
  • Reveals contradictions (both citations stay)
conf = 0.5  (first observation)
conf = 1 - (1 - conf) * 0.6  (each independent reinforcement)

After 1 reinforcement: 0.5 → 0.8
After 2: 0.8 → 0.92
After 3: 0.92 → 0.968

Ingest workflow

  1. Capture — verbatim to raw/YYYY-MM-DD-<slug>.md
  2. Extract — entities per SCHEMA's catalogue
  3. Write/update — multi-page touch with [src:] markers
  4. Reconcile — index.md + log.md + graph/edges.jsonl
  5. Summarise — pages added/modified, contradictions opened

A single ingest typically updates 3-10 pages. One-page ingest = missed cross-references.

Lint workflow

Periodic, not per-ingest. Every 10 ingests or weekly/monthly.

  • Orphans — pages with no inbound links
  • Broken wikilinks[[X]] with no X
  • Contradictions — supersession, never silent deletion
  • Stale claims — decay below 0.2 + 2× half-life → status: faded
  • Citation integrity — every [src:] file exists

"Supersession over deletion." Audit trail beats tidiness.

— end of Track A —

Track B — Engineering patterns

For builders. ~25 min.

Schema design — the highest-leverage decision

  1. Entity catalogue — pick 5-8 types. Avoid 20.
  2. Relation catalogue — 6-10. Use the defaults if unsure.
  3. Decay half-life per type — fast (tools): 90 days. Stable (decisions): 365 days.
  4. Privacy rules — explicit list of what never enters wiki/

Schema updates should be rare. It's a constitution, not a config.

Tooling: Obsidian + Git

ConventionObsidian
One markdown per entityNative
Wikilinks [[X]]Native + backlinks
FrontmatterNative + Dataview queries
Graph viewCore plugin
Git-friendlyJust a folder

Recommended plugins: Dataview, Templater, Obsidian Git.

Failure modes

  • Claim drift — wiki says things sources no longer support (#1 failure)
  • Orphan pages — no inbound links, not in index
  • Broken wikilinks — targets that don't exist
  • Contradictions — opposite claims, same subject
  • Stale claims — decay applied; mark faded, never delete
  • Citation integrity — cited file moved or deleted

Drift is rarely catastrophic on day 1. It compounds.

Provenance audit

# Quick — broken citation pointers
for page in wiki/*.md; do
  for src in $(grep -oE 'raw/[^]]+' "$page"); do
    [ -f "$src" ] || echo "BROKEN: $page → $src"
  done
done

# Deeper — random claim verification
# Pick 5 claims monthly, check the cited raw still says it
# If 1+ fails → full lint sweep is overdue

Integration with agents — context engineering

"As context window increases, model recall decreases." — Anthropic

  • Wiki = persistent memory layer
  • RAG = just-in-time retrieval
  • Sub-agents = clean context windows, return summaries
  • Composition: Wiki cheap → RAG fallback → file back to wiki if novel

Five health metrics

MetricHealthy
Citation density≥ 1.0 per claim
Provenance integrity100% citations point to existing raw
Orphan rate< 5%
Freshness20-50% touched in 90d
Confidence median> 0.6; faded < 10%

Baseline today. Re-check monthly. The cadence catches drift before it compounds.

Anti-patterns to avoid

  • Schema in chat history (not in file)
  • 20+ entity types (over-engineered)
  • One mega-citation at end of page (defeats audit)
  • Claims without confidence numbers
  • Silent deletion instead of supersession
  • Single-page ingest (missed cross-references)
  • Lint per ingest (too noisy)
  • No version control on the wiki

Production checklist

Foundation

  • 3 layers exist
  • Page template followed
  • Every claim cited
  • Wikilinks use IDs

Engineering

  • Schema in file (not chat)
  • Wiki in git
  • 5 metrics baselined
  • Privacy rules explicit
  • Tested on real human + LLM

Sources cited

All claims cited inside the wiki under /wiki/.

Questions?

LLM Wiki 101 · 2026-05-09

Transcript — current slide