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 للقراءة العميقة للمقالات سريعة الانتشار بتقنية الذكاء الاصطناعي

احفظ المصدر، واطرح أسئلة مركزة، ولخص الحجة، وحوّل المقالة واسعة الانتشار إلى ملاحظات قابلة لإعادة الاستخدام في مساحة عمل واحدة تعمل بالذكاء الاصطناعي.

اكتشف YouMind
للمبدعين

حول Markdown إلى مقالة 𝕏 نظيفة

عندما تنشر كتاباتك الطويلة، فإن الصور والجداول وكتل التعليمات البرمجية تجعل تنسيق 𝕏 مؤلمًا. YouMind يحول مسودة Markdown كاملة إلى مقالة نظيفة وجاهزة للنشر 𝕏.

حاول Markdown إلى 𝕏

المزيد من الأنماط لفك التشفير

المقالات الفيروسية الأخيرة

استكشاف المزيد من المقالات الفيروسية