Skip to content

RAG vs CAG vs KAG — Three Ways to Give an LLM Knowledge It Never Saw, and When to Use Each

SeungAh Hong33min read

RAG vs CAG vs KAG: Search It, Preload It, or Reason Over a Graph

An LLM knows nothing about data from after its training cutoff or about your company's internal documents. An infographic from GenAI.works that sorts the fixes for this gap into three approaches has been widely shared lately: "RAG vs CAG vs KAG — How LLMs use knowledge they were never trained on".

Search it → RAG · Preload it → CAG · Reason over it → KAG

It is an easy summary to remember. But do those three lines match the original papers? And what has research since 2025 added? This post checks the infographic against the original CAG and KAG papers and against papers, official docs, and engineering blogs from 2025 onward, and fills in the conditions and pitfalls the infographic leaves out.

✍️ TL;DR

The infographic's split is a fine starting point, but the three approaches are parts you combine, not rivals. And the benefits it lists ("answer instantly", "every step can be explained") come with conditions the infographic doesn't mention.

Summary

  • RAG: The infographic's "chunk → vector top-k → insert into prompt" is the most basic (naive) RAG. Production RAG in 2025 adds hybrid search (vectors + BM25), reranking, adding context to chunks, and agentic routing. The "RAG is dead" claim also targets this basic form, not retrieval itself.
  • CAG: The original paper (a WWW '25 short paper) matches the infographic's definition and steps. But its experiments cover one model, Llama 3.1 8B, and corpora of 21k–85k tokens. On the largest set CAG scored below BM25 RAG, and its dramatic speedups are measured against "feeding the whole document every time without a cache", not against RAG. The authors limit CAG to small knowledge bases like FAQs and call centers, and their conclusion proposes a cache + retrieval hybrid.
  • KAG: Not a generic term for "knowledge-graph-based generation" but the name of a specific framework Ant Group built on OpenSPG. It doesn't use the graph alone: it cross-indexes the graph with the source text chunks and uses vector retrieval alongside it. The generic category is better called GraphRAG.
  • What independent benchmarks since 2025 agree on: There is no universal winner. RAG does better on single facts, long context or graphs on multi-hop, comparison, and reasoning, and every model gets worse as the input grows (context rot). Graphs pay for their gains with construction cost and missed extractions.
  • Practical takeaway: Default to well-built RAG, preload small and stable shared knowledge with prompt caching, and add a graph only when many questions have to hop across relationships between entities. That order is the safest for the cost.
ApproachThe infographic's lineWhat the original sources showConditions the infographic omits
RAGSearch large, changing knowledge and insert itCorrect, but it shows the basic formChunks lose context; weak on comparison and multi-hop questions
CAGPreload small, stable knowledge and answer instantly from the KV cacheDefinition is correct; the Cache Reset step is missingQuality drops as context grows; cache invalidation, TTL, cost
KAGReason step by step over a graph of connected expert knowledgeA specific framework; a graph + vector hybridGraph construction cost, missed extractions, mostly vendor-reported numbers

📌 How to read the numbers: Every figure in this post comes with its source and experimental setup. "Vendor-reported" means the company or authors behind a technique measured it themselves; "independent benchmark" means a third party compared several methods under the same conditions. Trust the former for direction and the latter for magnitude.

The details follow.


📋 Contents

  1. Why three approaches?
  2. The infographic at a glance
  3. RAG — search, then insert
  4. CAG — preload and cache
  5. KAG — reason over a graph
  6. What the infographic leaves out
  7. Which one, when?
  8. Patterns for combining them
  9. Wrapping up

Why three approaches?

An LLM's knowledge stops at its training data. There are two broad ways to give it new knowledge.

  1. Change the weights — fine-tuning. It is expensive, has to be redone every time the knowledge changes, and makes it hard to trace where an answer came from.
  2. Put it in the input (the context) — leave the model alone and hand it the knowledge it needs along with the question.

RAG, CAG, and KAG all take the second path. They differ in what goes into the context, when, and in what form.

  • RAG: find only the pieces you need each time a question arrives
  • CAG: load everything before any question arrives, and reuse the processed result
  • KAG: structure the knowledge into entities and relations ahead of time, then turn each question into a plan over that structure

All three are context engineering problems: different ways to decide what goes into a limited context window.

The infographic at a glance

The infographic draws all three columns with the same frame: which kind of knowledge each fits, then three steps.

RAGCAGKAG
FitsLarge, changing knowledge
too big for the context window, updated often
Stable, bounded knowledge
small enough to fit in the context window
Expert, connected knowledge
facts linked by entities and relationships
01Chunk & embed
documents split into chunks, stored as vectors
Preload everything
all documents loaded into the context once
Build a knowledge graph
entities and links tied to their source text
02Retrieve top matches
the question is matched by vector similarity
Save the KV cache
the processed state is stored and reused
Reason step by step
the question becomes a plan across the graph
03Augment & answer
the best chunks go into the prompt
Answer instantly
no retrieval step, very low latency
Traceable answer
every step can be explained

The axes are clean: size and change rate of the knowledge (RAG ↔ CAG) and how connected it is (KAG). Below, each column is checked against its original sources.

RAG — search, then insert

The infographic shows "basic RAG"

The infographic's three RAG steps aren't wrong. But they describe what LlamaIndex calls "naive top-k retrieval", the most basic form: put chunks in a vector database and fetch the k chunks closest to the question embedding (LlamaIndex, 2025-05).

This basic form has well-known failure modes.

  • Chunks lose their context: Split a document into chunks of a few hundred tokens and each chunk no longer knows where it came from. Anthropic's example is the classic one: from the chunk "The company's revenue grew by 3% over the previous quarter" alone, you can't tell which company or which quarter (Anthropic, Contextual Retrieval). Jina AI's late chunking paper points out the same problem with anaphora: "Its" and "the city" lose their meaning when they are embedded apart from the earlier chunk that names "Berlin" (Günther et al., 2409.04701).
  • Weak on questions that need several pieces: Comparison questions, which require fetching several distant chunks correctly, are RAG's biggest weakness. On the LaRA benchmark, the accuracy gap between RAG and long context on comparison tasks averaged 15.22% at 32k and 14.30% at 128k, the largest of any task (LaRA, 2502.09977, independent benchmark).

How far RAG has come by 2025

Most of the techniques that patch the basic form's weaknesses are now table stakes.

TechniqueWhat it doesEvidence
Hybrid searchCombines vector search with BM25 keyword searchContextual Retrieval numbers below
RerankingRe-orders a broad candidate set with a separate modelSame
Contextual RetrievalUses an LLM to prepend each chunk with "where this chunk sits in the document" before embedding and BM25Anthropic, 2024-09
Late chunkingRuns the whole long document through the embedding model first and splits into chunks afterwardsJina AI, 2409.04701
Agentic retrievalAn agent picks the retrieval unit (chunk or file) and index per queryLlamaIndex, 2025-05

In Anthropic's own experiments (averaged over codebases, fiction, papers and more; metric is the top-20 retrieval failure rate), failures dropped as follows. These are vendor-reported numbers.

SetupTop-20 retrieval failure rateReduction
Baseline embeddings5.7%—
+ Contextual Embeddings3.7%35%
+ Contextual BM25 (hybrid)2.9%49%
+ Reranking1.9%67%

In the late chunking authors' own experiments (average nDCG@10 over 3 models × 4 BeIR datasets), the gain was modest: 2.7–3.6% relative (1.5–1.9 points absolute). The authors state that it doesn't help on synthetic datasets where a short answer is planted in unrelated text, and that naive chunking with large chunks did better on some reading-comprehension tasks. Treat it as a small gain with no extra LLM calls, not a silver bullet.

The system from this blog's Building a hybrid semantic + keyword search RAG post (Dense + Sparse + RRF, a BGE reranker, contextual chunking) is exactly this "2025-style RAG".

What "RAG is dead" actually rests on

"RAG is dead" comes back every time a longer-context model ships. Read the posts that say it, though, and the target is narrow.

  • LlamaIndex's post is titled "RAG is dead, long live agentic retrieval", but the heading of its conclusion reads "Naive RAG is dead": agentic retrieval strategies are now table stakes. It is a product tutorial with no quantitative evidence.
  • Hamel Husain's series (2025-07) likewise says the thing that deserves criticism is "the oversimplified version from 2023: chuck documents into a vector database, do cosine similarity". Models are frozen at training time, and a million-token window doesn't change the economics of stuffing everything into every query.

So since 2025 the debate has moved from "do we need retrieval?" to "what kind of retrieval, and how smart?"

CAG — preload and cache

What the original paper says

CAG comes from Chan et al., "Don't Do RAG: When Cache-Augmented Generation is All You Need for Knowledge Tasks" (arXiv 2412.15605, v1 2024-12-20, v2 2025-02-23). It appeared as a 5-page short paper in the ACM Web Conference 2025 (WWW '25) Companion.

The paper's definition matches the infographic: preload all relevant material into a long-context LLM, store the resulting KV cache, and answer at inference time without retrieval. The paper's three phases are:

  1. External Knowledge Preloading — run all documents through the model to build the KV cache and store it on disk or in memory
  2. Inference — load the stored cache together with the question and generate an answer
  3. Cache Reset — truncate the tokens the question appended, returning the cache to its initial state

The infographic's 01 and 02 split phase 1 in two, and its 03 "Answer instantly" corresponds to phase 2. Phase 3, Cache Reset, is missing. It's the operational step that keeps the cache from growing with every question, and real implementations need it.

💡 What is a KV cache? As a transformer processes tokens, each layer computes Key and Value tensors. When the same prefix is processed again, reusing those tensors skips that much computation. CAG applies this reuse to the entire set of knowledge documents.

The experiments are narrower than the title

The title says "Don't Do RAG", but the experimental scope is small (arXiv v2 full text, official implementation).

  • Model: Llama 3.1 8B only (up to 128k input tokens). The paper's own introduction cites this model's effective context length as 32K, and the medium and large HotPotQA sets it tested (43k and 85k) are longer than that.
  • Data: corpora of 21k–85k tokens drawn from SQuAD 1.0 and HotPotQA. The full HotPotQA set (7,405 documents, about 10 million tokens) doesn't fit in the window, so only subsets were used.
  • Metric: BERTScore only. No EM or F1.
  • RAG baselines: BM25 (sparse) and OpenAI embeddings (dense) at top-1/3/5/10. No reranker and no hybrid search.

Accuracy: small margins, and a reversal on the largest set

BERTScore from v2 Table 2:

Dataset (size)CAGBest RAG
HotPotQA Small (21k)0.79510.7676 (sparse top-5)
HotPotQA Medium (43k)0.78210.7633
HotPotQA Large (85k)0.74070.7535 (sparse top-5)
SQuAD Large (50k)0.77340.7658

CAG wins most settings, but by 0.01–0.03. On the largest set, HotPotQA Large, it falls below BM25 RAG top-3 and top-5. The authors attribute the shrinking gap to long-context degradation, and concede that sparse beating dense suggests the datasets may not be hard enough.

Latency: "answer instantly" compared to what?

The infographic's "very low latency" is the phrase to be most careful with. Here is v2 Table 3 (HotPotQA, seconds).

SizeCAGWhole documents, no cacheBM25 RAG top-3 (retrieval + generation)
Small (21k)0.859.32~0.74
Medium (43k)1.4126.37~0.72
Large (85k)2.2692.08~0.67
  • The dramatic 10–40× speedups are against feeding the whole documents every time without a KV cache, not against RAG (ratios are my arithmetic from the table).
  • BM25 RAG top-3 is faster than CAG at every size, about 3.4× at Large. The only baseline CAG consistently beats is dense RAG top-10 (about 3 seconds).
  • CAG's own generation time grows with knowledge size: 0.85 → 1.41 → 2.26 seconds.

The abstract's precise wording is that CAG "eliminates retrieval latency". Having no retrieval step is not the same as having the fastest end-to-end response.

The line the authors drew themselves

The paper does not claim to replace RAG outright.

  • Scope: knowledge of "limited and manageable size". The examples are internal knowledge bases of small companies, FAQs, and call centers.
  • Limitations: because every document has to be in the context, it becomes impractical for significantly larger datasets, and performance may degrade with very long contexts.
  • Conclusion: a hybrid that "could preload a foundation context and use retrieval only to augment edge cases or highly specific queries".

The paper also leaves things out. Cache invalidation when documents change, cache staleness, token cost, and API prompt caching do not appear in it. The infographic's "Stable" condition isn't in the abstract either. It follows from the cache being a snapshot of the documents, though, and a follow-up paper (Agrawal et al., 2505.08261) states it outright: a static preload reflects the knowledge base at one point in time, and later updates are invisible until the cache is rebuilt.

Since 2025: "if it fits, it works" is under pressure

CAG's core assumption is that if the knowledge fits in the window, the model will use it well. Research since 2025 attaches conditions to that.

① Context Rot (Chroma, 2025-07-14) — The report evaluated 18 models, including GPT-4.1, Claude 4, Gemini 2.5, and Qwen3. Holding task difficulty fixed and only increasing input length, performance dropped in every experiment.

  • In a LongMemEval-based experiment, focused inputs holding only what was needed (about 300 tokens on average) beat full inputs that included irrelevant chat history (about 113k tokens on average) by a significant margin for every model. The gap remained with thinking mode on.
  • A single distractor — a sentence on the same topic as the answer that isn't the answer — lowered performance, and the effect grew with input length. The more documents you preload, CAG-style, the higher the risk of "similar but wrong" information mixed in.
  • Two caveats. The report did not reproduce a "lost in the middle" position effect (no notable difference across 11 positions), so lumping context rot and lost-in-the-middle together is inaccurate. And its conclusion is not "RAG is better" but "whether relevant information is present matters less than how it is presented". It is also a non-peer-reviewed report from a vector database vendor.

② LaRA (2025-02, independent benchmark) — A benchmark comparing RAG with long context: 2,326 cases, 7 open-source and 4 proprietary models. Its conclusion is in its subtitle: "No Silver Bullet".

  • At 32k, long context averaged 2.4% higher; at 128k it reversed, with RAG 3.68% higher.
  • The weaker the model, the more RAG helps (at 128k, RAG was 38.12% higher for Mistral-Nemo-12B). Models strong at long context, such as GPT-4o and Claude 3.5 Sonnet, generally did better with the full input.
  • Hallucination detection was the only task where RAG clearly won regardless of model size. Long context led on reasoning and comparison.
  • Note that the RAG side was a basic setup: 600-token chunks × 5, no reranking.

③ The Token Tax (2026-06, independent academic case study) — A study comparing RAG and long context on manufacturing safety-training manuals (gpt-5.4-mini/nano, 972 answers).

  • Feeding the whole document every time scored 73.1% correct versus 65.4% for semantic RAG, 7.7 points higher, and the difference was statistically significant (McNemar p=0.0049).
  • But input tokens per query were about 247,754 versus 8,399, roughly 26×. The cost estimate does not include prompt-caching discounts.
  • Latency was 4.69 seconds on average for long context and 5.09–5.40 seconds for RAG, with no significant difference. Neither "more tokens means slower" nor "no retrieval means much faster" held up in this measurement.
  • The authors recommend a hybrid: cheap RAG as the default, with long context reserved for when RAG confidence is low, multi-hop synthesis is needed, or the document set is small enough.

KV cache vs API prompt caching — same principle, different operating conditions

The paper's KV cache assumes self-hosted inference with direct access to the model's internal state; the official implementation saves the KV cache to a file (--kvcache file). For most teams using Claude, GPT, or Gemini through an API, CAG is implemented with prompt caching instead. The principle is the same: the provider reuses the KV tensors of an identical prefix (Lumer et al., 2601.06007). The operating conditions are not.

CAG in the paper (self-hosted)API prompt caching
Cache lifetimeYou manage it; permanent if saved to diskHas a TTL. Claude: 5 minutes by default, 1 hour as a paid option, refreshed on each use. OpenAI: from minutes up to 24 hours
InvalidationRecompute when documents changeAny difference in the prefix, even one character, misses everything after it
CostGPU memory (the size of the cache)On Claude, writes cost 1.25× (5 min) / 2× (1 hour), reads 0.1×. Cache hits aren't free. Gemini's explicit caching adds a storage-time fee
Latency gainSkips prefillOnly time to first token (TTFT) improves. Claude's docs state caching has no effect on output generation
Minimum sizeNonePer-provider/model minimum token counts (e.g. 1,024 tokens)

Sources: Claude prompt caching docs, OpenAI prompt caching guide, Lumer et al., 2601.06007. Prices and TTLs change often, so check the official docs again before adopting.

There is also independent measurement of prompt caching itself. PwC authors' "Don't Break the Cache" (2601.06007, 2026-01, not peer-reviewed) measured agent sessions with a 10,000-token system prompt:

  • Prompt caching cut API cost by 41–80% and improved TTFT by 6–31% (the abstract says 13–31%, but Section 4.1 and the table include Gemini at 6.1%).
  • Savings grew with the size of the cacheable prefix: at a 50,000-token prompt, 89% for GPT-5.2 and 88% for Claude Sonnet 4.5. This is the data point closest to a CAG-style "large, stable prefix".
  • Caching everything was not always faster. With full-context caching, GPT-4o's TTFT got 8.8% worse than no caching, while caching only the system prompt improved it by 30.9%. The authors attribute this to the cost of writing dynamic content that never gets reused. Claude Sonnet 4.5 didn't show the regression, so the effect depends on the provider.
  • The study measured only cost and latency, not answer accuracy.

For reference, Anthropic already advised in September 2024 that "if your knowledge base is smaller than 200,000 tokens (about 500 pages of material), you can just include the entire knowledge base in the prompt" (Contextual Retrieval). An official vendor guide stated CAG's selection rule before the CAG paper did. The same company's prompt caching docs present caching and retrieval as complements, not alternatives: give tools, instructions, and retrieved documents their own cache breakpoints, and you can update the RAG documents without breaking the earlier cache.

KAG — reason over a graph

KAG is a proper noun, not a generic term

The infographic puts KAG next to RAG and CAG as if it were a generic technique. But KAG is the name of a specific framework the Ant Group knowledge graph team (with Zhejiang University) built on the OpenSPG engine (Liang et al., arXiv 2409.13731, 2024-09; OpenSPG/KAG, Apache-2.0). The generic category of "using a knowledge graph to help generation" is usually called GraphRAG, which includes Microsoft GraphRAG, LightRAG, HippoRAG 2, and others. Graph RAG benchmark papers also mention KAG as one method within the GraphRAG family (GraphRAG-Bench, 2506.05690).

So the infographic's KAG column is best read as a mix of "the product called KAG" and "the category called GraphRAG".

The real architecture doesn't use the graph alone

The paper defines KAG by five elements:

  1. LLM-friendly knowledge representation (LLMFriSPG) — a schema aligned with the DIKW hierarchy
  2. Mutual indexing between the graph and source text chunks — graph nodes point to chunks, and chunks point back to the graph
  3. A logical-form-guided hybrid reasoning engine
  4. Knowledge alignment through semantic reasoning
  5. Model capability enhancement for KAG

As modules, it is KAG-Builder (offline index construction) / KAG-Solver (solving) / KAG-Model. The README still says kag-model will be released later.

The infographic's three steps (build a graph → reason step by step → traceable answer) simplify elements 2 and 3. Two things in particular differ.

  • "Walking the graph" isn't the whole story. The Solver uses three kinds of operators — planning, reasoning, and retrieval — to turn a question into a solution process mixing natural language and logical functions. Each step is one of Retrieval (structured + unstructured retrieval), Math (numeric computation), Deduce (inference), or Output, and Math and Deduce are not graph traversal (KAG-Thinker, 2506.17728).
  • It doesn't drop vector retrieval. The paper's stated motivation is to use the strengths of both knowledge graphs and vector retrieval. The infographic's "RAG vs KAG" framing oversimplifies; KAG is closer to a hybrid that contains RAG.

Performance numbers: mostly vendor-reported

F1 from the original paper (DeepSeek-V2 backbone, 1,000 questions each):

DatasetIRCoT + HippoRAGKAGRelative F1 gain
HotpotQA63.776.219.6%
2WikiMultiHopQA57.176.233.5%
MuSiQue36.548.7—

⚠️ The abstract on the arXiv listing page says "19.6% on 2wiki and 33.5% on hotpotQA", with the datasets swapped. The version consistent with the table's arithmetic is the one in the paper body (HotpotQA 19.6%, 2Wiki 33.5%). The body's "F1 improvements of 12.5%, 19.1%, 12.2%" are absolute point differences, not relative gains.

The vendor's own 2025 release-note benchmark (10k documents and 1k questions provided by HippoRAG, Qwen2.5-72B, bge-m3) looks like this (KAG 0.8 release notes, 2025-06-27).

EM / F1Naive RAGHippoRAG 2PIKE-RAGKAG-V0.8
MuSiQue0.248 / 0.3570.289 / 0.4040.383 / 0.4980.432 / 0.569
2Wiki0.448 / 0.5120.542 / 0.6180.630 / 0.7200.692 / 0.784
HotpotQA0.566 / 0.7040.557 / 0.6940.558 / 0.6860.625 / 0.772

Note that on HotpotQA, Naive RAG beats the graph-based HippoRAG 2 and PIKE-RAG on EM and F1. Graph methods don't always beat plain RAG. Microsoft GraphRAG and LightRAG are not in this table.

There are also Ant Group's internal production numbers. On e-government Q&A (492 samples), NaiveRAG had precision 66.5 / recall 52.6 versus KAG at 91.6 / 71.8. Precision rose sharply, but recall is around 70%, so "greatly reduces wrong answers" is more accurate than "solves professional-domain Q&A".

KAG since 2025

VersionDateHighlights
v0.62025-01-07Domain knowledge injection, schema customization, summarization tasks
v0.72025-04-17Framework refactor, static/iterative planning, MCP compatibility, lightweight construction mode
v0.8.02025-06-27KAG-Thinker model adaptation, full MCP support, multiple index types
  • Lightweight construction (v0.7): The KAG team itself calls graph construction cost "the community's biggest concern". A new mode builds with a 7B model and answers with a 72B model; it cut the token cost of constructing a 100,000-character document from ¥4.63 to ¥0.479 (89%), with accuracy dropping 1.2–3.1% depending on the benchmark (vendor-measured).
  • Multiple indexes (v0.8): Instead of a single knowledge graph, KAG now chooses among KnowledgeUnit (an enhanced graph triple), Outline, Summary, Chunk, AtomicQuery, Table, and other index types. The release notes describe choosing an index type as a trade-off between construction cost and effectiveness. That's much broader than the infographic's single line "Build a knowledge graph".
  • KAG-Thinker (2025-06): Extends KAG into a multi-turn thinking framework, with a small dedicated LLM (7B) handling question decomposition and solving. Across 7 QA benchmarks it reports average EM 4.1 points above the previous best trained search model (ReSearch) — author-reported, and the training data overlaps two of the test benchmarks. The paper itself says that switching to the 7B Thinker improves stability but lowers average accuracy versus the 72B planner, and that Math and Deduce execution still relies on the 72B model.
  • As of 2026-12-05 on GitHub, the latest tagged release is still v0.8.0. Commits continue, but there has been no new tag for nearly a year and a half, so check the maintenance status before adopting it.

What independent benchmarks say about graph RAG

I couldn't find an independent benchmark that includes KAG itself. But two 2025 studies comparing the GraphRAG category as a whole are good yardsticks for reading the KAG column.

① RAG vs. GraphRAG: A Systematic Evaluation (Han et al., 2502.11371, KDD '26)

  • A complementary relationship with no universal winner. RAG is better on single-hop and detail-oriented factual queries, GraphRAG on multi-hop and reasoning-heavy ones. The gaps are a few points.
  • Extracted graphs are incomplete. Only 65.8% (HotpotQA) and 65.5% (NQ) of answer entities appeared in the LLM-built graph. Retrieving from triples alone cut F1 to about half of RAG's (HotpotQA 25.02 vs 60.04). The biggest pitfall hidden behind "Build a knowledge graph" is missed extractions.
  • Construction cost: On MultiHop-RAG, construction took 135 seconds for RAG versus 7,702 seconds for KG-GraphRAG (about 57×). Performance is sensitive to the model that builds the graph (no graph 65.77 → built with GPT-4o-mini 71.17 → built with GPT-4o 75.08), so higher quality costs more.
  • Graph summarization (Community-GraphRAG Global) scored 19.27% on queries whose correct answer is "insufficient information" (RAG: 96.01%). Losing fine-grained evidence increases hallucination.

② When to use Graphs in RAG / GraphRAG-Bench (Xiang et al., 2506.05690)

  • On simple fact retrieval, basic RAG (with reranking) matches or beats graph methods. On the Novel dataset: RAG 60.92 vs MS-GraphRAG 49.29, LightRAG 58.62, HippoRAG2 60.14.
  • Graphs lead on complex reasoning, but unevenly. On Novel, HippoRAG2 scored 53.38 vs RAG 42.93, a clear gap; on Medical the gap was about 3 points, and MS-GraphRAG and others actually scored below RAG.
  • Token bloat: average prompt tokens per query were 879 for vector RAG, 1,008 for HippoRAG2, and 38,707 for MS-GraphRAG (local).
  • Indexing cost: indexing one book of about 56k tokens took MS-GraphRAG about 650k tokens and HippoRAG2 about 330k tokens (with GPT-4o-mini).

The conditions on "Traceable answer"

Because KAG's solution process is recorded as logical forms, it is genuinely easier to trace which step relied on what. But traceable doesn't mean correct. Section 6 of the paper lists these limitations itself:

  • Both construction and solving need multiple LLM calls, and because the planning stage outputs logical functions as well as sub-questions, it generates about twice the tokens of simple decomposition.
  • OpenIE lowers the bar for graph construction but makes knowledge alignment harder; expert-schema extraction is rigorous but labor-intensive. Wrongly extracted knowledge turns straight into wrong answers.

What the infographic leaves out

ApproachInfographic wordingMissing condition or pitfallEvidence
RAGChunk & embedChunks lose context; Contextual Retrieval and late chunking address itAnthropic, Jina AI
RAGRetrieve top matchesVector top-k alone isn't enough; hybrid + reranking is the production defaultAnthropic, LlamaIndex
RAG(multi-hop)Weakest on comparison questions that need several distant chunksLaRA
CAGSmall enough to fitEven when it fits, quality drops as it grows; a single distractor hurtsChroma, the CAG paper itself
CAGSave the KV cacheAPIs have a TTL; any prefix change misses the whole cache; write premiumClaude and OpenAI docs
CAGAnswer instantlyThe big speedup is versus uncached full input; slower than BM25 RAGCAG paper Table 3
CAG(three steps)The Cache Reset step is missingCAG paper
CAG(cost)Per-query token cost scales with what you preload; about 26× RAG without cachingToken Tax
KAG(the name)A specific Ant Group framework, not a category; the category is GraphRAGKAG paper, GitHub
KAGBuild a knowledge graphConstruction cost (tens of times RAG's time), missed extractions (only ~65% of answer entities present), schema laborRAG vs GraphRAG, KAG paper
KAGReason step by stepNot just graph traversal: a hybrid of vector retrieval, computation, and inferenceKAG paper, KAG-Thinker
KAGTraceable answerTraceable ≠ correct; most numbers are vendor-reportedKAG paper Section 6

Which one, when?

Turned into practical questions, the infographic's "Search it · Preload it · Reason over it" looks like this.

QuestionLeans RAGLeans CAG (prompt caching)Leans GraphRAG/KAG
Knowledge sizeLarger than the context windowFits comfortably in part of the window (Anthropic's guide: under 200k tokens)Structure matters more than size
Change rateChanges often (incremental indexing)Rarely changes (rewrite the cache when it does)Changes occasionally (accept rebuild cost)
Question typeSingle facts, detail lookupSummaries and comparisons across whole documentsMulti-hop across entities
LatencyAdds a retrieval stepShorter TTFT on a cache hitLongest, from planning and repeated calls
CostLow per query, cheap indexingPer query, scales with preloaded size (cache reads are billed)Highest construction cost
ExplainabilityCite the retrieved chunksUnclear which part the answer relied onSolution steps recorded as logical forms
Model dependenceHelps even weak models a lotNeeds a model strong at long contextNeeds a large model good at planning

As a decision flow:

Does the knowledge fit comfortably in the context window? (tens of thousands of tokens)
├─ Yes → Does it change often?
│        ├─ No  → Load it all and use prompt caching (CAG)
│        │        └─ Answers wobble? → Insert only the relevant parts (counter context rot)
│        └─ Yes → Cache the stable part + retrieve the changing part (hybrid)
└─ No  → Default to hybrid search + reranking RAG
         └─ Many multi-hop / relationship questions, and accuracy matters more than cost?
             ├─ Yes → Add a graph index (GraphRAG / KAG)
             └─ No  → Invest in better RAG first (Contextual Retrieval, agentic retrieval)

Patterns for combining them

The evidence since 2025 points one way: this isn't a matter of picking one of three, but of combining them.

① Cache + retrieval — the most common pattern, with the most evidence.

  • The CAG paper's conclusion: preload a foundation context and use retrieval only for edge cases.
  • Anthropic's prompt caching docs: give tools, instructions, and retrieved documents separate cache breakpoints (up to 4), so changing the RAG documents keeps the earlier cache intact.
  • The Token Tax paper: cheap RAG by default, long context only when confidence is low or multi-hop synthesis is needed.
  • The simplest production form is caching the system prompt plus shared product knowledge (tens of thousands of tokens) and appending only question-specific retrieved details after it. As "Don't Break the Cache" showed, caching only the stable prefix gave the most consistent benefit.

② Graph + vector — KAG itself is this pattern.

  • KAG cross-indexes the graph with the source chunks and chooses graph or text retrieval at each solving step.
  • The RAG vs GraphRAG paper compared two hybrid strategies: Selection (+1.1%), which classifies the query and sends it one way, and Integration (+6.4%), which merges both sides' results (MultiHop-RAG, Llama 3.1-70B, versus the best baseline). Integration does better but has to run both pipelines on every query.
  • A practical GraphRAG study (Min et al., 2507.03226) fuses vector similarity with 1-hop graph traversal via RRF, and extracts triples with dependency parsing instead of an LLM, reporting 94% of GPT-4o-based construction performance (61.87% vs 65.83%). This is a single-domain result (ABAP code migration).

③ Routing — send each question down a different path.

  • That's why LaRA's subtitle is "No Silver Bullet for LC or RAG Routing": the answer depends on the model, context length, and task type, so you have to choose per query.
  • LlamaIndex's auto_routed mode uses a lightweight agent to pick chunk retrieval, whole-file retrieval, or metadata-based retrieval for each query.

This blog's LLM Wiki post sits in the same space: instead of searching the raw sources every time, the LLM organizes the knowledge into a wiki ahead of time (close to preloading), and can extend it into a knowledge graph (the graph side).

Wrapping up

The infographic's three-line summary is a good map for first thinking about how to get knowledge into the context. Checked against the original papers and research since 2025, though, it needs three additions.

First, the benefit claims hide their comparison baselines. CAG's "Answer instantly" is relative to uncached full input, not to RAG, and KAG's "Traceable" doesn't mean correct. When you cite a number, check what it was compared against and who measured it.

Second, "it fits in the window" and "the model uses it well" are different things. All 18 models got worse as input grew, and at 128k RAG overtook long context. The bigger context windows get, the more choosing what to put in them matters.

Third, the three are parts, not rivals. The CAG paper's conclusion proposes mixing in retrieval, KAG is built as a graph + vector hybrid, and every independent benchmark says there is no universal winner.

Checklist before adopting:

  • ✅ Have you actually counted the tokens in your knowledge base? (Under 200k tokens, try loading it all first)
  • ✅ If you use RAG, does it include hybrid search, reranking, and chunk context enrichment?
  • ✅ If you use prompt caching, is the order stable content first, changing content last?
  • ✅ Have you priced in cache TTLs, write premiums, and minimum token counts?
  • ✅ Have you compared accuracy with the long context versus only the relevant parts on your own data?
  • ✅ Before adding a graph, have you weighed the share of multi-hop questions against graph construction and maintenance cost?
  • ✅ Have you separated vendor-reported numbers from independent benchmarks in what you cite?

References

Infographic

  • GenAI.works, "RAG vs CAG vs KAG — How LLMs use knowledge they were never trained on" (infographic)

Original papers

Papers since 2025

Official docs · engineering blogs

Earlier posts