Skip to content

LlmWikis knowledge page

RAG vs Incremental Compilation

Traditional RAG is strongest when the system needs to retrieve relevant chunks at answer time. An LLM Wiki is strongest when the corpus benefits from durable synthesis before the next question is asked.

Dimension Query-time RAG LLM Wiki incremental compilation
Processing trigger Every user question retrieves and assembles context again. Ingest reads sources once and updates durable markdown pages.
Memory of synthesis Usually lost unless the app separately stores it. Saved into wiki/syntheses/ or existing concept pages.
Contradiction handling Contradictions often surface only when chunks collide in a prompt. Contradictions are recorded during ingest and lint.
Human auditability Depends on retrieval logs and chunk citations. Markdown pages, source summaries, and log entries are inspectable.
Infrastructure Often needs embeddings, indexes, rerankers, and runtime retrieval services. Can begin with files, grep, index.md, log.md, and wiki-links.

Use both when needed

The patterns are not enemies. A mature team wiki may use markdown as the compiled knowledge layer and add BM25, vector search, or hybrid retrieval when the graph grows. The important difference is that the search layer should find compiled knowledge, not replace it.

Deployment decision matrix

Situation Prefer RAG when Prefer LLM Wiki when
Corpus size Millions of rapidly changing raw documents must be searched cheaply. A bounded domain needs repeated synthesis, review, and source-backed pages.
Answer shape The user mostly wants a fresh answer over the newest matching chunks. The user wants an improving reference that preserves decisions and contradictions.
Audit need Chunk citations and retrieval logs are enough for the risk level. Reviewers need readable pages, source summaries, change logs, and lifecycle labels.
Data churn The document set changes too quickly to curate page-level syntheses. Sources are stable enough that ingest-time compilation pays off repeatedly.
Hybrid point Search should retrieve raw chunks first. Search should retrieve compiled pages first, then raw evidence for verification.

Rule of thumb

If a source will be used once, retrieval may be enough. If the source changes how future answers should be formed, compile it into the wiki.