Karpathy shares 'LLM Knowledge Base' architecture that bypasses RAG with an evolving markdown library maintained by AI
AI vibe coders have yet another reason to thank Andrej Karpathy , the coiner of the term. The former Director of AI at Tesla and co-founder of OpenAI, now running his own independent AI project, recently posted on X describing a "LLM Knowledge Bases" approach he's using to manage various topics of research interest. By building a persistent, LLM-maintained record of his projects, Karpathy is solving the core frustration of "stateless" AI development: the dreaded context-limit reset. As anyone who has vibe coded can attest, hitting a usage limit or ending a session often feels like a lobotomy for your project. You’re forced to spend valuable tokens (and time) reconstructing context for the AI, hoping it "remembers" the architectural nuances you just established. Karpathy proposes something simpler and more loosely, messily elegant than the typical enterprise solution of a vector database and RAG pipeline. Instead, he outlines a system where the LLM itself acts as a full-time "research librarian"—actively compiling, linting, and interlinking Markdown (.md) files, the most LLM-friendly and compact data format. By diverting a significant portion of his "token throughput" into the manipulation of structured knowledge rather than boilerplate code, Karpathy has surfaced a blueprint for the next phase of the "Second Brain"—one that is self-healing, auditable, and entirely human-readable. Beyond RAG For the past three years, the dominant paradigm for giving LLMs access to proprietary data has been Retrieval-Augmented Generation (RAG) . In a standard RAG setup, documents are chopped into arbitrary "chunks," converted into mathematical vectors

Andrej Karpathy, the coiner of the term "AI vibe coding," has once again provided a reason for enthusiasts to be grateful. The former Director of AI at Tesla and co-founder of OpenAI, now running his own independent AI project, recently shared on X a description of his "LLM Knowledge Bases" approach to managing various research interests. By constructing a persistent, LLM-maintained record of his projects, Karpathy is addressing the core frustration of "stateless" AI development: the dreaded context-limit reset.
For anyone who has engaged in AI vibe coding, the experience of hitting a usage limit or ending a session can feel like a lobotomy for their project. They are forced to spend valuable tokens (and time) reconstructing context for the AI, hoping it "remembers" the architectural nuances they just established. Karpathy proposes a simpler and more elegant solution than the typical enterprise approach of using a vector database and RAG pipeline. Instead, he outlines a system where the LLM itself acts as a full-time "research librarian"—actively compiling, linting, and interlinking Markdown (.md) files, the most LLM-friendly and compact data format.
By diverting a significant portion of his "token throughput" into the manipulation of structured knowledge rather than boilerplate code, Karpathy has surfaced a blueprint for the next phase of the "Second Brain"—one that is self-healing, auditable, and entirely human-readable.
For the past three years, the dominant paradigm for giving LLMs access to proprietary data has been Retrieval-Augmented Generation (RAG). In a standard RAG setup, documents are chopped into arbitrary "chunks," converted into mathematical vectors (embeddings), and stored in a specialized database. When a user asks a question, the system performs a "similarity search" to find the most relevant chunks and feeds them into the LLM.
Karpathy's approach, which he calls LLM Knowledge Bases, rejects the traditional RAG architecture. Instead of relying on a vector database and complex retrieval pipelines, Karpathy's system leverages the LLM's own capabilities to maintain and evolve a knowledge base. This is achieved through a Markdown library that the AI itself actively manages.
The LLM Knowledge Base architecture allows Karpathy to bypass the need for RAG by embedding the knowledge directly into the LLM's memory. This means that the AI can access and utilize the information more efficiently, without the need for external retrieval. The Markdown format is particularly well-suited for this purpose, as it is both human-readable and compact, making it easy for the LLM to process and understand.
One of the key advantages of this approach is the self-healing nature of the knowledge base. As the LLM interacts with the Markdown files, it can identify inconsistencies, update outdated information, and even correct errors. This results in a more accurate and reliable knowledge base that evolves over time.
Another benefit is the audibility of the system. Since the knowledge base is maintained in Markdown, it can be easily reviewed and verified by humans. This provides a level of transparency and accountability that is often lacking in more opaque RAG systems.
Furthermore, the human-readable aspect of the Markdown files means that the knowledge base can be shared and collaborated on by other researchers and developers. This promotes knowledge sharing and accelerates the pace of innovation in the field.
Karpathy's LLM Knowledge Base architecture represents a significant departure from the traditional RAG paradigm. By leveraging the LLM's own capabilities to maintain and evolve a knowledge base, it offers a more efficient, self-healing, and transparent solution to the challenges of stateless AI development.
As the field of AI continues to evolve, the move away from RAG towards more integrated knowledge management systems is likely to become increasingly prevalent. Karpathy's approach provides a compelling alternative that demonstrates the potential of LLMs to act as powerful research librarians, curating and evolving their own knowledge bases in real-time.
In conclusion, Andrej Karpathy's LLM Knowledge Base architecture represents a groundbreaking solution to the limitations of traditional RAG systems. By bypassing the need for external retrieval pipelines and instead leveraging the LLM's own capabilities to maintain a persistent, evolving Markdown library, Karpathy has created a more efficient, self-healing, and human-readable knowledge management system. This innovative approach not only addresses the challenges of stateless AI development but also paves the way for a new era of collaborative and transparent AI research.










