Related ToolsChatgptClaudeClaude CodeCoda

Andrej Karpathy Proposes a Better Alternative to RAG for Personal Knowledge Bases

AI news: Andrej Karpathy Proposes a Better Alternative to RAG for Personal Knowledge Bases

What happens when the person who taught half the world how neural networks work publishes his notes on a better way to manage knowledge with AI?

Andrej Karpathy - former Director of AI at Tesla, OpenAI co-founder, and author of the widely-used "Neural Networks: Zero to Hero" course - published a GitHub Gist this week laying out something he calls the "LLM Wiki" pattern. It's a practical rethinking of how AI should work with your personal knowledge, and if you've ever tried building a RAG system (more on that below), the core argument will ring immediately true.

What's Wrong With RAG

RAG stands for Retrieval Augmented Generation. It's the standard approach to letting an AI answer questions from your own documents: dump your files into a vector database, and when you ask a question, the system searches those files and feeds the relevant bits to the AI to synthesize an answer. It's the engine behind most "chat with your documents" tools.

The problem Karpathy identifies: every query starts from scratch. The AI searches raw source files, synthesizes on demand, and discards the work when the conversation ends. Your knowledge base never actually gets smarter. If you ask about the same topic next week, it does the whole lookup again.

The Wiki Pattern

His alternative: instead of using an LLM to answer questions from raw files, use an LLM to maintain a structured wiki of markdown files. When new information arrives - a research paper, an article, a meeting note - the AI ingests it, updates the relevant wiki pages, and maintains cross-references between topics. The wiki itself becomes the queryable layer.

The architecture has three parts:

  • Raw Sources - your original documents, treated as immutable
  • The Wiki - AI-generated and AI-maintained markdown files: summaries, entity pages, concept pages, interlinked
  • The Schema - a config document defining how the wiki is structured and what the AI should track

Three operations keep it running: Ingest (process new sources, update pages), Query (search the wiki, synthesize answers, optionally add useful insights back as new pages), and Lint (periodic cleanup - catch contradictions, stale content, orphaned pages).

The practical difference is significant. With RAG, you're repeatedly searching 500 disorganized raw documents. With LLM Wiki, you're querying a structured, maintained knowledge base where related ideas are already connected and summarized. The AI's earlier work compounds instead of evaporating.

Who This Is For

Karpathy lists half a dozen use cases: personal learning logs, research deep-dives, book companion wikis, competitive analysis, trip planning. The through-line is any situation where you're accumulating information over time and want to query it intelligently later.

The architecture also addresses the real reason most personal wikis fail - maintenance. It's tedious to keep a wiki current when you're the one doing it. Offloading the upkeep to an LLM while you focus on what to track and how to structure it is a more realistic division of labor.

This isn't a product you can install today. It's a conceptual pattern - a blueprint. Implementing it requires either building your own tooling or adapting an existing AI coding assistant to manage the file operations. But as a framework for thinking about AI-assisted knowledge management, it's more useful than most of what's been published on the topic. RAG gets most of the press, but for personal, long-running knowledge bases, the wiki approach is worth seriously considering.