---
title: "LLM Wiki: the pattern of a knowledge base written by the model"
description: "The 'LLM Wiki' pattern (proposed by Andrej Karpathy in a gist on 4 April 2026) replaces ad-hoc RAG regeneration with a persistent Markdown wiki incrementally maintained by an LLM. Three layers (sources, wiki, schema), ingest/query/lint workflow, tooling: Obsidian, Git, qmd."
url: "https://www.noze.it/en/insights/llm-wiki/"
lang: "en"
alternate: "https://www.noze.it/insights/llm-wiki/"
published: "2026-04-28"
author: "noze S.r.l."
keywords: "Open Source, AI, LLM, Knowledge Management, RAG, Markdown, Obsidian"
---

# LLM Wiki: the pattern of a knowledge base written by the model

The 'LLM Wiki' pattern (proposed by Andrej Karpathy in a gist on 4 April 2026) replaces ad-hoc RAG regeneration with a persistent Markdown wiki incrementally maintained by an LLM. Three layers (sources, wiki, schema), ingest/query/lint workflow, tooling: Obsidian, Git, qmd.

28 April 2026

![Two-panel diagram: on the left the three layers of the LLM Wiki pattern (raw sources, Markdown wiki, CLAUDE.md schema), on the right the three-phase ingest, query and lint workflow compared with classic RAG.](https://www.noze.it/images/insights/llm-wiki-pattern-en.svg)

Raw sources stay untouched and the LLM maintains only the wiki: each incoming document updates 10-15 related pages, questions go to the wiki rather than to the raw sources, lint passes surface contradictions, orphan links and gaps. Diagram based on Andrej Karpathy’s gist.

## From rediscovery on every query to knowledge that accumulates

In classic RAG, every new question makes the LLM start over: indexing, retrieval, synthesis. The model, **Andrej Karpathy** writes in a [gist published on 4 April 2026](https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f), “rediscovers knowledge from scratch on every question. There’s no accumulation.” The **LLM Wiki** pattern shifts the centre of gravity: instead of regenerating answers from raw documents, the model builds and maintains a **persistent Markdown wiki** that grows over time. Karpathy explicitly references **Vannevar Bush’s Memex** (1945): a personal knowledge store with associative trails between documents.

## Three layers: sources, wiki, schema

The architecture has three parts:

- **Raw sources** — immutable documents, never modified by the model.
- **The wiki** — a directory of Markdown files generated and updated by the LLM, with cross-references (e.g. `[[sources/...]]`) pointing back to the sources.
- **The schema** — a configuration document (typically a `CLAUDE.md` or equivalent) that encodes the wiki’s structure, naming conventions and style.

The operational workflow has three distinct phases: **ingest** (a new document arrives, the LLM reads it and updates 10-15 related wiki pages), **query** (questions go to the wiki, not to raw sources; answers cite source links), **lint** (periodic passes that surface contradictions, orphan links and gaps).

## Tooling: nothing exotic

Karpathy lists tools available today and well known to developers: **Obsidian** as editor with graph view, **Obsidian Web Clipper** for web ingest, **qmd** for local search, **Marp** to generate slides from the wiki, the **Dataview** plugin for structured queries inside Obsidian, **Git** for versioning. The gist comments list a number of community-driven implementations (SwarmVault, WeKnora, Keppi, llmwiki-cli, OmegaWiki, Lore…) — a signal that the pattern landed on fertile ground among people experimenting with LLM-driven knowledge management.

## What this means in practice

The operational point of the pattern is **maintenance**: personal wikis historically fail because updating cross-references is tedious, so it doesn’t get done. “LLMs don’t get bored, don’t forget to update a cross-reference,” Karpathy writes. For anyone designing a corporate or personal knowledge base built on local LLMs, the pattern is a concrete alternative to vanilla RAG: instead of an opaque index, a readable artefact, version-controlled in Git, inspectable by a human and improvable page by page.

**Link**: [Karpathy “LLM Wiki” gist](https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f) · [Memex (Vannevar Bush, 1945)](https://en.wikipedia.org/wiki/Memex)
