LLM Wiki knowledge nexus — interconnected markdown pages linked by neon cyan and violet threads

LLM Wiki: The Karpathy Pattern for a Second Brain

11 Min Read
Disclosure: This website may contain affiliate links, which means I may earn a commission if you click on the link and make a purchase. I only recommend products or services that I personally use and believe will add value to my readers. Your support is appreciated!

On April 4, 2026, Andrej Karpathy published a gist titled “LLM Wiki” that described a deceptively simple idea: instead of using LLMs to retrieve from raw documents at query time, use them to build and maintain a persistent, structured wiki that compounds over time.[1] The gist accumulated over 5,000 stars and 5,000 forks within months. Dozens of implementations followed — CLI compilers, Obsidian plugins, MCP servers, hosted platforms.[3] By mid-2026, the pattern had its own curated ecosystem. But the core idea remains what Karpathy wrote in the first paragraph: the wiki is a persistent, compounding artifact. The cross-references are already there. The contradictions have already been flagged. The synthesis already reflects everything you have read.

- Advertisement -

This is the eighth article in the S10 series on Market Sensing and Research. S10.1 established prediction markets as sensors. S10.2 built the research pipeline from arxiv to synthesis. S10.3 added RSS monitoring as the early warning layer. The previous articles addressed how information enters the system. This article addresses what happens after: how information becomes knowledge that persists, compounds, and becomes actionable across sessions, across agents, and across time.

The compounding problem with RAG

Most people’s experience with LLMs and documents looks like RAG: upload a collection of files, the LLM retrieves relevant chunks at query time, and generates an answer.[1] This works, but the LLM is rediscovering knowledge from scratch on every question. There is no accumulation. Ask a subtle question that requires synthesizing five documents, and the LLM has to find and piece together the relevant fragments every time. Nothing is built up.

- Advertisement -

Karpathy frames this as the fundamental limitation of retrieval-augmented generation: it is a lookup mechanism, not a knowledge-building mechanism. NotebookLM, ChatGPT file uploads, and most RAG systems work this way.[1] The knowledge is always raw, always fragmented, always requiring re-assembly. The wiki pattern inverts this: instead of retrieving from raw documents, the LLM incrementally builds and maintains a structured collection of markdown files that sits between you and the raw sources. When you add a new source, the LLM does not just index it for later retrieval. It reads it, extracts the key information, and integrates it into the existing wiki — updating entity pages, revising topic summaries, noting where new data contradicts old claims.[1]

This is not a theoretical distinction. A 2026 paper from researchers at the University of Washington and Microsoft formalized this as “Retrieval as Reasoning,” implementing an agent-native retrieval system called LLM-Wiki that compiles documents into structured wiki pages with bidirectional links.[2] The system achieved state-of-the-art results on HotpotQA, MuSiQue, and 2WikiMultiHopQA — outperforming HippoRAG 2, LightRAG, and GraphRAG by 2.0 to 8.1 F1 points. The finding is structural: compilation-based retrieval generalizes beyond chain-style multi-hop reasoning, confirming that the wiki pattern is not just a personal productivity hack but a fundamentally more effective retrieval architecture.

The three layers

Karpathy’s architecture has three layers, and the separation between them is what makes the pattern work.[1]

- Advertisement -

The first layer is raw sources — a curated collection of source documents. Articles, papers, images, data files. These are immutable. The LLM reads from them but never modifies them. This is the source of truth, and its immutability is non-negotiable. When a source changes, you ingest the new version; you do not edit the original.

The second layer is the wiki itself — a directory of LLM-generated markdown files. Summaries, entity pages, concept pages, comparisons, an overview, a synthesis. The LLM owns this layer entirely. It creates pages, updates them when new sources arrive, maintains cross-references, and keeps everything consistent.[1] You read it; the LLM writes it. The wiki is not a document store. It is a graph — concepts linked to sources, sources linked to claims, claims linked to evidence.

The third layer is the schema — a configuration document that tells the LLM how the wiki is structured, what the conventions are, and what workflows to follow when ingesting sources, answering questions, or maintaining the wiki. In Karpathy’s framing, this is a CLAUDE.md or AGENTS.md file. It is the key configuration that makes the LLM a disciplined wiki maintainer rather than a generic chatbot.[1]

- Advertisement -

The three-layer separation is what prevents the most common failure mode of AI-assisted knowledge management: the LLM modifying raw sources, introducing drift, or losing provenance. Raw sources are read-only. The wiki is LLM-owned but human-reviewed. The schema constrains behavior. The division of labor is explicit.

Ingest, query, lint: the operational loop

The wiki operates on three cycles, and each cycle compounds the knowledge base.[1]

Ingest is the intake process. You drop a new source into the raw collection and tell the LLM to process it. The LLM reads the source, discusses key takeaways with you, writes a summary page in the wiki, updates the index, updates relevant entity and concept pages across the wiki, and appends an entry to the log. A single source might touch ten to fifteen wiki pages. Karpathy prefers to ingest sources one at a time and stay involved — reading the summaries, checking the updates, guiding the LLM on what to emphasize. But batch ingestion with less supervision is also viable.[1]

- Advertisement -

Query is the retrieval process. You ask questions against the wiki. The LLM searches for relevant pages, reads them, and synthesizes an answer with citations. The critical insight is that good answers can be filed back into the wiki as new pages. A comparison you asked for, an analysis, a connection you discovered — these are valuable and should not disappear into chat history.[1] This is the compounding mechanism: every query that produces a useful answer strengthens the knowledge base for the next query.

Lint is the maintenance process. Periodically, the LLM health-checks the wiki. It looks for contradictions between pages, stale claims that newer sources have superseded, orphan pages with no inbound links, important concepts mentioned but lacking their own page, and missing cross-references.[1] The LLM is good at suggesting new questions to investigate and new sources to look for. This keeps the wiki healthy as it grows.

The loop is what makes the system self-improving. The first time the pipeline runs, it has no knowledge base. Every paper is novel. Every claim is ungrounded. The tenth time, the knowledge base is dense enough that most inputs can be quickly triaged — they confirm what is already known, and only genuinely novel findings require deep synthesis.

- Advertisement -

What the ecosystem revealed

The speed of ecosystem growth after Karpathy’s gist is itself a signal. By July 2026, the “awesome-llm-wiki” curated list documented over forty distinct implementations across CLI compilers, Obsidian plugins, MCP servers, and hosting platforms.[3] Tools range from simple scaffolding templates to production systems with hybrid BM25/vector search, persistent error books for self-correction, and multi-agent coordination layers.

The variety reveals which parts of the pattern are load-bearing and which are implementation preference. Every successful implementation preserves the three-layer separation (raw sources, LLM-maintained wiki, schema). Every one maintains an index file and a chronological log. Every one uses markdown as the interchange format. The variations are in search infrastructure (index-only versus BM25 versus vector), in schema enforcement (loose conventions versus Pydantic-style frontmatter validation), and in multi-agent coordination (single-agent versus team-oriented write permissions).

The pattern’s influence extends beyond personal knowledge management. A July 2026 paper on “Progressive Disclosure for LLM-Maintained Wiki” directly addresses the challenge of scaling the pattern to team contexts — where multiple agents and humans write to the same wiki and semantic drift becomes a coordination problem.[2] This is the frontier the pattern is moving toward: from personal second brain to shared organizational knowledge base.

- Advertisement -

What this means for the S10 series

The S10 series maps the market sensing stack: prediction markets for consensus signals, the research pipeline for academic rigor, blogwatcher for independent speed, and grounded citations for attribution. The LLM wiki is the persistent memory layer that makes the entire stack compounding rather than episodic.

Without the wiki, every research cycle starts from scratch. The prediction market reading from last week is gone. The arxiv paper you synthesized is buried in chat history. The blog post that contradicted your thesis has no record. With the wiki, every data point persists. Every synthesis is filed. Every contradiction is flagged. The knowledge base grows with each cycle, and each cycle starts from a richer foundation than the last.

The Kingdom of Truth’s Council-Vault implements the Karpathy pattern at the system level: raw sources in immutable directories, LLM-maintained wiki pages with cross-references and frontmatter, a schema document that constrains agent behavior, and an index that catalogs everything. The llm-wiki skill operationalizes the ingest-query-lint loop. The grounded-citations skill ensures every claim is attributed. The blogwatcher skill feeds the raw source layer with RSS monitoring.

- Advertisement -

The wiki is the second brain. Not because it thinks for you, but because it remembers for you — everything you have read, everything you have synthesized, everything you have decided, persisted in interlinked markdown that compounds with every source you add and every question you ask.

- Advertisement -
Share This Article
0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
0
Would love your thoughts, please comment.x
()
x