Back to article
IT Bangla Media itbangla.media
AI & Innovation

Karpathy’s LLM Wiki: compile knowledge once, instead of rediscovering it on every query

Andrej Karpathy’s April gist llm-wiki.md proposes compiling a persistent wiki once, instead of rediscovering knowledge on every RAG query. Mujahidul Islam Shawon has set out a Bangla explanation of the idea.

হালকা ক্রিম ব্যাকগ্রাউন্ডে বড় করে লেখা ‘Karpathy-র LLM Wiki’ ও বাংলায় ‘জ্ঞান একবার কম্পাইল হয়, প্রতি প্রশ্নে নয়’; নিচে raw, wiki ও output ফোল্ডারের ধাপ দেখানো হয়েছে।
আইটিবাংলা গ্রাফিক্স

AI researcher Andrej Karpathy published an idea last April for building a personal knowledge base, which he called an LLM Wiki. The core point is this: in a typical RAG setup, the model has to rediscover knowledge from raw documents on every query. Karpathy’s proposal is to build and keep current a persistent, interlinked markdown wiki, so the knowledge is compiled once and then accumulates. The idea appeared on GitHub as the gist llm-wiki.md on 4 April 2026 at 10:25 p.m. (Asia/Dhaka). Two days earlier, on 2 April, he described the same workflow in an X post titled “LLM Knowledge Bases”.

On Wednesday, 11 November 2026, at 11:48 a.m. (Asia/Dhaka), Mujahidul Islam Shawon posted a Bangla explanation of the idea on Facebook. He framed the wiki as a compiler rather than storage or a filing cabinet, and he set out a popular folder layout of raw/, wiki/, output/ and a CLAUDE.md file. This article separates Karpathy’s own writing from that popular packaging, and notes where the two diverge.

A dark infographic titled ‘The Second Brain is a COMPILER, not just Storage’, comparing a library with a compiler and explaining raw, wiki, output and CLAUDE.md.
Photo: from Mujahidul Islam Shawon’s Facebook post (collected)

In the gist, Karpathy writes that most people’s experience with LLMs and documents looks like RAG: files are uploaded, relevant chunks are retrieved at query time, and an answer is generated. That works, but the LLM rediscovers knowledge from scratch on every question; nothing accumulates. He says NotebookLM, ChatGPT file uploads and most RAG systems work this way.

His alternative is a persistent wiki. When a new source is added, the model does not merely index it. It reads the source, extracts what matters, updates related pages, and notes where new information contradicts older claims. In Karpathy’s own wording, the knowledge is compiled once and then kept current, not re-derived on every query. The line presented as a quotation in Shawon’s post — that RAG tries to create knowledge anew on every query, while a compiled wiki processes it once and keeps it updated — is a close paraphrase of that point. A similar formulation appears in an analysis by X user @rvaniaaaa, published at 12:53 a.m. on 21 August 2026 (Asia/Dhaka). The exact sentence is not in Karpathy’s gist.

The gist describes three layers. First, raw sources — articles, papers, images and data files — which remain immutable: the model reads them but does not change them. Second, the wiki — markdown pages written by the LLM, including summaries, entity and concept pages, comparisons and cross-links. Third, a schema file, such as CLAUDE.md for Claude Code or AGENTS.md for Codex, that sets out the wiki’s structure, conventions and workflows. Karpathy says he and the model co-evolve this file over time.

He outlines three operations: ingest, query and lint. When a new source arrives, the model reads it, writes a summary, and updates the index and related pages. A single source might touch 10 to 15 wiki pages, he writes. Asked a question, the model reads the relevant pages and answers, and a good answer can be filed back into the wiki as a new page. Periodic lint, or health-check, passes look for contradictions, stale claims, orphan pages and missing links. He also describes index.md and log.md as navigation aids. At moderate scale — around 100 sources and hundreds of pages — he says this index works well enough to avoid embedding-based RAG infrastructure. In the April X post, he gave the example of a research wiki of about 100 articles and about 400,000 words.

In practice, he treats Obsidian as the IDE, or frontend, and the LLM as the programmer. People rarely write the wiki themselves; the model does. The human’s job is to curate sources, give direction and ask good questions. The gist is deliberately abstract: it is an idea file, not a specific piece of software. The exact directory structure, he says, depends on the domain and on personal preference.

The “three folders and one file” layout popularised in Shawon’s post and in @rvaniaaaa’s analysis is a clear way of putting the idea to work. raw/ holds the input, wiki/ is where compilation happens, output/ is where writing or projects are built from the compiled wiki, and CLAUDE.md is treated as the system’s living instruction file. Karpathy’s April X post does mention a raw/ directory, and it talks about outputs — markdown, Marp slides or matplotlib images — being filed back into the wiki. The gist, however, does not prescribe a mandatory output/ folder, and it describes CLAUDE.md mainly as a schema for the wiki’s rules and workflows, not as a personal profile of “who you are and what your goals are”. That packaging belongs to the popular explanation, not to a fixed design in the original gist.

In apps such as Notion or Obsidian, people usually write, tag and later retrieve their own notes. That is storage and retrieval. Karpathy’s proposal can still use Obsidian, but the LLM writes and maintains the wiki. RAG builds an answer from raw chunks on every query; a compiled wiki already holds the links, summaries and contradiction flags. Knowledge can compound over time. It is not a substitute for every use of RAG. Karpathy himself says the index is enough at small to moderate scale; a larger wiki may need a separate search tool.

Shawon raises an important caution in his post: a bad fact in a library may sit in one corner, but a bad source in a compiler can affect many pages at once. @rvaniaaaa’s analysis makes a similar point. That specific example is not in Karpathy’s gist, though he is clear that the human’s main job is to curate sources and control quality. The claim in the infographic and the Facebook post that most personal wikis become unusable within three months because of maintenance fatigue does not appear as a figure in Karpathy’s gist. What he does say is that people abandon wikis because the maintenance burden grows faster than the value, and that an LLM can take on that burden.

Another limit is that this is not a finished product. The official gist page currently shows “5,000+” stars, and Shawon and several early discussions said it passed 5,000 stars within days of publication. GitHub’s gist counter often displays a cap of “5,000+”, so an exact current total cannot be confirmed from that page. Many people have since built their own versions, but Karpathy has not published a specific app.

For Bangladeshi developers and knowledge workers, the appeal is that a first version does not require a large vector database or a complex RAG pipeline. Markdown files, a folder structure, and an agent such as Claude Code or Codex are enough to try it at a small scale. It may be useful for research notes, course summaries, an internal team wiki or project documentation — anywhere knowledge accumulates and changes over time. The benefit only holds if the sources are sound and a person is steering the system. A poor or unverified source can spread errors across many pages. This is not autopilot; quality control is still the human’s real job.

Sources

Source: https://itbangla.media/en/tech/ai-innovation/58rdl0swgz/
© 2026 IT Bangla Media
Scan to verify and read the original