Guide · LLM wiki
What is an LLM wiki? Karpathy's pattern, explained
An LLM wiki is a collection of interlinked markdown pages that a language model writes and keeps up to date from the sources you give it, so knowledge is compiled once instead of re-derived from raw documents on every question. Andrej Karpathy described the pattern in April 2026; Pith is a hosted LLM wiki that builds one from what you read, with numbered citations back to each saved source.
By Stefan Hartmann · Updated
What is an LLM wiki?
Most people meet LLMs and documents through retrieval-augmented generation (RAG): you upload files, the model fetches a few relevant chunks when you ask something, and writes an answer. Nothing is kept. The next question starts from zero, and a question that needs five documents makes the model find and stitch the same fragments together again.
An LLM wiki turns that around. When a new source arrives, the model reads it once and integrates it into a standing set of pages: it updates the page about a person or company, revises the summary of a topic, adds the new figure to the comparison, and notes where the new source disagrees with an older one. You read the pages; the model maintains them. Over months, the wiki becomes a knowledge base that reflects everything you have read, with the cross-references already in place.
Three properties define it:
- Persistent. The synthesis lives in files (or pages) that outlast any chat session.
- Maintained by the model, not by you. You choose sources and ask questions; the LLM does the summarising, filing and cross-linking.
- Traceable to sources. Raw sources stay unchanged next to the wiki, so any statement can be checked against what it came from.
It is close to what people mean by a personal wiki or a second brain, with one difference that matters: nobody has to write it. That is also why the idea spread so quickly. Personal wikis usually die of maintenance, not of lack of interest.
What did Andrej Karpathy propose?
On 4 April 2026 Andrej Karpathy published a short document called “LLM Wiki” as a GitHub gist. He calls it an “idea file”: not software, but a description you paste into your own coding agent (he names OpenAI Codex, Claude Code and OpenCode) so that the agent builds the specifics with you. The note says it is intentionally abstract — directory layout, page formats and tooling are left to you and your model. A closer read of the gist, and a table of the open-source implementations on GitHub, is on Karpathy’s LLM wiki: the gist and the open-source builds.
The gist describes three layers:
- Raw sources — articles, papers, images and data files you collect. They are immutable: the LLM reads them and never edits them. They are the source of truth.
- The wiki — a directory of markdown files the LLM writes and owns: summaries, entity pages, concept pages, comparisons, an overview.
- The schema — a file such as CLAUDE.md or AGENTS.md that tells the agent how the wiki is structured and which workflow to follow on ingest, on questions and on maintenance. You and the agent refine it over time.
Karpathy works with the agent open on one side and Obsidian on the other, browsing the pages and the graph view while the model edits. His summary of the set-up:
“Obsidian is the IDE; the LLM is the programmer; the wiki is the codebase.”
He lists personal goals, research over weeks or months, reading a book, team wikis fed by meeting notes and customer calls, competitive analysis and due diligence as uses. He links the idea to Vannevar Bush’s Memex from 1945 — a private, curated store with trails between documents — and argues that the part Bush could not solve, who does the maintenance, is what LLMs now handle.
The gist was written for people who are comfortable running an agent in a terminal. The rest of this page explains the pattern in plain terms, the parts that get hard once the wiki grows, and where a hosted version such as Pith fits — and where it does not.
How does an LLM wiki work, step by step?
Whether you build it yourself or use a hosted tool, the loop has the same five parts.
1. Ingest a source
You add an article, a paper or a PDF. The model reads it and extracts what is worth keeping: claims, figures, names, dates. Karpathy suggests ingesting one source at a time at first and staying involved, reading the summary and telling the model what to emphasise.
2. Write new pages or patch existing ones
This is the core move. For each concept the source touches, the model either creates a page or edits the existing one — adding the new point, revising the summary, strengthening or challenging what the page said. Karpathy notes that a single source can touch 10 to 15 pages. The important constraint is to patch rather than rewrite: a full rewrite on every ingest slowly loses detail and drifts.
3. Update the index and the log
Two special files keep a growing wiki navigable. index.md is a catalogue of every page with a one-line summary, which the model reads first when it answers a question. log.md is an append-only timeline of ingests, questions and maintenance passes, with a consistent prefix per entry so it can be searched with simple tools. Karpathy reports that the index alone works well up to roughly a hundred sources and a few hundred pages, without any embedding search.
4. Ask questions and file the good answers back
You ask the wiki, not the raw files. The model finds the relevant pages, reads them and answers with citations. The step people skip: a good answer — a comparison, an analysis, a connection — becomes a new page, so exploring the wiki also grows it.
5. Lint the wiki
Periodically, the model health-checks the whole thing: contradictions between pages, claims that newer sources have overtaken, orphan pages with no links in, concepts mentioned everywhere but without a page of their own, missing cross-references. This is the part that keeps the wiki trustworthy at a few hundred pages.
The whole value of the pattern is in steps 2 and 5. Ingest and question answering are easy; keeping hundreds of pages consistent, current and traceable is the work nobody wants to do — which is exactly why it is handed to the model.
LLM wiki vs RAG vs a notes app: what is the difference?
All three hold what you know. They differ in who does the synthesis, and when.
| LLM wiki | RAG (chat over files) | Notes app | |
|---|---|---|---|
| Who writes the knowledge | The model, from your sources | Nobody — answers are generated per question | You, by hand |
| When synthesis happens | Once, when a source arrives | Every time you ask | When you find the time |
| What you read | Maintained pages | A chat answer | Your own notes |
| Link to the source | Citations on the page, raw source kept | Retrieved chunks, if the tool shows them | Whatever you pasted in |
| Contradictions between sources | Flagged during ingest or lint | Rarely noticed | Noticed if you remember both |
| Gets better over time | Yes — each source and good answer compounds | No — the corpus grows, the understanding does not | Only as fast as you write |
| Main risk | A mistake gets compiled in and repeated | Shallow answers, missed connections | The notes go stale |
| Best for | A field you follow for months | Large document sets, one-off look-ups | Your own thinking and drafts |
The comparison is not either-or. A wiki large enough to need search uses retrieval to find its own pages, and a good notes app is where your own conclusions go. The deeper trade-offs between the first two are on LLM wiki vs RAG.
What is hard about building an LLM wiki yourself?
The first weekend is easy: a folder, a schema file, ten articles, and the agent produces a convincing set of pages. The problems appear at a few hundred pages and a few months of use. Here are the six that come up most, and how Pith handles each one.
Citations that still hold after the tenth rewrite
A page that has been patched twenty times by a model tends to keep its sentences and lose track of where they came from. Markdown footnotes break when paragraphs move, and an agent will happily cite a source it never read.
In Pith: every wiki page carries numbered references to the saved sources it rests on and lists them under “Sources”, with a link to the original and to your saved copy — if the original disappears, the saved text stays. When an outside agent writes a page over MCP, Pith checks before storing it that each citation points to a source actually saved in your workspace. When you delete a source, its citation is removed from every page that used it and the remaining reference numbers are renumbered, so no marker points at the wrong source. For your own drafts there is a separate citation check that rates each claim as supported, partly supported, unsupported or wrongly cited against your saved sources (49 ct per started 10 pages).
Keeping pages current without rewriting them
Re-generating a page from scratch on every new source is expensive and erodes detail; never touching it again leaves it stale.
In Pith: on each save, the wiki agent compares the new source with the pages it touches. If it adds nothing new, the source is attached as a further citation; if it does, the page is patched; a concept without a page gets a new one. A cross-linking pass then adds related pages. A daily health check flags pages without sources, orphan pages, pages not updated for 90 days and near-duplicates such as the same concept written twice in two languages.
Conflicts between sources
Two analysts give different figures for the same market. A model asked to “integrate” both will often average them into one confident sentence, and the disagreement is gone.
In Pith: genuine contradictions between cited sources are recorded as source conflicts. A page with conflicts shows a small “source conflicts” chip that opens the provenance trail with both passages side by side, and the conflicts are part of the workspace export and readable by your AI assistant.
Versions and undo
Karpathy’s answer is git, which works well if you live in a terminal. Without it, one bad ingest can quietly overwrite a good page.
In Pith: every change to a page’s text is recorded as a version, whichever path wrote it — the wiki agent, your own edits or an external agent. You can list versions, compare two of them and restore an older one through your AI assistant over MCP; a restore is itself a new version, so nothing is lost.
Sharing a page with someone who doesn’t use your setup
A folder of markdown files on your laptop is hard to show a client or a colleague without sending them the whole folder.
In Pith: a page can be shared as a link with an expiry date, an optional password and a view limit, and you manage all links in one place. The whole workspace can be exported at any time as a ZIP with a JSON file and Markdown renderings.
Cost you can predict
In the DIY set-up you pay your model provider per token, and an ingest that touches 10 to 15 pages reads and writes a lot of text. That is often fine, but hard to estimate in advance.
In Pith: there is no subscription. Saving a source with AI enrichment costs 2 ct, a wiki page Pith writes or updates costs 5 ct, a question to the wiki 2 ct; reading and searching the wiki is free, and so are reads and wiki writes from your own AI assistant over MCP. Failed jobs cost nothing. Current prices are on the pricing page.
What does Pith do as a hosted LLM wiki?
Pith is a reading memory: you save what you read, and an LLM agent writes and maintains a wiki from it — the pattern above, without the terminal. Concretely:
- What it reads: links you save from the app, the browser extension, your phone or a forwarded newsletter; PDFs; bookmark exports from other tools; and RSS feeds, whose entries you send into the wiki from the Inbox or the morning report.
- What it writes: concept and entity pages in markdown, each with numbered citations and a Sources list, cross-linked to related pages. Code repositories, video and social sites, and tool or landing pages stay out of the wiki by default; you can change the domain list.
- What it checks: that citations point to saved sources, where sources contradict each other, whether a saved source has been edited since you read it, and — on request — whether the claims in your own draft are backed by your sources.
- Where you use it: in the browser, and from Claude, ChatGPT, Cursor or any other client that speaks the Model Context Protocol. Your assistant can search and read the wiki, save new sources and write pages back.
- Where it runs: hosted in Germany (EU). The text of your sources is processed by OpenAI to write summaries and pages.
You can see a real Pith wiki without signing up in the demo, and Pith’s own EU regulation explainers are written the same way: from official sources, every statement linked to where it comes from.
When should you not use Pith?
Karpathy’s DIY approach is genuinely good, and for some people it is the better choice:
- You want the wiki as files in your own repository. If plain markdown in git, your own folder layout and your own schema file are the point, run the gist with Claude Code or Codex. Pith stores pages in its own database; you can export them, but the canonical copy lives in Pith.
- You want to shape every step. The gist invites you to co-design the workflow with your agent — page formats, slide decks, charts, custom lint rules. Pith’s workflow is fixed and tuned for reading-heavy work.
- Your sources must not leave your machine. Pith is hosted, and summaries and pages are written with OpenAI models. If that rules it out, run a local set-up with a local model.
- Your sources are chat threads and meeting transcripts. Pith reads articles, PDFs, newsletters and feeds. A team wiki fed from Slack is not what it is built for.
- You live in Obsidian’s graph view. If browsing your wiki in Obsidian is the experience you want, keep the files local. (See Pith vs Obsidian for the longer comparison.)
These are not competing choices. Pith exposes its wiki over MCP, so an agent running Karpathy’s pattern in your terminal can pull cited pages and saved sources from Pith as one of its inputs — and Pith keeps the part that is tedious to run yourself: capture from everywhere, citations that survive edits, versions and conflicts.
How do you start an LLM wiki?
Pick the path that matches how you like to work:
- Without code: sign up for Pith, save ten articles on one topic and open the wiki. The step-by-step guide, including connecting Claude via MCP, is Karpathy’s LLM wiki without code.
- With your own agent: read the gist, create a folder with raw/ and wiki/, write a short schema file and ingest one source at a time. Add git from day one.
- Not sure you need a wiki at all? The LLM wiki vs RAG decision guide helps you choose.
Either way, start narrow: one field you actually follow, sources you trust, and a habit of reading what the model wrote. A wiki built from fifty good sources is worth more than one built from five hundred skimmed ones.
Frequently asked questions
What is an LLM wiki?
An LLM wiki is a set of interlinked markdown pages that a language model writes and maintains from the sources you collect. Instead of searching raw documents for every question, the model integrates each new source into existing pages once, so the knowledge accumulates and stays traceable to its sources.
What is Karpathy's LLM wiki?
It is an “idea file” Andrej Karpathy published as a GitHub gist on 4 April 2026. It describes three layers (immutable raw sources, an LLM-written markdown wiki, and a schema file such as CLAUDE.md), three operations (ingest, query, lint) and two helper files (index.md and log.md), meant to be pasted into a coding agent such as Claude Code or Codex.
Is an LLM wiki better than RAG?
For a field you follow over months, usually yes: the synthesis is done once and improves with every source. For large, fast-changing document sets or one-off look-ups, RAG is simpler. Many set-ups combine both — see the LLM wiki vs RAG guide on this site.
Do I need Obsidian for an LLM wiki?
No. Karpathy uses Obsidian as a viewer for the markdown files, but any editor works, and hosted tools like Pith show the wiki in the browser. Obsidian is useful mainly for its graph view and plugins.
Can I build an LLM wiki without coding?
Yes. With Pith you save links or PDFs and the wiki pages appear with citations; you can then ask questions from Claude or ChatGPT via MCP. The guide Karpathy's LLM wiki without code walks through it step by step.
How does Pith keep citations accurate?
Every page lists its numbered sources, and pages written by outside agents are only stored if their citations point to sources saved in your workspace. Deleting a source removes its citation everywhere and renumbers the rest. Source conflicts are flagged, and a separate citation check rates the claims in your own drafts against your saved sources.
What does an LLM wiki cost with Pith?
There is no subscription. You pay per AI action from a prepaid credit — a few cents per saved source and per wiki page — while reading, searching and access from your own AI assistant via MCP are free. The current price list is on the Pith pricing page.
Does my data leave the EU with Pith?
Pith is hosted in Germany, but the text of your sources is processed by OpenAI to write summaries and wiki pages, so it is not EU-only. If your sources must stay on your own machine, a local DIY set-up with a local model is the better fit.
Keep reading
Guide · LLM wiki vs RAG
LLM wiki vs RAG: a decision guide
Guide · LLM wiki without code
Karpathy's LLM wiki without code
Guide · Karpathy LLM wiki
Karpathy's LLM wiki: what the gist says, and the open-source builds
Related terms
Try a hosted LLM wiki
Save what you read; Pith writes the cited wiki. No subscription, no credit card to start.