Member-only story
Build your own LLM Wiki: Karpathy’s second-brain pattern, step by step
Most people use AI with documents like this: upload files, ask a question, get an answer, then start over next time. That is RAG (retrieve and answer). It works — but nothing builds up. Ask a hard question that needs five sources, and the model must rediscover the pieces again.
Andrej Karpathy described a different pattern in his LLM Wiki gist: let an LLM agent compile and maintain a wiki — a folder of linked markdown pages — so knowledge compounds. You curate sources and ask good questions. The agent does the filing, cross-links, and updates.
This article turns that idea into a step-by-step setup you can run with Claude Code, Cursor, Codex, or similar agents — plus Obsidian as your reader.
What you’ll learn
- The three layers of an LLM Wiki (
raw/,wiki/, schema file). - How to create your folders and a starter schema (
CLAUDE.md/AGENTS.md). - How to ingest, query, and lint — the three operations that keep the wiki alive.










