YouMind
Увійти

LLM Wiki = Updatable RAG

@AndrewK404
АНГЛІЙСЬКА26 трав. 2026 р.
317K
88
5
0
67

Коротко

This article breaks down the LLM Wiki architecture, explaining how an AI agent can maintain and self-audit a markdown-based knowledge graph to prevent information loss in standard RAG pipelines.

Finally got around to reading Karpathy's LLM Wiki gist (yeah, late to the hype train XD).

And honestly, the whole idea collapses into something pretty simple: "updatable RAG".

1. The problem

When LLMs work with documents, nothing accumulates. Every query - the model retrieves chunks, synthesises from scratch, forgets. Knowledge never compiles. And imo what matters even more: almost no useful info gets extracted from the dialogues themselves.

RAG helps partially (in the broad sense - a folder of .md files is also RAG), but the standard pipeline (which everyone uses) has no built-in update, distillation, or self-cleanup. Knowledge lands in the index once and then just sits there idle. That gap is exactly what LLM Wiki closes.

Karpathy's inversion: between raw sources and you sits a markdown wiki the agent incrementally writes and maintains. Compile once, keep current.

2. Architecture: 3 layers

Andrew Kuncevich - inline image
  • raw/ - sources, immutable. The agent doesn't write here.
  • wiki/ - the heart of the system; markdown pages (entities, concepts) the LLM writes and cross-links itself. Essentially graph-shaped knowledge.
  • CLAUDE.md - just the manual for how to run LLM Wiki. Holds: page format, link conventions, ingest flow, lint rules. The thing that turns Claude from a chatbot into a disciplined wiki maintainer.

Enough for hundreds of pages with zero extra tuning:

Andrew Kuncevich - inline image

3. Operations

Andrew Kuncevich - inline image

Three operations - you immediately want to draw them as API functions:

  • Ingest -> add(source: file | list[file]). Drop a source -> agent reads -> discusses with you -> writes summary -> updates index -> edits related entity pages -> appends to log. One source touches 10-15 pages.
  • Query -> search(prompt: str). The most important op. Answers your question + (THE KEY PART) automatically files the synthesis back into the wiki as new pages. Exploration compounds instead of dying in chat history. Under the hood it's basically add(source=dialogue).
  • Lint -> lint(). No args. Periodically walks the wiki: contradictions, orphan pages, stale facts, missing cross-refs. Trigger - every N user messages, or a changed-lines counter. Easy to attach to /schedule.

Strongly reminds me of Claude Dreaming - I think Dreaming is partially inspired by this pattern (though its function set is a bit different).

4. Indexing

Andrew Kuncevich - inline image

Two special files make the wiki navigable:

  • index.md - current state. Catalogue of every page with a one-liner. The agent reads it first on any query - it's the minimum context "what's even in this wiki".
  • log.md - log of all events, free-form. Append-only timeline. If lines follow a consistent shape (e.g. \## [YYYY-MM-DD] ingest | title\), the log greps cleanly with plain unix tools - handy for audit.

index.md can scale further (vector index, BM25, GraphDB, ...) - I'll cover that in a separate post.

5. Takeaways

Here's how I'd frame it: this isn't a choice between RAG and LLM Wiki - they're two points on the same "compounding memory" axis.

RAG doesn't have to be a vector DB - a folder of markdown files is also RAG.

So you can rephrase LLM Wiki as RAG with three things bolted on top:

  1. A summarisation layer.
  2. (Almost) free-form authoring of the structure on that summary level.
  3. Periodic structural audit + self-improvement (CRON).
Збереження в один клік

Використовуйте YouMind для AI-глибокого читання віральних статей

Зберігайте джерела, ставте цілеспрямовані запитання, підсумовуйте аргументи та перетворюйте віральні статті на корисні нотатки в одному AI-робочому просторі.

Дослідити YouMind
Для авторів

Перетворіть свій Markdown на охайну статтю для 𝕏

Коли ви публікуєте власні лонгріди, зображення, таблиці та блоки коду роблять форматування в 𝕏 складним. YouMind перетворює повну чернетку в Markdown на чисту статтю для 𝕏, готову до публікації.

Спробувати Markdown для 𝕏

Більше патернів для аналізу

Останні віральні статті

Переглянути більше віральних статей