Karpathy's LLM Wiki: Structured Markdown as RAG Replacement
TECH

Karpathy's LLM Wiki: Structured Markdown as RAG Replacement

33+
Signals

Strategic Overview

  • 01.
    On April 3-4, 2026, Andrej Karpathy released LLM Wiki, a pattern for building persistent, self-updating knowledge bases using structured Markdown and Obsidian, designed to replace traditional RAG pipelines. The GitHub Gist received over 5,000 stars and 1,639 forks within days.
  • 02.
    The system uses a three-layer architecture — Raw Sources (immutable documents), The Wiki (LLM-generated markdown with cross-references), and The Schema (a configuration document defining structure) — with Obsidian as the browsing IDE and an LLM agent as the maintainer.
  • 03.
    Rather than re-deriving answers from raw documents at query time like RAG, LLM Wiki compiles knowledge once into structured markdown and keeps it updated, using an index.md file as the entry point instead of vector-database retrieval.
  • 04.
    Karpathy also introduced the 'idea file' concept — sharing the idea rather than the code, so that another person's agent can customize and build it for their specific needs — signaling a shift in how open-source projects may be distributed.

Why 'Compile Once, Update Incrementally' Threatens the RAG Industry

The most consequential claim embedded in Karpathy's LLM Wiki is deceptively simple: at personal and team scale, structured markdown files with an index are superior to vector databases and embedding pipelines. Traditional RAG treats every query as a cold start — retrieving document chunks, re-ranking them, and synthesizing an answer from scratch each time. LLM Wiki inverts this by having the LLM do the heavy synthesis work upfront during ingestion, producing cross-referenced markdown pages that accumulate knowledge over time. The index.md file replaces the vector index; the file system replaces the database.

This matters because the RAG ecosystem — vector databases like Pinecone, Weaviate, and Chroma, plus the surrounding tooling — has attracted billions in venture capital on the premise that retrieval-augmented generation is the canonical way to give LLMs access to private knowledge. Karpathy's argument is that for moderate-scale knowledge bases (his example: ~100 articles, ~400,000 words), expanding LLM context windows have made the embedding-retrieval-synthesis pipeline unnecessary overhead. The debate, as one analyst put it, centers on whether the industry has 'over-indexed on vector databases for problems that are fundamentally about structure, not similarity.' This is not a claim that RAG is useless at enterprise scale, but it is a sharp challenge to the assumption that RAG is the default starting point.

The 'Idea File' — A New Distribution Model for the Agent Era

Perhaps the most underappreciated aspect of the release is not the wiki itself but how Karpathy chose to distribute it. Rather than publishing a traditional GitHub repository with installable code, he published a GitHub Gist — an 'idea file' describing the architecture, conventions, and workflow. His reasoning: in the era of LLM agents, sharing code is less valuable than sharing the idea, because 'the other person's agent customizes and builds it for your specific needs.'

This is a subtle but potentially significant shift in open-source culture. Traditional open-source assumes a shared codebase that contributors converge on. The idea file model assumes divergence by design — every user's agent produces a different implementation tailored to their tools, preferences, and data. The rapid proliferation of community implementations (obsidian-wiki, wiki-skills, LLM-wiki) within days is evidence that this distribution model works. It also raises questions about maintainability and interoperability: if every implementation is bespoke, how do improvements propagate? The idea file may represent a new primitive in how technical knowledge is shared — one level of abstraction above code.

The Knowledge Drift Problem: LLM Wiki's Achilles' Heel

While enthusiasm for LLM Wiki has been overwhelmingly positive, there is a structural risk that several analysts have flagged: error accumulation and knowledge drift. Unlike RAG, which re-derives answers from source documents on every query (providing a natural error-correction mechanism), LLM Wiki builds new knowledge on top of previously compiled knowledge. Once incorrect information is merged into the wiki, future ingestion and updates build on that error, potentially compounding it across dozens of interconnected pages.

Karpathy's architecture includes a 'Lint' operation — a health-check for contradictions, orphan pages, and missing cross-references — but this is a mitigation, not a solution. The lint operation itself relies on the LLM's judgment, which is the same judgment that introduced the error. At small scale with an attentive human operator, this is manageable. At larger scale, or in domains where subtle factual errors have consequences (medical research, legal analysis, financial compliance), the compounding nature of the wiki could become a liability. This tension — between the elegance of compiled knowledge and the safety of re-derived knowledge — is likely to define the next phase of the debate around LLM Wiki versus RAG.

Data Sovereignty and the 'File Over App' Philosophy

Karpathy's follow-up posts emphasized four principles: Explicit (human-readable markdown), Yours (local files you own), File over app (data outlives any tool), and BYOAI (bring your own AI model). This philosophy directly challenges the SaaS model that dominates knowledge management — tools like Notion, Confluence, and Roam that store data in proprietary formats on remote servers. With LLM Wiki, the knowledge base is plain markdown on your local filesystem, readable by any text editor, searchable by any tool, and portable across any LLM provider.

This resonates with a growing movement in the developer community toward local-first software and data sovereignty. The choice of Obsidian as the IDE is deliberate: Obsidian stores everything as local markdown files with no vendor lock-in. Combined with the BYOAI principle — the wiki works with Claude, GPT, Gemini, or any future model — the architecture is designed to be maximally resilient to platform risk. For organizations concerned about sending proprietary knowledge to third-party vector database providers, the local-file approach offers a compelling alternative. The tradeoff is that collaboration, versioning, and access control must be handled separately, typically through git.

From Code Generation to Knowledge Orchestration: The Shifting AI Frontier

LLM Wiki's rapid traction reflects a broader inflection point in how practitioners think about LLM utility. The first wave of LLM tooling focused on code generation — Copilot, Cursor, Claude Code. The second wave focused on retrieval — RAG pipelines, vector databases, embedding models. Karpathy's framing suggests a third wave: knowledge orchestration, where the LLM's role shifts from answering questions to maintaining a living knowledge artifact.

In this framing, the LLM is not a search engine or a code generator but a knowledge worker — reading sources, synthesizing summaries, maintaining cross-references, resolving contradictions, and updating pages as new information arrives. Each ingested document triggers updates to 10-15 wiki pages, meaning the LLM is doing substantial editorial work, not just retrieval. This is closer to how a human research assistant operates: reading broadly, maintaining structured notes, and keeping a knowledge base current. The question is whether LLMs are reliable enough for this role at scale, or whether the pattern works best as a personal productivity tool for technically sophisticated users like Karpathy himself.

Historical Context

1945-01-01
The LLM Wiki concept has been compared to Bush's 1945 Memex concept — a hypothetical device for storing and cross-referencing all personal knowledge, making LLM Wiki a modern realization of an 80-year-old vision.
2026-04-03
Posted the original viral tweet on X describing 'LLM Knowledge Bases' as his primary research workflow, garnering 50,000 likes and 7,600 retweets.
2026-04-04
Published the GitHub Gist detailing the full LLM Wiki pattern and the 'idea file' concept, which rapidly gained 5,000+ stars and 1,639 forks.
2026-04-04
Multiple open-source implementations began appearing within days, including obsidian-wiki, wiki-skills for Claude Code, and LLM-wiki, demonstrating rapid ecosystem formation around the pattern.

Power Map

Key Players
Subject

Karpathy's LLM Wiki: Structured Markdown as RAG Replacement

AN

Andrej Karpathy

Creator of the LLM Wiki pattern; co-founder of OpenAI, former Tesla AI director, and founder of Eureka Labs AI education company.

OB

Obsidian

Markdown knowledge management tool serving as the primary IDE for LLM Wiki, with its Web Clipper used for ingesting web content into the system.

AN

Anthropic (Claude Code)

Claude Code is one of the primary LLM agents used to power the wiki workflow, reading files directly from the local filesystem and maintaining the knowledge base.

CO

Community developers

Multiple open-source implementations emerged within days, including obsidian-wiki framework (Ar9av), wiki-skills for Claude Code (kfchou), and LLM-wiki (Ss1024sS).

THE SIGNAL.

Analysts

"Highlighted the core insight of having an LLM incrementally compile and maintain a structured knowledge base from raw sources, with every interaction feeding back into the system."

Elvis Saravia
DAIR.AI

"Argued that conventional RAG is fundamentally transient and that Karpathy's wiki pattern provides persistent knowledge accumulation that RAG cannot achieve. Noted that every RAG query rediscovers knowledge from scratch."

Ken Huang
AI practitioner and Substack author

"Framed LLM Wiki as less a replacement for search and more a pattern for automating repeated knowledge maintenance, while flagging the risk of error accumulation when incorrect information gets merged into the wiki."

Dreamwalker (Park Jechang)
AI analyst and Medium author

"Endorsed the pattern from practical experience, stating 'You don't need RAG. You need an INDEX.md, structured directories, and an LLM that reads the right files at the right time.' Has been running 120+ knowledge files for months."

Pawel Huryn
Product management thought leader
The Crowd

"LLM Knowledge Bases - Something I'm finding very useful recently: using LLMs to build personal knowledge bases for various topics of research interest."

@@karpathy50000

"Farzapedia, personal wikipedia of Farza, good example following my Wiki LLM tweet. I really like this approach to personalization."

@@karpathy8400

"29,000 bookmarks because Karpathy said what CLAUDE.md users already know: You don't need RAG. You need an INDEX.md, structured directories, and an LLM that reads the right files at the right time."

@@PawelHuryn819
Broadcast