Two Ways to Store Knowledge — and Why One of Them Doesn't Scale
Here is how most AI power users manage their knowledge today. You collect notes, articles, and documents. You paste the relevant ones into your AI chat when you need answers. Sometimes you set up a RAG pipeline — a retrieval-augmented system that searches your files and feeds matching chunks to the model. You feel organised. The problem is, you are not really accumulating anything.
RAG has a structural weakness that most practitioners don't talk about: there is no synthesis. Each time you ask a question, the system finds fragments and hands them to the model cold. It cannot build on the connections it made last week. It cannot surface a pattern across 50 documents unless you explicitly ask for it. Your knowledge base grows in size, but not in understanding.
In April 2026, Andrej Karpathy — OpenAI co-founder and former Tesla AI Director — published a GitHub Gist titled "LLM Wiki" that describes a fundamentally different approach. Instead of you asking the AI about your knowledge, the AI maintains the knowledge base itself. It reads your sources, synthesises them into structured articles, builds backlinks between related concepts, and keeps everything updated as new material arrives.
Karpathy's own research wiki now contains roughly 100 articles and 400,000 words — the equivalent of four full-length novels — built entirely by Claude. It is reportedly 70x more computationally efficient than a RAG pipeline on the same material, because the work of synthesis happens once, not on every query.
What Is the Karpathy LLM Wiki Pattern?
The LLM Wiki pattern is a framework for building a personal knowledge base that an AI agent maintains on your behalf. You provide raw source material. The AI reads it, extracts concepts, writes structured articles, and maintains links between them. You consume the finished wiki — you never manually curate it.
The pattern was designed to solve a specific pain point: the gap between having information and having understanding. RAG helps you retrieve information. The LLM Wiki builds understanding by letting the model think through your material and organise it into something coherent.
The key insight is that LLMs are already excellent at summarisation, concept extraction, and relational thinking. The LLM Wiki pattern just gives them a permanent place to deposit that thinking — a living markdown directory that grows more useful over time rather than being discarded at the end of each chat.
The Three-Layer Architecture: How It Actually Works
The LLM Wiki is built on three components that work together. Understanding each one is essential before you set it up.
Layer 1 — Raw Sources (Immutable): This is your input folder. Drop in PDFs, articles, meeting transcripts, YouTube subtitles, research papers, anything you want the AI to learn from. You never edit this folder directly. It is append-only — new material goes in, nothing comes out.
Layer 2 — The Wiki (LLM-Maintained): This is a directory of markdown files — concept articles, summaries, timelines, glossaries — created and updated entirely by the AI. Every article has frontmatter (title, date, tags) and ends with a backlinks section pointing to related wiki entries. You read from this layer. You never write to it manually.
Layer 3 — The Schema (Configuration): This is a configuration file — typically named CLAUDE.md or AGENT.md — that tells your AI agent exactly how to run the wiki. It specifies the folder structure, the article format, how to handle new source files, and how to update existing entries when new material arrives. This is the only file you write yourself.
The schema is what makes the whole system reproducible. When you add a new source file and run your agent, it reads the schema, knows what to do, and produces output that fits the existing wiki structure consistently.
How to Set Up Your LLM Wiki in Under 30 Minutes
You do not need to be a developer to run this pattern. Claude Code (or any agentic AI setup with file access) handles all the actual work. Here is the step-by-step setup:
Step 1 — Create the folder structure. Make three folders: sources/, wiki/, and a root-level file called CLAUDE.md. That is your entire setup.
Step 2 — Write your CLAUDE.md schema. This file tells the agent how to run your wiki. See the prompt template below for a complete starter schema you can copy and modify.
Step 3 — Drop your first source files into sources/. Start with 5–10 documents on the same topic. Articles you have saved, research papers you have read, meeting notes from a project — anything you want the AI to synthesise.
Step 4 — Run your agent. In Claude Code (or a similar agentic setup), point it at your project folder and give it the instruction: "Follow the CLAUDE.md schema and process all new files in sources/." The agent reads each file, extracts concepts, and writes new wiki articles or updates existing ones.
Step 5 — Add new material over time. As you encounter new sources, drop them in sources/ and re-run the agent. The wiki grows and deepens automatically.
Your first wiki run for 10 documents typically takes 5–10 minutes. After that, incremental runs for new files take under 2 minutes.
The Schema Prompt: Copy This and Make It Your Own
This is the most critical file in your LLM Wiki setup. The CLAUDE.md schema defines everything the agent does. Here is a complete starter template:
Try This Prompt (paste into your CLAUDE.md file):
--- CLAUDE.md START ---
You are the maintainer of a personal knowledge base wiki in the wiki/ directory. When I ask you to "process sources," follow these steps exactly:
1. Check sources/ for any files not yet processed (compare against wiki/processed-log.md).
2. For each unprocessed file, read the entire content carefully.
3. Extract 3–7 key concepts or findings from the file.
4. For each concept: check if a wiki article already exists. If yes, update it with new information. If no, create a new markdown file in wiki/ with this format:
- Frontmatter: title, date, tags, source_file
- Summary paragraph (under 100 words)
- Key points (bullet list)
- Detailed explanation (as many paragraphs as needed)
- Related concepts (links to other wiki articles using [[wiki-filename]] notation)
5. After processing all files, update wiki/index.md with a full list of all wiki articles and their one-line descriptions.
6. Add the processed filename to wiki/processed-log.md.
Never delete existing wiki articles. When new information contradicts existing content, add a "Conflicting Views" section rather than replacing the original.
--- CLAUDE.md END ---
Adjust the schema to fit your domain. If your wiki covers a specific industry, add instructions about terminology conventions or article categories relevant to your field.
What the LLM Wiki Does Better Than RAG
The comparison between LLM Wiki and RAG is not about which is smarter — it is about what kind of knowledge work you need. RAG is excellent for retrieval: "Find me the section about X." LLM Wiki is excellent for synthesis: "What do I know about the relationship between X and Y across all my sources?"
RAG retrieves fragments and assembles them on demand. Every query starts from scratch. The model sees raw chunks and must re-derive meaning each time. With LLM Wiki, the synthesis has already happened. The wiki articles contain pre-built understanding — concepts have been defined, compared, and linked. A query into a mature LLM Wiki is like asking an expert with a decade of curated notes rather than asking someone to search a filing cabinet.
According to Karpathy's own benchmarks (shared in the original GitHub Gist), querying a pre-synthesised LLM Wiki uses roughly 70x fewer tokens than an equivalent RAG query on the same material — because the model is reading organised summaries rather than raw documents. For practitioners paying for API usage, this efficiency difference is significant over time.
The LLM Wiki also handles cross-document synthesis naturally. If you have 20 articles that all touch on the same concept from different angles, the wiki builds a single authoritative article that incorporates all of them — something RAG cannot do without a specifically engineered summarisation pipeline.
Common Mistakes When Setting Up Your LLM Wiki
The most common mistake practitioners make is dumping too many unrelated sources into the wiki at once. If your sources span five different domains, the AI will generate a sprawling wiki with no clear organisational logic. Start with a focused topic — one project, one research area, one skill you are building. A focused wiki of 20 articles on a single topic is far more useful than a messy collection of 200 articles on everything.
The second mistake is writing an underspecified schema. If your CLAUDE.md does not define exactly what an article should look like — including the frontmatter fields, the section structure, and the backlink format — the agent will improvise. Early articles might look different from later ones. You will spend time cleaning up formatting instead of reading knowledge.
Third: do not skip the processed-log. Without a log of which files the agent has already seen, every run will re-process everything, creating duplicate articles and wasting API tokens. The processed-log is a 5-minute addition that saves hours of cleanup later.
Fourth: do not try to maintain the wiki manually. If you start editing wiki articles by hand, you break the agent's ability to update them cleanly. Keep a strict separation: you own sources/ and CLAUDE.md, the agent owns wiki/.
Real-World Applications for Practitioners
The LLM Wiki is not just for researchers. Here are three practical use cases that practitioners in Hong Kong are already running:
Competitive Intelligence: Drop competitor press releases, pricing pages, and product update articles into sources/ weekly. The wiki builds and updates competitor profiles automatically. Instead of searching through saved tabs, you query a structured, up-to-date competitive analysis.
Client Knowledge Base: For marketers, consultants, or account managers handling multiple clients, a per-client LLM Wiki synthesises meeting notes, briefs, and email threads into a structured overview. When you need context before a call, you have a 2-minute read instead of a 20-minute file search.
Learning Acceleration: Drop course transcripts, book summaries, and tutorial articles on a new skill into sources/. The wiki builds a personal textbook from your specific learning materials, formatted the way you actually think — not the way the original authors organised their content.
The common thread: the LLM Wiki works best for any domain where you are consuming more material than you can reasonably memorise, and where the relationships between ideas matter as much as the individual facts. 懂AI的冷,更懂你的難 — UD 同行28年,讓科技成為有溫度的陪伴.
Getting Started: Your First LLM Wiki This Week
Pick one topic you actively research — a product category, a skill area, or an ongoing project. Collect 10 sources you have already read or saved. Create the three-folder structure, paste the CLAUDE.md schema from this article, and run your agent.
Your first wiki will be rough. The second run, when you add five more sources, will be better. By the time you have 30 sources processed, you will have a knowledge resource that genuinely reflects how you think about your domain — maintained entirely by AI, queryable at any time, and growing smarter with every new document you add.
This is not a feature buried in an app or a subscription you sign up for. It is a workflow pattern you own completely, built on tools most practitioners already have access to. It just requires 30 minutes of setup to start.
Ready to Test Your AI Knowledge Level?
Mastering techniques like the LLM Wiki is what separates practitioners who use AI every day from practitioners who use it at full depth. UD 團隊手把手帶你完成每一步 — from choosing the right tool for your workflow to building repeatable AI systems that compound over time.