AI architecture

CAG vs RAG: Does AI Need to Search?

Compare CAG vs RAG for a business knowledge assistant, weighing document size, update frequency, retrieval quality and total operating costs.
By MR Solutions
7 min readPublished
Two chatbots: RAG retrieves selected documents from an external library, while CAG uses a preloaded knowledge cache.

Start with the knowledge you need

An internal AI assistant may need to explain one approved product handbook, or find answers across a growing library of procedures and project documents. Those are different information problems. Choosing an architecture before understanding the collection can leave you maintaining a search system you barely need, or repeatedly rebuilding a context that changes every day.

The useful question in CAG vs RAG is whether the assistant can work from a complete, reusable knowledge snapshot, or needs to select evidence for each question. Start with the collection’s size, how often it changes and how many questions reuse the same material. The two scenarios below are illustrative decision aids, not client case studies.

What CAG and RAG actually do

Retrieval-augmented generation (RAG) selects external material in response to an input and uses it during generation. Patrick Lewis and colleagues’ foundational paper, first submitted in May 2020 and revised in April 2021, combined a neural retriever, a Wikipedia passage index and a sequence-to-sequence generator. It establishes the retrieval-and-generation mechanism; it is not a specification for every business assistant built today.

Cache-augmented generation (CAG), as described by Brian J Chan and colleagues in the February 2025 revision of their paper, preloads a curated knowledge collection into a model’s context. It computes and stores a key-value, or KV, cache: the model’s inference state for that material. Subsequent questions reuse that state without a document retrieval step.

This is different from storing finished answers to common questions. The model still generates an answer to each new question using the preloaded knowledge. For a proposed implementation, ask exactly what is cached, how it is reused and what invalidates it. Do not assume that a service with a feature called caching implements the paper’s workflow.

Scenario one: a stable product handbook

Imagine a support team repeatedly asking questions about one approved product handbook. Everyone using this assistant is authorised to read the same edition, and updates arrive as controlled releases. This is a sensible candidate for a CAG prototype if the complete relevant material fits within the chosen model’s usable context.

The attraction is straightforward: preload the approved edition and reuse it across questions. There is no query-time retriever to miss an important exception or select the wrong passage. That removes one failure point, but does not prove that the model will interpret every rule correctly.

Treat the context budget as a design constraint. Count the prepared source text alongside instructions, the question, any retained conversation and room for the answer. Then test questions whose evidence appears in different parts of the handbook. Fitting inside a stated context limit is only the first check; reliable use of the information is the acceptance test.

Scenario two: a changing document library

Now imagine an operations library with frequently revised procedures, many unrelated subjects and different access permissions. A retrieval-led prototype is a more useful starting point when the whole authorised collection cannot practically be preloaded, or each question needs only a small part of it. This is an architectural judgement to test against your own workload.

Retrieval moves the selection problem into the search pipeline. Include realistic wording, abbreviations and questions requiring evidence from more than one document in the evaluation. Inspect whether the necessary passages reach the generator before judging the final answer.

Searching for every question does not make the underlying index current. Define how approved changes, withdrawals and permission changes reach the assistant. Require a way to identify the document version supporting an answer and test that withdrawn material stops being used. Those are implementation requirements for either architecture.

Make snapshot ownership explicit

For a CAG prototype, define which document edition each cached context represents and how a replacement becomes active. When source material changes, test the necessary rebuild or invalidation process and its cost. Do not confuse this with the paper’s cache reset: that reset removes appended question tokens so the original preloaded context can be reused; it does not refresh the source documents.

For a RAG prototype, define an equivalent process for updating the searchable collection and removing old versions. Assign an owner to failures in that process. A correct answer from yesterday’s policy can still be the wrong answer for today’s business.

Keep access boundaries explicit in the design. Only supply material the user is authorised to access, whether through a preloaded context or retrieval. Test a permission withdrawal as well as a document edit; choosing an architecture does not settle that behaviour.

Compare the whole operating cost

The CAG paper is useful evidence for testing a retrieval-free design, not a promise of lower costs or faster answers in your business. Its experiments used Llama 3.1 8B on SQuAD and HotPotQA subsets with reference texts of roughly 21,000–85,000 tokens. Its reported quality metric was BERTScore, which compares generated and reference answers; it was not a business acceptance assessment.

The timing results also need care. Removing retrieval did not make CAG the fastest option in every reported comparison: some sparse RAG configurations had lower combined retrieval and generation times. The paper does not establish a universal speed or total-cost advantage.

Build a cost comparison for an agreed operating period. For CAG, include preparing and rebuilding the cached context, retaining or loading it, generation and maintenance. For RAG, include document processing, indexing, retrieval, generation and maintenance. Use the actual implementation’s billing or infrastructure measurements, including retries and failed answers.

Repeated use of an unchanged snapshot is a reason to investigate whether preparation costs can be spread across many questions. Frequent rebuilds or little reuse may change that calculation. Treat both statements as cost hypotheses to measure, not savings already achieved.

Run a comparison that can change the choice

Before building the full assistant, assemble a shared test set from representative business questions and approved source versions. Record the expected evidence and acceptable answer for each question. Use comparable model and generation settings where practical, and explain any differences that could affect the comparison.

Set the acceptance criteria before seeing the results. The following checks are a proposed evaluation plan; no measurements have been completed for the illustrative scenarios.

  • Quality: check factual correctness, important exceptions and whether cited passages actually support each answer.
  • Coverage: include straightforward questions, evidence spread across documents and questions the collection cannot answer.
  • Freshness: change a document, withdraw an old version and measure when answers reflect the approved replacement.
  • Access: verify that restricted material stays unavailable and that permission changes take effect.
  • Performance: measure time to a usable answer under both first-use and reused-context conditions, including concurrent demand.
  • Cost and recovery: count preparation, updates, storage, queries and retries; test behaviour when the cache or retrieval service is unavailable.

Choose a boundary you can maintain

Start by testing CAG when a complete, authorised collection is manageable, stable and reused often. Start by testing RAG when selecting from a larger or changing collection is central to the task. Neither choice removes the need to verify answers and keep source versions under control.

A hybrid is also a candidate: preload stable core guidance and retrieve changing or specialist material. The CAG paper explicitly discusses this possibility. Before adopting it, define which source wins when the two disagree and test the extra complexity.

The practical deliverable is a short decision record: the collection and access boundary, update process, measured quality, response times and full operating cost. Choose the simplest design that meets those agreed requirements, then revisit it when the knowledge collection or usage pattern changes.

← Back to the article library

Start with a conversation

Put your ideas into practice.

Tell us about your business and what you want to improve. We’ll help you find a sensible place to start.

Discuss Your Project