LLM-Wiki Second Brain: The Alternative to RAG for Personal Knowledge
Classic RAG isn't the only way to build a personal knowledge base. We unpack Andrej Karpathy's idea: an LLM acting as a librarian that maintains a topical wiki from your raw notes. When it beats RAG, how the structure works, and what to do when it breaks.
IntermediateContent30 minObsidian, Claude, Markdown
1
RAG for personal knowledge — a bottomless suitcase
You read ten articles on context engineering. Dumped notes into Obsidian. A month later, a question: 'what did I read about cache warming?'. Classic RAG sweeps all notes, finds three chunks, the LLM synthesizes an answer. It works. But it does the same job from scratch every single time.
There's another path — Karpathy described it while dissecting his personal knowledge base. Instead of 'store raw notes, let the LLM re-read them', it becomes 'let the LLM itself structure notes into a wiki, and next time just open the right page'. It flips direction: not search over the large, but careful curation of the small.
🔍 Classic RAG
- Raw notes + vector search
- Synthesis on every question from scratch
- Knowledge doesn't compound — re-asking costs the same
📚 LLM wiki
- LLM maintains topic pages
- The answer is already written — you just read it
- Every new note makes the wiki smarter
Try it first on a single topic — one you've been reading about for a while and often come back to. After a week, compare: is it faster to find the thought you need, and does it arrive as a search result or as a ready-made page?
2
The LLM is a librarian, not a reader
In classic RAG, the LLM is a reader in a library: you ask a question, it runs to the shelves, grabs a stack of books, hunts for the right page, rephrases in its own words. Every question — a new expedition. Asked the same question a week ago? Full procedure again.
An LLM wiki flips the role: the LLM becomes the librarian. When you drop in a new note, it decides where to shelve it, which pages to update, which cross-links to add. When you need an answer, you just open the right page and read. No search, no question-time synthesis.
Why does this work? Curation is one-time work. Reading the curated page is many-time work. RAG is the opposite: reading costs the same every time because synthesis runs fresh. If your notes outlive you, the wiki investment pays off many times over.
The key mental shift: the wiki isn't 'a dump of everything you've read'. It's 'what the LLM understood from the dump and compiled into a textbook'. Raw notes still exist as archive — but you work against the curated layer.
Don't try to replace Obsidian or Notion with this system. The wiki lives alongside raw notes: you write in free form, the LLM maintains a structured layer on top — without breaking the habits you already have.
3
Three levels — index, topics, notes
A wiki needs three levels, no more. An index file — a table of contents listing all topics with one line each; this is the only part you maintain by hand. Topic files — one per area of interest (context-engineering.md, agents.md, rag.md), maintained by the LLM. Notes — raw fragments, quotes, clippings, whatever you dumped in.
Unlike RAG, notes aren't vectorized or searched at query time. The LLM only touches them when updating the relevant topic file. All reading happens against topics and the index.
Important: structure follows your thinking style. Think in projects? Topics = projects. Think in concepts? Topics = concepts. There's no right answer, only a consistent one.
index.md
table of contents — you maintain this
topics/*.md
topic pages — LLM maintains these
notes/YYYY-MM-DD-*.md
raw notes — archive, not working layer
Maintain the index file by hand. It's the only part of the system the LLM doesn't touch — it's your map. If the LLM starts reshaping it, you'll lose your entry point and stop distinguishing topics in your head.
4
The core command: 'I added a note, update the wiki'
The whole system hangs on one command: 'I added note X, update the related pages'. The LLM reads the note, finds relevant topic files, decides how to weave it in — new section, extension of an existing one, footnote — and updates the right pages. In parallel, it checks whether the new thought contradicts anything already written.
That contradiction-checking is exactly what makes the wiki valuable. When the LLM flags 'previously you wrote RAG is for dynamic context, now you're saying wiki is better — how do these fit together?', you become more careful yourself. It's not a bug, it's a feature: notes stop piling up like loose paper and continuously integrate into living understanding.
New note
LLM reads
Finds topics
Updates pages
Spots contradictions
Wiki grew smarter
команда: "я добавил notes/2026-04-10-context.md, обнови вики"
LLM:
1. читает новую заметку
2. находит темы: context-engineering.md, rag.md
3. обновляет обе страницы: новая секция или расширение
4. добавляет cross-links между темами
5. отмечает противоречия, если есть
6. обновляет index.md, если появилась новая темаDon't let the LLM auto-rewrite the notes themselves — only the topic files. Notes should stay as you jotted them, otherwise you lose original context and can't verify whether the LLM understood them correctly.
5
When the wiki loses — and you need RAG instead
A wiki isn't universal. Three situations where it loses to classic RAG — worth spotting upfront.
First: too much data that changes often. A million documents with daily updates — the wiki can't keep structure fresh, the LLM burns context on iterations. Second: unpredictable questions that jump to arbitrary angles. Topic pages are useless when the task is 'find any mention of X across fifty articles'. Third: auditability — you need exact quotes with links, and a wiki synthesizes rather than cites.
A personal knowledge base almost never falls into these categories: data is small, topics are stable, sources aren't critical. But verify the flags before migrating the whole system.
Wiki or RAG — which fits?
Stable topics, growing personal understanding
Small scale (hundreds of notes, not millions)
You keep coming back to the same questions
Million documents with daily inflow
You need exact quotes with source links
Questions are arbitrary and don't cluster by topic
Hybrid works best: wiki for what you want to understand, RAG for what you just need to find. In Obsidian the two combine naturally — topic files on top, a note-search plugin as a second layer.
Result
A living personal wiki the LLM maintains with you: three levels (index + topics + raw notes), updates via a single command, contradictions caught on every addition. A place where knowledge stops accumulating as dust and starts compiling into a book you can actually re-read.