The LLM Wiki pattern
Where this comes from: Karpathy's original note, condensed
Where this comes from: Karpathy's LLM Wiki
A condensed version of Andrej Karpathy's note (gist); WikiBrain's interface follows this pattern.
The core idea
Most people's experience with LLMs and documents looks like RAG: upload files, retrieve relevant chunks at query time, generate an answer. It works, but the LLM rediscovers knowledge from scratch on every question; nothing accumulates. The LLM Wiki idea is different: the LLM incrementally builds and maintains a persistent wiki that sits between you and the raw sources. When you add a source, the LLM reads it, extracts the key information, and integrates it into the existing wiki: updating entity pages, revising summaries, noting where new data contradicts old claims. Knowledge is compiled once and kept current. You rarely write the wiki yourself; you curate sources, explore, and ask the right questions.
Where it applies: research (weeks or months of deep reading), project management (meeting notes and decisions), reading a book (characters, themes, plot threads), personal tracking, team wikis, competitive analysis, course notes.
Three layers
- Raw sources: your curated collection; immutable, the LLM reads but never modifies.
- The wiki: LLM-generated Markdown pages, owned entirely by the LLM: it creates, updates and cross-references. You read, it writes.
- The schema: the document telling the LLM how the wiki is structured, what the conventions are and what workflows to follow (the role a Cursor rules file plays, if you have used one). You and the LLM co-evolve it.
The three operations are Ingest, Query and Lint; the two special files are index.md and log.md (see the user guide). Karpathy's tips map onto WikiBrain features: Obsidian's graph view → the graph, Dataview → the table view, Marp → slide pages, downloading images locally → attachments, "the wiki is a git repo" → version snapshots plus export.
Why this works
The tedious part of maintaining a knowledge base is not the reading or the thinking; it is the bookkeeping: updating cross-references, keeping summaries current, noting contradictions, staying consistent across dozens of pages. Humans abandon wikis because the maintenance burden grows faster than the value. LLMs don't get bored, don't forget a cross-reference, and can touch fifteen files in one pass, so the wiki stays maintained. The human's job is to curate sources, direct the analysis, ask good questions and think about what it all means; the LLM does everything else.