
In the world of AI, we’ve been obsessed with RAG (Retrieval-Augmented Generation). You feed an AI a bunch of PDFs, ask a question, and it "retrieves" snippets to give you an answer.
But Andrej Karpathy recently pointed out a major flaw: RAG is stateless. It doesn’t "learn" your business. Every time you ask a question, it starts from scratch. Karpathy’s solution? The LLM Wiki—a system where the AI doesn't just read your files; it compiles them into a permanent, interlinked knowledge base.
Karpathy views this through a developer's lens:
"Obsidian is the IDE, the LLM is the programmer, and the Wiki is the codebase."
Instead of a messy folder of 500 documents, you have a clean, structured Wiki. When a new document arrives, the AI "refactors" your knowledge—updating old pages, creating new links, and building a map of your business logic.
To build this, you need three distinct layers:
| Layer | Component | Responsibility |
|---|---|---|
| 1. Raw Sources | /raw folder | Immutable. Meeting transcripts, emails, and PDFs. The AI reads these but never edits them. |
| 2. The Wiki | /wiki folder | LLM-Owned. Markdown files generated by the AI. Includes concept pages and project timelines. |
| 3. The Schema | RULES.md | The Brain. Instructions telling the AI how to format notes and when to update existing pages. |
Imagine you are managing a complex product launch. Usually, info is scattered across Slack, Jira, and endless PDFs.
You drop a "Quarterly Sync Transcript" into the /raw folder. Instead of just indexing it, the AI Agent:
Project_Timeline.md with new deadlines.Legal_Compliance.md page.Once a week, you ask the AI to "lint" the wiki. It scans for contradictions.
While the "Wiki-only" approach is perfect for individual projects or small teams, massive corporations face a "Context Window" limit. You cannot feed 10,000 wiki pages into a single prompt.
The Hybrid Solution: For massive datasets, you implement a Tiered Knowledge Strategy:
When you ask a complex question, the AI uses the Wiki to understand the "Map" of the project and then uses RAG to pull specific "Details" from the deep archives. This prevents "Context Fatigue" while maintaining the compounding intelligence of the Wiki.
01_raw, 02_wiki, and 03_rules.You need an AI tool that can edit local files.
Paste this into your Agent’s instructions:
"You are a Corporate Librarian. Your job is to maintain the
/wikifolder based on files in/raw. Use[[WikiLinks]]for all entities. When a new file is added, update relevant pages. Maintain anindex.mdas the entry point."