Karpathy's Obsidian RAG + Claude Code: The No-Database Setup
If you're a solo operator or small team drowning in documents, you probably don't need a real RAG system. You need Andrej Karpathy's Obsidian knowledge base setup — no vector database, no embeddings, no chunking, no retrieval pipeline. Just a clever folder structure, a CLAUDE.md file, and Claude Code doing the navigation. I've been running this setup for a few weeks on my own research vault, and it answers the exact same questions a full graph RAG system would, at essentially zero cost.
This came out of a Karpathy Twitter post breaking down how he maintains his personal knowledge base. The big insight: large language models paired with a harness like Claude Code are now good enough to navigate a well-structured markdown vault like it's a database. You don't need Pinecone. You don't need LightRAG. You need Obsidian and a plan.
What is Karpathy's Obsidian RAG setup?
Karpathy's Obsidian RAG is a file-system-based knowledge base that uses Claude Code as the retrieval layer instead of a vector database. You dump research into a /raw folder, Claude Code compiles it into wiki articles inside a /wiki folder, and a master index plus per-topic index files give the LLM a clear navigation path. That's the entire system.
It's not technically RAG in the traditional sense — there's no embedding step and no cosine similarity lookup. But functionally it solves the same problem: letting an LLM answer questions against a corpus that's way too big to fit in a single context window.
The trade-off is scale. If you're dealing with ten thousand documents, this falls over and you need a real RAG system like LightRAG or RAG-Anything. But for a solo dev, a content creator, or a small team managing a few hundred research docs, this is the right answer.
How does the Obsidian vault file structure work?
The whole thing hinges on a simple three-layer structure inside your Obsidian vault:
/rawfolder — the staging area. Anything you clip from the web, any PDF, any research note lands here first. This is the input zone./wikifolder — the compiled knowledge base. Claude Code reads raw files and turns them into clean wiki articles organized by topic. Each topic gets its own subfolder._master-index.md— a single file at the root of/wikithat lists every topic with a one-line description. This is the LLM's table of contents.
Each topic subfolder (say, wiki/ai-agents/) also contains its own _index.md that lists every article in that topic. So when you ask a question, Claude Code reads three files to find what it needs: master index, topic index, then the specific article. Three reads to locate any piece of information, no matter how big the vault gets.
That's the trick. The file structure is the index. The LLM does the retrieval.
How do you set up the Obsidian RAG system yourself?
Here's the exact setup process, start to finish:
- Download Obsidian from obsidian.md. It's free. Create a new vault — I literally call mine "the vault."
- Open Claude Code inside the vault directory and give it a prompt to create the
/raw,/wiki, and archive folders, plus a_master-index.mdstub. - Create a
CLAUDE.mdfile at the root of the vault. This file tells Claude Code the folder conventions, how to traverse the wiki, and how to compile raw material into wiki articles. Without this file, Claude Code will waste tokens exploring your vault on every request. - Install the Obsidian Web Clipper (obsidian.md/clipper) — a Chrome extension that turns any web page into a markdown file. In the extension options, change the default save location from
clippings/toraw/so everything lands in the staging area automatically. - Install the Local Images Plus community plugin inside Obsidian. The default Web Clipper doesn't download images — it just links to them. This plugin fixes that, pulling images into the vault so they show up inline.
Once that's wired up, you have two data funnels: the Web Clipper for manual clipping, and Claude Code itself, which can do its own web research and dump findings straight into /raw or directly into a wiki article.
How does Claude Code actually navigate the vault?
This is where the system earns its keep. When I ask a question like "what do we know about Claude Code skills," here's the actual path Claude Code takes:
- Reads
_master-index.md— finds that there's a "claude-code-skills" topic - Reads
wiki/claude-code-skills/_index.md— finds the relevant article - Reads the specific article
- Synthesizes the answer
Three reads, regardless of vault size. No tool-call explosion. No wandering around with ls and glob. The CLAUDE.md file encodes this exact traversal rule, so Claude Code doesn't have to figure it out from scratch each time.
And because every wiki article uses [[wiki links]] to reference related concepts, Claude Code can follow connections the same way you would in Obsidian. If an article on "AI agents" links to "MCP servers," Claude Code can pull the MCP article in without a new search. That's the graph-traversal piece — you get it essentially for free just by being consistent with wiki-link formatting.
What can you actually do with this setup?
A few real workflows I've been running:
- Clip articles into raw, compile later. I use the Web Clipper throughout the day. When I have a pile of raw files, I tell Claude Code to "compile" — it reads everything in
/raw, decides which topic each file belongs to, writes or updates the relevant wiki articles, and bumps the master index. - Direct research. I skip the raw step entirely for some topics. I tell Claude Code "research X and write it into the wiki" and it does the whole pipeline — web search, synthesis, article creation — without me manually clipping anything.
- Cross-topic questions. Because of the wiki-link graph, I can ask questions that span multiple topics. "How does my notes on Obsidian connect to my notes on Claude Code skills?" Claude Code traverses the links and finds the overlap.
The whole thing lives on my local disk. There's no database to back up. No vector store to pay for. The only cost is Claude Code token usage on the questions themselves, which is trivial compared to running a production RAG stack.
When should you use Obsidian RAG vs. real RAG?
The scale cutoff is roughly 500 to 2,000 documents. Below that, the Obsidian approach is lighter, cheaper, and easier to maintain. Above that, you start hitting real problems — Claude Code has to do too much file-scanning, context windows get hammered, and the retrieval quality degrades because there's too much for even a smart harness to hold in mind.
The honest answer from most people's perspective: just start with Obsidian. If it breaks under your scale, migrate to LightRAG or RAG-Anything. The migration cost is low because your source material is already well-organized markdown — exactly what those systems want as input anyway.
I see a lot of arguments in comment sections about whether "vibe RAG" counts as real RAG. Who cares. The question isn't philosophical. The question is: does this answer your questions fast and cheap? For most solo operators and small teams, it does. If it doesn't, move up the stack.
FAQ
Do you need a vector database to build a knowledge base with Claude Code?
No. For corpuses under a few thousand documents, a well-structured markdown vault with a master index and per-topic index files works just as well as a vector database. Claude Code navigates the file structure directly instead of running embedding lookups.
What's the difference between Obsidian RAG and LightRAG?
Obsidian RAG uses file structure and Claude Code navigation — no embeddings, no vector store. LightRAG is a full graph RAG system with a vector database, knowledge graph, and embedding pipeline. Obsidian RAG is lighter and cheaper for small corpuses; LightRAG scales to thousands of documents.
Can Claude Code automatically compile raw notes into wiki articles?
Yes. With a well-written CLAUDE.md file that describes the vault structure and compilation rules, you can tell Claude Code "compile" and it will read everything in /raw, categorize it by topic, write wiki articles with proper cross-links, and update the master index.
Does the Obsidian Web Clipper work for any website?
Most websites, yes. It struggles with image-heavy pages because it doesn't download images by default — it only links to them. Install the Local Images Plus community plugin inside Obsidian to fix that and pull images in as local files.
When should you migrate from Obsidian RAG to a real RAG system?
Around 500 to 2,000 documents (roughly 1 million tokens of text). Below that threshold, the file-based approach wins on simplicity and cost. Above it, you want embeddings and a real retrieval layer so queries stay fast and accurate.
If you want to go deeper into building personal knowledge systems with Claude Code, join the free Chase AI community for templates, prompts, and live breakdowns. And if you're serious about building with AI, check out the paid community, Chase AI+, for hands-on guidance on how to make money with AI.


