Agentic RAG vs Fine-Tuning vs LLM Wiki: What Is Actually Different?

The difference is when the knowledge work happens. Agentic RAG searches sources at query time, with an agent deciding what to retrieve. Fine-tuning bakes behaviour into model weights at training time. An LLM wiki has the model compile sources into maintained markdown pages at ingest time, so questions read finished notes instead of raw chunks.

One question, three places to do the work

All three give a model knowledge or behaviour it was not trained with. They differ in where that knowledge lives and when the expensive thinking happens.

  • Agentic RAG keeps knowledge in source documents and indexes. Work happens at query time, every time.
  • Fine-tuning moves knowledge or behaviour into the weights. Work happens once, at training time, and again whenever you retrain.
  • LLM wiki keeps knowledge in a set of markdown pages the model writes and maintains. Work happens at ingest time, when a new source arrives.

That timing decides the cost profile, the update path, and the failure mode of each.

Agentic RAG: retrieval with a planner

Plain RAG embeds the question, pulls the nearest chunks, and stuffs them into the prompt. Agentic RAG puts an agent in charge of that loop. It can rewrite the query, choose between indexes or tools, read a result, decide the evidence is thin, and search again.

The cost is that nothing accumulates. The agent re-discovers the same relationships between documents on every question, and each retry is another model call. For a deeper look at the trade-offs against training, see the head-to-head on RAG vs fine-tuning.

Fine-tuning: change the model, not the context

Fine-tuning trains the model further on your examples. It is good at teaching a format, a house style, a classification scheme, or a narrow skill.

It is weak at facts. Knowledge absorbed into weights cannot be cited, is hard to inspect, and goes stale the day the source changes. If the real problem is that the model lacks your documents, fine-tuning is usually the expensive wrong answer.

LLM wiki: compile once, read many times

Karpathy published the LLM wiki idea as a GitHub gist on April 4, 2026. The pattern has three layers: raw sources the model reads but never edits, a wiki of model-written markdown pages (summaries, entity and concept pages, comparisons), and a schema file such as CLAUDE.md or AGENTS.md that sets conventions. An index.md catalogues pages and a log.md records every change.

Three operations run it. Ingest reads a new source and updates every page it touches. Query reads relevant wiki pages and answers with citations, optionally filing good answers back as new pages. Lint checks for contradictions, stale claims, and orphan pages. The gist frames it as "Obsidian is the IDE; the LLM is the programmer; the wiki is the codebase."

The gist itself scopes the simple index approach to moderate scale, roughly 100 sources and hundreds of pages, and suggests adding search beyond that. It offers no benchmarks. The real risk is that the model is now an author: a wrong summary written at ingest is read as truth on every later query unless review catches it.

How to choose

Start from the failure you can least afford.

  • Answers must be current and cited, corpus is large: agentic RAG.
  • Output format or tone is wrong, facts are fine: fine-tuning.
  • A focused domain you keep returning to, where synthesis across sources is the value: an LLM wiki.

They stack well. A wiki is just a curated corpus, so retrieval over it beats loading the whole thing once it outgrows a context window. That is the stacked approach described in stacked retrieval: check curated knowledge first and fall back to the model only when needed. RDK applies it to local vaults, indexing Obsidian or docs folders as encrypted private chunks, which cuts token spend 80 to 90 percent on repeated, reference-heavy work. The wiki debate also echoes the claim that teams have stopped using RAG: reading files by navigation is still retrieval.

DimensionAgentic RAGFine-tuningLLM wiki
Where knowledge livesSource documents and indexesModel weightsModel-maintained markdown pages
When the work happensEvery queryTraining runIngest of each new source
Updating a factRe-index the changed documentRetrain and re-evaluateIngest the new source; pages are rewritten
CitationsYes, to source chunksNoYes, to wiki pages and sources
Main failureMissed or wrong retrieval, wandering loopsStale or unverifiable factsWrong synthesis that persists
Scales toLarge corporaAny corpus, but slow to updateModerate scale before search is needed
Best forLarge, changing, cited knowledgeFormat, tone, narrow skillsFocused domains with heavy cross-referencing

Frequently asked questions

What is an LLM wiki?
An LLM wiki is a knowledge base of markdown pages that a language model writes and maintains from your raw sources. Andrej Karpathy described the pattern in an April 2026 GitHub gist: immutable sources, model-written pages, and a schema file of conventions, maintained through ingest, query, and lint operations. Questions are answered from the compiled pages rather than from raw document chunks.
Is an LLM wiki a replacement for RAG?
Not really. It moves synthesis from query time to ingest time, which helps when the same relationships between sources are needed repeatedly. But the model still has to find the right pages, and past a moderate size that means search. Treat the wiki as a better corpus to retrieve from, not as the end of retrieval.
What makes RAG agentic?
In agentic RAG, an agent controls the retrieval loop instead of running a single fixed search. It can rewrite the query, pick between indexes or tools, judge whether the evidence is sufficient, and search again. That raises answer quality on hard questions, at the cost of more model calls and a loop that needs limits.
When is fine-tuning the right choice over RAG or a wiki?
When the problem is behaviour rather than knowledge: a strict output format, a house style, a classification scheme, or a narrow task the base model handles poorly. Fine-tuning is a poor way to add changing facts, because weights cannot be cited, are hard to inspect, and need retraining every time the source changes.