Concept: OBSIDIAN / Karpathy LLM Wiki Pattern

Category: methodology / system architecture Source: Andrej Karpathy GitHub gist (April 2026) — https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f Go Beyond implementation: This wiki (OBSIDIAN)


What It Is

The Karpathy LLM Wiki pattern treats AI knowledge management like code compilation rather than interpretation. Instead of RAG (re-deriving answers from raw docs every query), the LLM builds and maintains a persistent, structured wiki from raw sources.

The compiler analogy:

  • Raw sources (articles, transcripts, files) = source code
  • The LLM = compiler
  • The wiki = compiled executable

Compile once. Query the compiled output. Knowledge compounds over time.


Three-Layer Architecture

LayerDescriptionWho Owns It
Raw sourcesImmutable inputs — transcripts, files, articlesHuman (curate only)
The wikiStructured, interlinked markdown filesLLM (creates & maintains)
Schema (CLAUDE.md)Operating instructions and conventionsHuman (sets once, refines)

Three Operations

  • Ingest — New source → LLM writes summary, updates 5–15 wiki pages, cross-links
  • Query — Question → LLM reads relevant pages, synthesises answer, files good answers back
  • Lint — Health check → contradictions, orphans, stale pages, missing cross-refs

Why It Beats RAG for Go Beyond

RAGOBSIDIAN
Re-derives from raw docs every queryCompiled knowledge, instant synthesis
No accumulationCompounds with every session
Retrieval quality depends on chunkingSynthesis quality improves over time
Humans must curate and retrieveLLM curates, maintains, cross-references
Good answers disappear into chatGood answers get filed back permanently

Go Beyond Implementation Notes

  • Installed: 2026-05-01 on machine DAMIEN
  • Location: the vault (R2) (accessible across all machines with OneDrive)
  • Multi-machine tracking via machine-log.md
  • Slash commands: /OBSIDIAN-ingest, /OBSIDIAN-query, /OBSIDIAN-lint
  • Grows from: Cowork sessions, uploaded files, external references

See Also