The LLM-Wiki Pattern: Maintaining a Compounding Personal Knowledge Base
ENGINEERING NOTES
Published / DavidHLPL
This page describes the operating model of the knowledge base itself. The primary source is
karpathy-llm-wiki. The maintenance contract lives in KB.md and the knowledge-base skill.
Definition
The LLM-Wiki pattern is not a file-upload RAG system that reconstructs an answer from scratch for every question. The LLM reads source material and compiles facts, concepts, entities, comparisons, and uncertainty into a persistent, linked set of Markdown pages.
The key difference is simple: the wiki compounds.
Cross-references remain available, contradictions are made explicit, and synthesis pages evolve as new sources arrive. A useful answer can be filed back into the wiki instead of disappearing into chat history.
Why it matters: the accumulation gap in RAG
| Dimension | Traditional RAG / file upload | LLM-Wiki |
|---|---|---|
| Knowledge shape | Raw documents retrieved at query time | Persistent, pre-compiled wiki |
| Synthesis cost | Reassembled for every query | Compiled during ingest and kept current |
| Contradictions | Rediscovered repeatedly | Recorded explicitly in pages |
| Compounding | Usually starts from zero | Each ingest expands the network |
RAG’s problem is not that retrieval is necessarily inaccurate, but that it lacks accumulation: questions requiring synthesis across multiple sources need the relevant fragments to be found and assembled again each time. LLM-Wiki does that bookkeeping in advance.
Three layers
| Layer | Location | Role | Mutability |
|---|---|---|---|
| Raw sources | src/content/raw/{locale}/ |
Clipped articles, papers, documents, and data | Read-only |
| Wiki | src/content/note/{locale}/ |
concept, entity, and synthesis pages |
Incrementally maintained by the LLM |
| Schema | KB.md, .claude/skills/knowledge-base.md |
The maintenance contract | Evolves slowly |
The separation lets the wiki be rewritten without overwriting evidence. Every non-trivial conclusion should trace back to raw through sources.
Three operations
Ingest
Save a source in raw, confirm the important facts, create or update wiki pages, maintain cross-references, update kb-index.md, and append an entry to kb-log.md. One source may touch many pages, but raw is never edited afterwards.
Query
Read the index first, then the relevant wiki pages and their raw evidence. Distinguish source facts, existing synthesis, and current inference, and cite the relevant pages or sources. Comparisons, decisions, and analyses that remain useful should become synthesis pages.
Lint
Look for contradictions, stale claims, orphan pages, broken links, unsupported conclusions, unindexed pages, and concepts that should be split. Turn lint findings into the next ingest or query instead of polishing the surface only.
Navigation files
-
kb-index.mdis the content-oriented catalogue of concepts, entities, syntheses, and raw sources. -
kb-log.mdis an append-only timeline. Each entry starts with## [YYYY-MM-DD] type | title, so it can be searched withgrep '^## \['. -
The next batch of work is tracked in the ingest inbox.
Current boundary and next direction
zh-cn is the canonical language of this knowledge base. en and ja keep the site entry points and this explanatory page translated; they are not independent sources of truth.
The old operations, Java, and architecture blog posts were removed from the public wiki list. Whether they deserve re-ingestion requires source verification, deduplication, and evidence review; previous publication is not enough to make a claim stable.
Future pages should grow three connected networks:
- Entity pages for personal projects, tools, frameworks, and runtime environments.
- Concept pages for transferable methods, principles, and troubleshooting models.
- Synthesis pages for comparisons, evolutions, and personal decisions across sources.
Sources and related documents
- karpathy-llm-wiki
- Headroom Single-Port Synthesis: Entry, Dynamic Upstreams, and Verification Boundaries
- OMP Configuration Layers: Model Roles, Agent Overrides, and Fallback Chains
- Headroom Route Persistence Synthesis: Named Profiles, model_cache, and Recovery
- OMP Hook Extension Concept: Decision-Point Nudges, Hard Blocks, and Status Bridges
- KB Session Ingestion Pipeline Contract: Incremental Reuse, Redaction v19, and Immutable Raw
- MCP Protocol Era Boundary and the codebase-memory-mcp v0.10.2 Graph Workflow
- Headroom 0.34 Compression and Retrieval Contract: Fields, Modes, and Real-Endpoint Tests
Research notes
- Original document: src/content/note/en/llm-wiki-pattern.md
- Source revision: f49953fb0d4bd52a39bf81167b0c4b7dd7d78a64
- Evidence status: active