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.

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
| Approach | What to prepare | When a question arrives | Main costs and maintenance |
|---|---|---|---|
| RAG | Content and search indexes | Find relevant evidence then create an answer | Search quality, index updates and document rights |
| CAG following the work of Chan et al. | Document set in context and KV cache | Use prepared state alongside the question | Long context, memory, cache creation and replacement |
| OpenSPG's KAG | Knowledge graph connected to text and index | Plan, retrieve, and solve problems using multiple operators | Define 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.
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.
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.
- A short, stable manual available equally to everyone: Try sending the entire context as a base first, then evaluate the CAG if there are duplicate queries and the system supports state reuse.
- Manuals for many departments, frequently updated, and with different permissions: Try RAG, which filters departments, dates, and permissions before searching. Ready to check that the canceled version has been removed.
- Must connect requests, agencies, approvers, and conditions according to date: Consider KAG when there is reason to invest in relationship management. And there is someone who checks that the graph and rules match the actual document.
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.
- Check the facts in the answers and compare them with the originals. Including missing conditions and answers beyond the evidence.
- Open the actual references; distinguish having a link from having a link that supports the claim
- Measure data preparation, time to first response, and completion time; separate first runs from repeat use
- Change one document and check that answers update, including resulting costs and maintenance
- 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
- Lewis et al.: Retrieval-Augmented Generation
- Chan et al.: Don’t Do RAG — Cache-Augmented Generation
- CAG: source code and diagram
- Liang et al.: KAG — Knowledge Augmented Generation
- OpenSPG: KAG framework
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.