How to Build an LLM-Powered Personal Knowledge Base
Inspired by Andrej Karpathy: Turning raw information into a persistent, compounding wiki

In early April 2026, Andrej Karpathy shared a deceptively simple workflow that lit up the AI community. In a tweet that racked up millions of views, he described using large language models (LLMs) not just to answer questions, but to actively build and maintain a personal knowledge base—a living wiki of interconnected Markdown files stored as plain text, complete with summaries, backlinks, concept articles, and visualizations. He called it a “persistent, compounding artifact.”
Two sharp analyses quickly followed and turned the idea into a practical blueprint:
@elliotchen100’s thread dissected the architecture, operations, and bigger implications (including why it feels like giving AI long-term memory).
@yanhua1010’s post showed exactly how to implement it in Obsidian using Claude, complete with directory structure, ingestion pipelines, and weekly “health checks.”
This article synthesizes their insights with Karpathy’s original method into a complete, beginner-friendly yet deep guide. Whether you’re a developer, researcher, writer, or knowledge worker, you’ll learn the why, the architecture, and the step-by-step practice so you can stop letting your notes rot and start building knowledge that actually compounds.
The Core Problem: Why Traditional Note-Taking (and RAG) Falls Short
Most of us use one of two approaches today:
Fragmented notes (Notion, Obsidian, Evernote): We clip articles, jot ideas, add tags. Three months later the vault is a mess of dead files.
Retrieval-Augmented Generation (RAG): Upload documents to ChatGPT, Claude, or NotebookLM. The LLM retrieves chunks on demand but forgets everything the moment the chat ends.
Both suffer from the same flaw: no accumulation. Every query starts from scratch. Insights evaporate. Contradictions hide. The knowledge never gets “compiled” into something reusable.
Karpathy’s insight: treat your knowledge base like software. Let the LLM act as a compiler that reads raw sources, extracts concepts, updates existing pages, resolves conflicts, and links everything together. The result is a wiki that grows smarter over time.
The Three-Layer Architecture: Separation of Concerns
The system is elegantly simple and mirrors clean software engineering. Here’s a visual overview:
Layer 1: Raw Sources (raw/ directory) PDFs, articles, papers, datasets, images, podcast transcripts—anything you ingest. Never modify these files. They are your source of truth.
Layer 2: The Wiki (wiki/ directory) A collection of Markdown files the LLM fully owns. It contains:
Summaries of every raw document
Concept/entity pages (e.g., “RAG Limitations.md”)
Comparison tables, overviews, and cross-references
Backlinks that surface automatically
Layer 3: Schema / Rules (CLLAUDE.md or similar) A single instruction file that defines structure, naming conventions, template formats, and maintenance rules. This turns a generic LLM into a disciplined wiki maintainer.
This separation keeps everything traceable, versionable (via Git if you want), and scalable.
The Four Core Operations: Your Daily Workflow
Karpathy defines four repeatable modes. Think of them as CI/CD pipelines for knowledge.
| Operation | Purpose | Frequency | Output |
|---|---|---|---|
| Ingest | Read new raw material, extract key points, integrate into wiki | When adding sources | New/updated wiki pages, summaries, backlinks |
| Query | Ask complex questions; answer gets saved back to wiki | Daily exploration | Markdown Q&A files in outputs/qa/ |
| Lint (Health Check) | Scan for contradictions, orphans, outdated info, missing links | Weekly | Report in outputs/health/ |
| Index & Log | Maintain index.md and log.md |
Automatic | Quick navigation + audit trail |
Key mindset shift: Every insightful query or analysis should be saved back into the wiki. Your conversations stop being ephemeral and become permanent knowledge.
Practical Implementation: From Zero to Running System in Two Weeks
Here’s a battle-tested setup drawn directly from real-world applications.
1. Folder Structure (copy-paste ready)
MyKnowledgeBase/
├── raw/ # Never edit these
│ ├── articles/
│ ├── papers/
│ ├── podcasts/
│ └── images/
├── wiki/ # LLM writes here
│ ├── summaries/
│ ├── concepts/
│ ├── comparisons/
│ └── index.md
├── outputs/
│ ├── qa/ # Saved conversations & analyses
│ └── health/ # Weekly lint reports
├── CLLAUDE.md # Your schema/rules file
└── log.md # Everything that happened
2. Tools You Actually Need (minimal & free)
Obsidian → Your IDE frontend (free, local, beautiful graph view).
Obsidian Web Clipper → One-click save of web articles with metadata.
Any LLM with long context (Claude 3.5/4, Grok, local models like Gemma via LM Studio, etc.).
Optional: Podwise for podcasts, hotkey script to batch-download images.o practitioner threads, compiled into a structured, reusable guide. Feel free to clip it, ingest it, and improve upon it in your own vault.
3. Ingestion Pipeline (5–10 minutes per batch)
Save new material to raw/.
Open Obsidian + your LLM chat (Claude Desktop/Code works great).
Prompt: “Read the newest files in raw/. For each, generate a structured summary page, extract concepts, update relevant wiki pages, and refresh index.md. Follow CLLAUDE.md rules.”
The LLM does the heavy lifting: it writes summaries, creates new concept pages, adds backlinks, and even flags contradictions with existing knowledge.
4. Making Every Conversation Count
After any deep query, add to your prompt:
“Answer thoroughly and save the full reasoning + sources as a new Markdown file in outputs/qa/ named [descriptive-title].md”
Three months later you’ll have dozens of high-quality, reusable analyses.
5. Weekly Lint = Knowledge Hygiene
Prompt once a week:
“Run a health check on the entire wiki/. Report contradictions, orphaned pages, missing definitions, and broken backlinks. Save report to outputs/health/.”
This prevents “technical debt” in your brain extension.
Depth Tips for Long-Term Success
Start small: Aim for 50–100 sources first. At this scale, a simple index.md + LLM reading it is often better than fancy vector RAG.
Human-in-the-loop: Karpathy reviews LLM outputs. The review process itself is learning.
Scale gracefully: When your wiki exceeds ~400k tokens, consider lightweight embeddings or DuckDB for search—but only then.
Privacy & local-first: Everything stays on your machine. Perfect for sensitive research.
Idea File concept (from Karpathy’s follow-up): You don’t need to ship code anymore. Share a clear Gist or Markdown spec and let others’ agents implement it. This post itself is an “idea file.”
Why This Changes Everything (and Where It’s Heading)
This isn’t just better note-taking. It’s giving your AI long-term memory and turning passive consumption into active synthesis. Your knowledge compounds: every new paper strengthens existing concepts, every question becomes new evergreen content.
Practitioners report:
Faster literature reviews
Instant recall of nuanced comparisons
Higher-quality output (writing, coding, strategy)
Reduced anxiety about “forgetting” what they’ve learned
The bigger picture? This workflow is the prototype for the next generation of AI products—personal knowledge companions that grow with you rather than reset every chat. We’re moving from “stateless generation” to “stateful accumulation.” The first company that productizes this elegantly will change how we think.
Your Two-Week Action Plan
Week 1: Set up the folder structure, install Web Clipper, ingest 10 pieces of content, run your first full compile.
Week 2: Start saving every complex query to outputs/qa/, run your first lint, tweak your CLLAUDE.md schema.
You don’t need to be a programmer. You just need to treat your knowledge like code.
Your future self will thank you when you open Obsidian, type a question, and get an answer that’s not just retrieved—but compiled, cross-referenced, and battle-tested by months of careful LLM curation.
Start today. Drop one article into raw/, fire up Claude, and watch your personal wiki come alive.
The era of rotting notes is over.
Welcome to the age of compiled knowledge.
This article is itself an example of the workflow: raw ideas from Karpathy + two practitioner threads, compiled into a structured, reusable guide. Feel free to clip it, ingest it, and improve upon it in your own vault.

