The pattern
behind ScholarOS
In April 2026, Andrej Karpathy shared a pattern for building AI knowledge bases that compound over time. It went viral — 16M+ views on GitHub. Not because it was complicated, but because it was obvious once you saw it.
What is
LLM-Wiki?
LLM-Wiki is not a product. It’s not a framework. It’s a pattern — a way of organizing knowledge so that an AI can read it, maintain it, and get smarter every time you add to it. Karpathy described it in a GitHub Gist, and it became one of the most discussed AI workflows of the year.
The core idea is simple: instead of stuffing documents into a vector database and hoping the retriever finds the right chunks, you pre-compile your knowledge into structured, interlinked markdown pages. A human writes or reviews them. An AI maintains them. And every query reads those pages directly — no retrieval pipeline, no re-ranking, no approximation.
Karpathy’s own example wiki reached roughly 100 articles and 400,000 words. At that scale, it was still faster and more accurate than RAG systems operating on the same material. The reason is straightforward: the synthesis already happened.
Views on the Gist
Words in the example wiki
Articles, still beating RAG
Why traditional RAG
doesn’t compound
RAG was a breakthrough when it appeared. But for personal knowledge — the kind that lives in your notes, your courses, your research — it has a structural flaw.
Every query starts from zero
When you ask a RAG system a question, it re-embeds your query, re-searches the vector store, re-ranks the results, and generates an answer. None of that work persists. Tomorrow it does the same thing for a similar question.
Synthesis gets repeated
If your notes say X in three different places, the RAG system has to find all three chunks, reconcile them, and synthesize an answer. Every single time. It never remembers that it already figured out how those pieces connect.
Quality degrades at scale
As your knowledge base grows, retrieval gets harder. More chunks, more noise, more chances for the wrong context to sneak in. The system that worked with 50 documents struggles with 500.
No structure, just proximity
Vector similarity measures how close embeddings are in vector space. That’s a rough proxy for relevance, not a guarantee. The system doesn’t know that two concepts are related — it just knows their vectors are nearby.
“RAG is stateless. Every question is the first question. That’s fine for general knowledge. For your own material, it’s a dead end.”
Three layers,
each with a clear job
LLM-Wiki organizes knowledge into three distinct layers. Each layer has a single responsibility. Together they form a pipeline that turns raw sources into queryable, composable knowledge.
raw/
Immutable sources
Drop your sources here. PDFs, lecture notes, past papers, textbook chapters — anything that feeds the wiki. These files are never modified by the AI. They are the ground truth. If the wiki says something wrong, the source is always there to correct it.
wiki/
AI-generated topic pages
This is where synthesis lives. The AI reads your raw sources and writes interlinked topic pages — one file per concept, connected by wikilinks. Each page synthesizes information from multiple sources into a coherent, structured document. These pages grow with your knowledge base, never reset.
outputs/
Published artifacts
Revision summaries, flashcard decks, mock exams, study guides — anything generated from the wiki for a specific purpose. These are derived artifacts, not primary knowledge. They can be regenerated at any time from the wiki layer.
Three operations,
one workflow
The entire system runs on three actions. Each one touches the wiki layer and leaves it better than it found it.
Drop raw sources into the raw/ folder. The LLM reads every document, identifies key concepts, creates or updates topic pages in wiki/, and adds wikilinks between related pages. The wiki grows. Nothing is overwritten that shouldn’t be — it updates incrementally, like a careful editor revising a living document.
Ask a question. The LLM reads the relevant wiki pages directly — no vector search, no chunking, no retrieval pipeline — and generates an answer grounded in pre-synthesized knowledge. It can also update the wiki if the answer reveals a gap or a new connection. Every query makes the system smarter.
A health check for your knowledge base. The LLM scans every page for broken wikilinks, contradictions between pages, orphaned topics with no connections, and stale content that no longer matches the source material. Think of it as a linter for your mind — it catches drift before it becomes a problem.
Synthesis happens once,
then gets updated
This is the single most important difference between LLM-Wiki and every other approach. In RAG, the LLM synthesizes an answer from raw chunks every time you ask a question. In LLM-Wiki, synthesis happens at ingest time. The question then reads the pre-synthesized result.
Traditional RAG
Repeated every query. No memory. No compounding.
LLM-Wiki
Synthesis once, queries many. Knowledge compounds.
“The heavy lifting happens at ingest time — one cost — instead of at query time — repeated cost. That’s the shift. You pay once to compile knowledge. Then every question you ask is cheap, fast, and grounded.”
How ScholarOS
makes it real
Karpathy described the pattern. We built the product. ScholarOS takes the LLM-Wiki approach and wraps it in an interface that feels like home — an Obsidian vault you already know, with AI that compiles and maintains the wiki for you.
Obsidian as the IDE
Your vault is a standard Obsidian vault. Every backlink, graph view, and community plugin works exactly as you expect. The wiki pages are just markdown files you can open, read, and edit by hand if you want.
Claude Code as wiki maintainer
An AI agent reads your sources, writes wiki pages, maintains links, and runs lint checks. It operates on the same files Obsidian reads — no abstraction layer, no proprietary format.
Git for version control
Every change to the wiki is a commit. You can see what the AI added, what it changed, and why. Roll back if something went wrong. The entire history of your knowledge base is traceable.
LLM proxy for multi-provider access
One subscription gives you access to GPT-5, Claude 4, and Gemini. The best model for each task — heavy synthesis for Claude, fast queries for GPT, broad coverage for Gemini — without managing API keys.
Your files never leave your machine
AI answers only from your material
Every session makes the next one smarter
Stop re-retrieving.
Start compounding.
ScholarOS takes the LLM-Wiki pattern and makes it effortless. Drop your sources. Ask your questions. Watch your knowledge grow.
Read the original pattern on Karpathy’s GitHub Gist