Build a Self-Evolving Knowledge Base with Claude Code + Obsidian
An improved three-step compilation method based on Karpathy's LLM Wiki methodology that turns Obsidian notes from an information dump into a continuously evolving knowledge asset, with the complete directory structure and prompts included.


Build a Self-Evolving Knowledge Base with Claude Code + Obsidian
An improved three-step compilation method based on Karpathy's LLM Wiki methodology that turns Obsidian notes from an information dump into a continuously evolving knowledge asset, with the complete directory structure and prompts included.
Your notes library is stuffed with hundreds of articles, yet when you ask AI the same question twice, you get different answers. Concept definitions contradict each other, and large numbers of articles have never been referenced by anyone. The knowledge base has become an information dump. This article introduces a three-step compilation method, an improvement on Karpathy's LLM Wiki methodology, that helps you turn your knowledge base into a continuously evolving asset with Claude Code + Obsidian.
From 2.0 to 3.0: What Exactly Got Upgraded
Karpathy (co-founder of OpenAI) published his knowledge management scheme, LLM Wiki, in April 2026. The core idea in one sentence: don't dig through raw documents at question time -- have the LLM compile all of your material into a persistent Wiki ahead of time.
A typical 2.0 system 'searches only at question time': 200 documents just sit there, and when you write an article you have the AI search, read, and stitch things together on the spot. Every run starts from zero, and asking the same question in a different chat window can yield a different answer.
3.0 flips this around: raw documents first go through LLM 'compilation', becoming structured concept entries, methodology pages, and a cross-reference network. Once compiled, knowledge is a persistent asset -- contradictions are flagged, cross-references are built, and new material is merged in incrementally.

2.0 Runtime RAG vs 3.0 Compile-time Wiki architecture comparison
Before You Start
- Obsidian: serves as the management interface for the knowledge base
- Claude Code: serves as the compilation engine
- Obsidian Web Clipper: for quickly clipping web articles (optional)
- A knowledge domain you want to manage systematically
Estimated setup time: 1-2 hours.
Step 1: Set Up the Directory Structure
At its core there are just two folders: raw/ holds raw source material, read-only and never modified, while wiki/ holds the LLM's compiled output. You feed articles into raw/, and the LLM takes care of compiling them into wiki/.
Copy the following structure directly:
YourObsidianVault/
├── 02_Research/
│ ├── raw/ # Raw source material (read-only)
│ │ ├── articles/ # Articles clipped with Web Clipper
│ │ ├── reports/ # Industry reports
│ │ └── competitors/ # Competitor analysis
│ └── wiki/ # Compiled output (maintained by the LLM)
│ ├── summaries/ # Per-article compiled summaries
│ ├── concepts/ # Concept entries (core)
│ ├── methods/ # Methodology pages
│ └── indexes/
│ ├── index.md # Global index
│ └── log.md # Operation log
└── CLAUDE.md # Compilation rules go hereAdd the compilation rules to CLAUDE.md:
### Knowledge Compilation Rules
When the user says 'compile {file path}', execute the following steps:
1. Read the specified file under raw/
2. Run the three-step compilation method (condense → question → benchmark)
3. Write the compiled summary in wiki/summaries/
4. Create or update the relevant concept entries in wiki/concepts/
- If the concept already exists, merge in the new information and note differences between sources
- If two articles contradict each other, explicitly flag the conflict in the entry
5. Update wiki/indexes/index.md (append sources + related concepts)
6. Update wiki/indexes/log.md (append an operation record)
Concept entry template:
---
concept: {concept name}
sources: [{source article 1}, {source article 2}]
last_updated: {date}
---
# {concept name}
## Definition
## Key data points (with sources)
## Assumptions and limitations
## Conflict flags (if any)
## Related conceptsStep 2: Master the Three-Step Compilation Method
Karpathy's compilation flow is: read the original, write a summary, extract concepts, update indexes. But there is a blind spot: a summary only compresses information; it does not generate new knowledge. Two articles with opposing views can produce summaries that reach the same conclusion after being compiled separately.
On top of that, I added two more steps:
Step 1: Condense
Cut down to only the core conclusions (no more than 3) plus key evidence. Apply the razor rule: would deleting this piece of information hurt comprehension? If not, delete it.
Step 2: Question
This is the key difference from Karpathy's scheme. For each core conclusion, answer four questions:
- What underlying assumptions does this conclusion depend on?
- If those assumptions do not hold (different industry/market/scale), does the conclusion still hold?
- Are the author's data sources reliable? Sample size, time range, geographic limits?
- Are there counterexamples or boundary conditions the author did not mention?
Step 3: Benchmark
Look for similar phenomena across domains. Do similar phenomena exist in other fields? Which scenarios can this knowledge transfer to? If there are cross-domain connections, create or update the corresponding concept entries.
The full compilation prompt:
Run the three-step compilation method on the following article:
### Step 1: Condense
- Apply the razor rule: would deleting this piece of information hurt comprehension? If not, delete it
- Output: core conclusions (no more than 3) + the key evidence supporting each one
- Format: one conclusion per line, with its evidence indented below
### Step 2: Question
For each core conclusion, answer:
1. What underlying assumptions does this conclusion depend on?
2. If those assumptions do not hold, does the conclusion still hold?
3. Are the author's data sources reliable? Sample size, time range, geographic limits?
4. Are there counterexamples or boundary conditions the author did not mention?
### Step 3: Benchmark
1. Do similar phenomena exist in other fields?
2. Which scenarios can this knowledge transfer to?
3. If there are cross-domain connections, create or update the corresponding concept entries
Finally, output the compilation result following the concept entry template.Step 3: Run the Compilation
Clip an article into raw/articles/ with Obsidian Web Clipper, then tell Claude Code:
Compile 02_Research/raw/articles/2026-04-tiktok-shop-product-selection-strategy.mdClaude Code will perform 6 actions:
- Read the original article
- Run the three-step compilation method
- Write the compiled summary in
wiki/summaries/ - Create or update the relevant concept entries under
wiki/concepts/ - Update
wiki/indexes/index.md - Append an operation record to
wiki/indexes/log.md
One raw article touches the creation or update of 7 Wiki files.

The output after compiling one article: 1 raw article becomes 7 Wiki files
The key point: the next time you compile a related article, the AI does not start from zero. It reads the existing concept entries, merges the new information with the old, and notes the similarities and differences. If there is a contradiction, it flags it right in the entry.
Run a Weekly Knowledge Base Health Check
Use the following prompt to check the state of your knowledge base on a regular basis:
Run a health check on the wiki/ directory and generate a report:
### 1. Consistency check
Scan all entries under concepts/ and check:
- Whether the same concept is defined consistently across different entries
- If not, list where the conflicts are and suggest a direction for unifying them
### 2. Completeness check
Check whether every concept entry contains all required fields:
- Definition, key data points, assumptions and limitations, related concepts
- Mark missing fields as to be filled in
### 3. Orphan detection
Find pages with fewer than 2 inbound and 2 outbound links
- These pages either need to be linked with other concepts
- Or they are not important enough and could be merged
### 4. Cross-vault consistency (multi-account scenario)
Scan each account's _style-guide.md and CLAUDE.md
Check whether any style rules are missing or conflicting
Output format: a table + a suggested fix for each issueWhy 3.0 Keeps Running
The most tedious part of maintaining a knowledge base -- updating cross-references, keeping definitions consistent, flagging contradictions -- is work whose cost grows faster than the value it delivers. An LLM drives that cost down to nearly zero. It can modify 15 files in a single operation, without forgetting and without getting tired.
This is not about how advanced the methodology is; it is that the maintenance cost has finally dropped to a level you can ignore.

An LLM can modify multiple files in a single operation, automating cross-references and conflict flags
Toolin Editorial Team
Categories
Related articles

Building a Cross-Border E-commerce AI Team with the Hermes Multi-Agent Framework
Hermes' three-layer memory architecture fixes agents that forget; a four-phase prompt set builds a five-member Lead + VOC + GEO + Reddit + TikTok AI team that collaborates automatically in a Feishu group.

Building a Complete Game from Scratch with Codex in One Afternoon
Kick off game development with OpenAI Codex in a single sentence — assets, background removal, and music generated automatically; a publishable, complete game in one afternoon