YouMind
Se connecter

LLM Wiki = RAG actualisable

@AndrewK404
ANGLAIS26 mai 2026
317K
88
5
0
67

TL;DR

Cet article décrypte l'architecture LLM Wiki et explique comment un agent IA peut maintenir et auto-auditer un graphe de connaissances basé sur le Markdown pour éviter la perte d'informations dans les pipelines RAG classiques.

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).
Enregistrer en un clic

Lire les articles viraux en profondeur avec l’IA de YouMind

Enregistrez la source, posez des questions ciblées, résumez l’argument et transformez un article viral en notes réutilisables dans un seul espace de travail IA.

Découvrir YouMind
Pour les créateurs

Transformez votre Markdown en un article 𝕏 impeccable

Quand vous publiez vos propres textes longs, la mise en forme 𝕏 des images, tableaux et blocs de code est pénible. YouMind transforme un brouillon Markdown complet en un article 𝕏 impeccable, prêt à publier.

Essayer Markdown vers 𝕏

D'autres patterns à décoder

Articles viraux récents

Explorer plus d'articles viraux