📷 "Army partners with industry to test futuristic technologies" by U.S. Army Combat Capabilities Development Command is licensed under CC BY 2.0. To view a copy of this license, visit https://creativecommons.org/licenses/by/2.0/.
LLM Wiki 2026: Karpathy's Pattern for Self-Managing AI Knowledge Bases
In April 2026, Andrej Karpathy – co-founder of OpenAI and former AI lead at Tesla – published a short GitHub Gist that gathered over 5,000 stars within days and received more than 16 million views on X. His topic: a new pattern for handling knowledge with Large Language Models. Instead of re-searching and re-analyzing documents with every query (as RAG systems do), Karpathy proposes that an AI agent builds and continuously maintains a persistent, structured wiki of Markdown files. The idea struck a nerve – and has since changed how developers and knowledge workers design their personal research environments.
The Core Problem: Stateless Knowledge
Most AI knowledge tools today work on the same principle: upload files, split them into chunks, embed them into a vector database, and retrieve the relevant pieces for each question. NotebookLM, ChatGPT uploads, and virtually all RAG systems operate that way. The problem: The AI rediscovers knowledge with every question. There is no accumulation. When a complex question is asked that requires synthesizing five documents, the model must find and assemble the appropriate fragments anew each time. Nothing is retained, nothing grows.
Karpathy’s diagnosis: The most expensive part of a knowledge base is not reading or thinking – it is bookkeeping: cross-references, summaries, deduplication, conflict detection. These are precisely the tasks for which LLMs are disproportionately well-suited, and which humans reliably abandon after two weeks.
The Three-Layer Architecture
The LLM wiki pattern consists of three clearly separated layers:
Layer 1 – Raw sources (raw/): This is where the immutable source documents land: PDFs, articles, papers, screenshots, transcripts. These files are never modified after ingestion – they serve as an archived source of truth.
Layer 2 – The Wiki (wiki/): An AI agent incrementally compiles the raw documents into a structured collection of Markdown files. Each file is a Wikipedia-like entry for a concept or entity, linked via [[Wiki-Links]], categorized, and annotated with source citations. Karpathy himself reports that his research wiki has grown to roughly 100 articles with over 400,000 words – without him writing a single line.
Layer 3 – Schema (CLAUDE.md or schema.md): This is where the rules are defined: How should new pages be created? What categories exist? How are contradictions handled? This schema is the most important file – it controls how the agent builds and maintains the wiki.
The analogy to a compiler is obvious: raw/ is the source code, the LLM agent is the compiler, the wiki is the binary, and the health checks are the test suite.
The Three Operations: Ingest, Query, Lint
The pattern defines three fundamental workflows:
-
Ingest: A new document is placed in
raw/. The agent reads it, extracts the core information, and integrates it into the existing wiki – updates existing pages, creates new entries for unknown concepts, sets cross-references, and flags contradictions. -
Query: Instead of searching through chunks RAG-style, the agent navigates the already-compiled wiki, follows links, and synthesizes answers from the already interlinked entries. The answer is not only faster, but more informed – because the wiki already integrates all previous sources.
-
Lint (Health Checks): Regular audit runs identify dead links, orphan pages, contradictions, or gaps. Like a linter for code, the health check ensures the knowledge base remains clean and consistent.
LLM Wiki vs. RAG: Which Approach When?
The LLM wiki is not a universal RAG replacement, but a tool with specific strengths:
| Criterion | RAG | LLM Wiki |
|---|---|---|
| Knowledge persistence | None – stateless | Full – builds upon |
| Multi-document synthesis | Per query, new | Pre-compiled |
| Conflict detection | No | Yes |
| Setup effort | Low | Medium |
| Source traceability | High (chunk-level) | Medium (page-level) |
| Ideal for | Quick Q&A, frequently changing data | Deep, growing research topics |
RAG is the better choice when data changes daily or exact source tracking at chunk level is critical. The LLM wiki excels when building expertise over weeks and months – and when the model needs to reason across the knowledge base, not just retrieve from it.
Tools and Community
The barrier to entry is remarkably low. All that is needed is a folder on your computer, an LLM agent (Claude Code, OpenAI Codex, OpenCode), and optionally Obsidian as a frontend for the graph view. Within weeks, the community has produced numerous implementations: an Obsidian plugin for LLM Wiki, LLM Wiki apps, CI pipelines for automatic health checks, and even Google’s Open Knowledge Format, which extends the pattern with a common standard.
Conclusion
Karpathy’s LLM wiki pattern is more than just another AI trend – it is a fundamental shift in perspective. Instead of using LLMs as mere query engines for raw documents, they become active curators of a growing knowledge base. The key insight: LLMs are better at managing knowledge than humans – and humans are better at curating and evaluating. This pattern distributes the work where it is most effective. For anyone regularly working with deep research and expanding knowledge domains, the LLM wiki in 2026 is the most promising approach to rethinking personal knowledge work.
Sources
- Karpathy’s original GitHub Gist: llm-wiki.md (April 2026) — 5.000+ stars, the original idea
- DecodeTheFuture: LLM Wiki – Karpathy’s 3-Layer Pattern vs. RAG (2026) — Detailed analysis of the architecture
- Data Science Dojo: LLM Wiki Tutorial – Build a Compounding Knowledge Base — Step-by-step guide for getting started
- Starmorph: Complete Guide to Karpathy’s LLM Wiki (April 2026) — Comprehensive guide with Claude Code and Obsidian
- Agentpedia Codes: Karpathy’s LLM Knowledge Bases – The Post-Code-AI Workflow — German analysis of the paradigm shift
- Denser AI: LLM Wiki – Karpathy’s Idea for AI Knowledge Bases — Overview of the most important projects
🌐 Machine-translated from the German original, editorially reviewed. 🤖 Written with AI assistance.
Sponsored