RAG vs. CAG vs. KAG: Evidence, Context, and Relationships

When AI answers from organizational knowledge, should we retrieve documents each time, preload them, or structure knowledge as a graph? Each approach has different costs and failure modes. Start with the nature of the data and the questions to answer.

A document archive, pre-opened files, and linked information cards represent retrieval, preloading, and knowledge relationships

Choose RAG, CAG, or KAG based on the data and evidence you need

RAG is a good start to consider when data from a corpus needs to be selected, CAG is worth experimenting with when the knowledge set is stable and can be put in context, and KAG is worth considering when questions require connections or multistep rules. KrobClick suggests choosing by task rather than ranking these methods. None guarantees correct answers, and real systems may combine them.

If document splitting, indexing, and retrieval before answering are unfamiliar, read What Is RAG? Check Retrieval before Trusting AI Answers First, the difference between adding data and adjusting model behavior is in RAG and Fine-tuning

ApproachWhat to prepareWhen a question arrivesMain costs and maintenance
RAGContent and search indexesFind relevant evidence then create an answerSearch quality, index updates and document rights
CAG following the work of Chan et al.Document set in context and KV cacheUse prepared state alongside the questionLong context, memory, cache creation and replacement
OpenSPG's KAGKnowledge graph connected to text and indexPlan, retrieve, and solve problems using multiple operatorsDefine relationships, extract data, and check logic.

RAG: Retrieve information at query time, using more than just vectors if needed

Retrieval-Augmented Generation uses searched data to enhance answer generation. Common systems divide documents into sections, perform embedding, and search for similarities through vector indexes. But exact word search, combination methods, or metadata filtering can be used. Therefore, it should not be stated that every RAG system must have a single vector database format.

RAG sends selected retrieved evidence rather than the full document collection with every request. Supporting many documents still requires validation of indexing, infrastructure, and real workloads. “Current information” depends on timely ingestion and removal of outdated documents; an unchanged index can still answer from an old manual.

Check whether retrieval finds the correct evidence with all necessary conditions. Errors may arise in retrieval, chunking, or generation; inspect each stage before attributing them to the model.

CAG: Prepare reading state for reuse without creating permanent model memory

Cache-Augmented Generation in Chan et al. Choose a manageable knowledge set that fits the context window, let the model preprocess it, then retain KV cache an intermediate computational state for later questions. This removes query-time document retrieval, but does not alter model weights to store information permanently.

Researcher diagram comparing RAG through an IR Model with CAG preparing a Knowledge Cache before questions arrive
Original CAG-team diagram: the top uses an IR Model to retrieve at query time; the bottom prepares knowledge ahead of time. Pink marks inference-time work. It does not explain KAG or measure KrobClick performance. Source: hhhuang/CAG © 2024 Hen-Hsen Huang, Brian J Chan, Chao-Ting Chen and Jui-Hung Cheng used as MIT License Resized and converted to WebP without editing text. Open full size to read labels.

Without retrieval, that turn has no search-ranking errors, but it may still misread context, miss conditions, or answer beyond the data. Even when everything fits in the context window, the model may use some portions poorly. Reserve space for questions, history, and the answer too.

Cache preparation costs time and resources. Document changes require refreshed reusable state, and caches must respect each user’s access rights. Measure preparation, reuse, and update runs separately before claiming fast responses.

Research experiments with specified data sets and models. This does not prove that every document system should stop using RAG. Services that are called prompt caching may have different rules than the original CAG code. The mechanics and limitations of the actual system that will be used must be examined.

KAG: Use relationships with text search and calculations.

OpenSPG's Knowledge Augmented Generation connects knowledge graphs and source text, guided by a problem-solving plan or logical form. Plans may call text retrieval, relationship search, linguistic reasoning, and calculations. It is more than traversing graph nodes and does not eliminate vector search.

The KAG architecture prepares indexes and a knowledge base on the left, connected to a logical form solver that plans, retrieves, reasons, and generates answers on the right
OpenSPG diagram: the left prepares the knowledge base; the right combines Planning, Retrieval & Reasoning, and Generation, covering retrieval and reasoning. This describes the project's architecture, not proof that every answer step is correct. Source: OpenSPG / KAG Used according to Apache License 2.0 Converted PNG to WebP while preserving dimensions and text. Open full size to read labels.

Graphs identify entities and relationships, including identical company names referring to different legal entities or time-limited conditions. Typed, evidenced links enable systematic checks. Incorrect extraction, reversed relationships, or outdated rules can still produce wrong answers despite structured reasoning.

KAG Research reports results for specific datasets and use cases, not proof of superiority in every medical, legal, or financial setting. Traceable references do not establish correct data or conclusions. Experts still need to check sources, effective dates, and task suitability.

One hypothetical task reveals different costs

Suppose a support department has Thai manuals and needs to answer, “What documents does this request require, who approves it, and which policy version applies?” KrobClick uses this as an exercise and has not built or tested the example system.

One organization may combine methods, such as retrieving current manuals, using a graph to check approval chains, and caching fixed instructions. Each can serve the part of the task it suits.

Measure answer quality and cost before choosing an approach

Use a shared question set with human-reviewed answers, including answerable cases, multi-source reasoning, missing data, conflicting documents, and denied access. Keep model and document versions consistent where possible. Record answers, evidence, index/cache versions, and setup costs so data differences do not become architecture scores.

  1. Check the facts in the answers and compare them with the originals. Including missing conditions and answers beyond the evidence.
  2. Open the actual references; distinguish having a link from having a link that supports the claim
  3. Measure data preparation, time to first response, and completion time; separate first runs from repeat use
  4. Change one document and check that answers update, including resulting costs and maintenance
  5. Test unauthorized-access attempts and unanswerable questions; the system should refuse or explain limits without disclosing prohibited data

If it is unclear whether an error comes from retrieval, context, or relationships, collect evidence to isolate the cause before adding a more complex system. Check whether it uses the correct document version, how well answers can be traced, and whether its maintenance needs are manageable.

Research and original projects

Sources reviewed October 18, 2026, Thailand time. Based on research and documentation, not KrobClick benchmarks. Organizations are hypothetical. CAG and KAG follow the cited papers' definitions, not every similarly named product.