๐Ÿง  LLM Wiki

๐Ÿ“… Created 2026-06-06 ๐Ÿท๏ธ Type: concept
architecturepatternknowledge-basemarkdown

Overview

The LLM Wiki is a knowledge base pattern popularized by Andrej Karpathy. Instead of RAG (which recovers knowledge from scratch per query), the wiki compiles knowledge once and keeps it current. The LLM agent curates, cross-references, and maintains the wiki over time.

Three Layers

  1. Layer 1 โ€” Raw Sources: Immutable source material stored in raw/articles/, raw/papers/, raw/transcripts/. Never modified after ingestion.
  2. Layer 2 โ€” The Wiki: Agent-authored markdown pages in entities/, concepts/, comparisons/, queries/. Created and maintained via wikilinks.
  3. Layer 3 โ€” The Schema: SCHEMA.md defines structure, conventions, tag taxonomy, and page thresholds.

Benefits Over RAG

  • Knowledge is pre-synthesized, not re-derived per query
  • Cross-references are already present
  • Contradictions are flagged explicitly
  • Sources are preserved and traceable
  • Works offline (plain markdown files)
  • Obsidian-compatible (graph view, backlinks, Dataview)

Implementation

The memory-wiki implements the LLM Wiki pattern with a Python-based static site generator. Key adaptations:
- Daily log pages (daily/YYYY-MM-DD.md) for chronological session tracking
- Tag taxonomy customized for Hermes Agent conversations and software development
- Deployed as a static site via Cloudflare Pages

๐Ÿ“š Sources

  • https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f