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
If answers are scattered across many documents, start by evaluating RAG, which retrieves evidence for each question. CAG is worth testing when a small, stable knowledge set fits in context. KAG may suit questions that require following relationships and rules across several steps. These are KrobClick's criteria for choosing what to test, not a ranking. The approaches can work together, and none guarantees correct answers.
For a closer look at splitting documents and retrieving them before answering, read What Is RAG? Check Retrieval before Trusting AI Answers For the choice between supplying information and changing model behavior, read 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
RAG means Retrieval-Augmented Generation: retrieve information, then give relevant passages to the model as it answers. Many systems split documents into chunks, create embeddings and search a vector index. Keyword search, hybrid search and metadata filters are also options. RAG does not require one particular vector database.
You need not put the whole library into every request. But the number of documents a system can handle depends on its index, infrastructure and workload. Freshness depends on adding new documents and removing old ones promptly. If a manual changes but the index does not, the answer may still come from the old version.
When an answer is wrong, trace the path: did retrieval find the right document? Did the selected chunk include its conditions? Did the model interpret it correctly? Check the information flow before blaming the model alone.
CAG: Prepare reading state for reuse without creating permanent model memory
In the paper by Chan et al., CAG (Cache-Augmented Generation) starts with a knowledge set that fits in the context window. The model processes it in advance and stores a KV cache or computation state for subsequent questions. This removes retrieval from the question-time path; it does not permanently train the knowledge into the model's weights.
Without a retrieval step, there is no question-time ranking error. The model can still misread context, miss conditions or claim more than the evidence supports. Fitting all the documents into the context window does not mean the model uses every part well; space is also needed for the question, history and answer.
The cache has an upfront creation cost. When documents change, the reusable state must change too; users with different permissions must not share a cache containing material they cannot access. To compare speed, measure preparation, reuse and updates, not just the response time of a warm cache.
The study's results concern its selected datasets and models, not every document system. A service's prompt caching feature may also work differently from the CAG implementation in the paper; check the system you intend to use.
KAG: Use relationships with text search and calculations.
OpenSPG's KAG (Knowledge Augmented Generation) connects source text to a knowledge graph and plans the solution as a logical form. Steps can include text retrieval, following relationships, language-based reasoning and calculation. It does more than traverse a graph, and it can still use vector retrieval.
Consider two legal entities with the same company name, or a rule that applies only during certain dates. A graph with typed relationships and supporting evidence can help trace those conditions. But an incorrectly extracted name, a wrong relationship or an expired rule can still produce a convincing-looking wrong answer.
KAG Research reports results on specific tests and use cases. They do not establish that this is the best approach for every medical, legal or financial task. Even when citations are traceable, a specialist must check the source, the dates when rules apply and the conclusion.
One hypothetical task reveals different costs
Suppose a support team uses Thai-language manuals to answer: 'Which documents does this request need, who approves it, and which policy version applies?' This is KrobClick's hypothetical exercise. We have 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 with department, date, and permission filters before searching, then check that the withdrawn version no longer appears.
- 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.
The same workflow could retrieve the current manual with RAG, check the approval chain through a graph and cache the instructions that seldom change. You do not have to choose just one method.
Measure answer quality and cost before choosing an approach
Before choosing, test the same human-checked questions and answers across approaches. Include answerable questions, ones requiring several sources, missing information, conflicting documents and access restrictions. Keep the model and document versions as similar as possible. Record answers, evidence, index or cache versions and setup costs; otherwise differences in the data may masquerade as differences in architecture.
- 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
When an answer fails, determine whether retrieval, reading the context or a graph relationship caused it before adding complexity. Check that the system uses the right version, can trace its evidence and is affordable to maintain.
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.