Back to the Academy

Building it right · Module 17

RAG, CAG and data-science tools

RAG, CAG and long context: use the simplest thing that works

Key message

Use the simplest architecture that works: load and cache documents first, retrieval only for large archives.

Three things to know

  1. 01

    Load documents before building retrieval: in published experiments, long context often outperformed RAG 1.

  2. 02

    Caching makes it cheap: about 10% of the price on repeat calls 3.

  3. 03

    Keep RAG for large, changing archives, and code for numbers.

  • 4K → 10Mtokens of context, GPT-3.5 to Llama 4 Scout 1
  • ~10%price of cached tokens on repeat calls 3
  • 0.6–2 sRAG latency in one practitioner's estimates 3
  • 80/20common split: CAG for bounded docs, RAG for the long tail 3

The evidence

Retrieval pipelines were essential when models read 4,000 tokens. With windows of millions, many fund use cases no longer need them.

Exhibit 1 Indicative end-to-end latency, ms (one practitioner's production estimates; varies by setup)
RAG2,000 msCAG, cold500 msCAG, warm cache200 ms
Production estimates: RAG 600 ms to 2 s; CAG 200–500 ms, under 200 ms warm. Source 3.
Exhibit 2 Which approach for which job (CarveLines view; dots = fit of the simplest option)
JobBest approachSimplicityOne data roomLong context, cachedCIM and appendicesLong contextSector libraryLong context or CAGAll past IC memosRAG or managed searchYears of newsRAG with datesNumbers in ExcelCode, not retrieval
CarveLines view, consistent with 13.

Three ways to give a model your documents

RAG (retrieval-augmented generation) cuts documents into pieces, indexes them and retrieves the most relevant pieces at query time. Long context loads the whole set into the prompt.

CAG (cache-augmented generation) loads it and caches it, so repeat questions are fast and cheap 13.

When RAG is useful

Very large or changing collections: every past IC memo, years of news, a library of expert-call transcripts, a CRM. Cases where freshness matters or the corpus far exceeds any context window.

RAG fails when retrieval misses the right passage: the model then answers confidently from the wrong pieces 2.

When it is useless complexity

A data room for one deal, a CIM and its appendices, a sector library of a few hundred pages: load them. Google researchers found long context consistently outperforms RAG when resources allow; a 2024 paper is simply titled “Don't do RAG” 1.

Fewer moving parts means fewer silent errors and less maintenance.

Other data-science tools

Fine-tuning rarely pays for a fund: methods change faster than training cycles, and skills deliver most of the benefit. Vector databases, knowledge graphs and custom embeddings belong to firms with an engineering team and a large, stable corpus.

For most funds: long context and caching for deal work, managed search for the archive, and spreadsheets checked by code for numbers.

Context rot still applies

Big windows are not unlimited attention. Recall falls as context fills (see No. 15). Load what the task needs, not everything available, and put the most important documents first.

When a data room exceeds the window, split by workstream rather than by page: one context for commercial, one for legal, one for financial.

“So which method should you use? It's dependent on your use case, but I think CAG makes for a good starting point because of its simplicity.”

Dan Cleary, founder, PromptHub Apr 2025 1

“CAG greatly reduces generation time by eliminating retrieval overhead”

Authors of “Don't Do RAG”, arXiv 2412.15605 Dec 2024 1

Five hints: the average fund and full power

The average fundFull power
01Builds a vector database firstLoads the data room and caches it
02Fine-tunes modelsWrites skills
03Trusts retrieval silentlyTests retrieval misses
04Loads everything at onceSplits large rooms by workstream
05Uses AI for arithmeticUses code for every number

Before you act

Watch out

Building a vector database as the first AI project. It looks like progress, takes months and often answers worse than loading the documents.

Questions for the partners’ meeting

  1. Does our largest recent data room fit in our assistant's context?
  2. Where are we paying for retrieval we do not need?
  3. Is prompt caching switched on for repeated work?
  4. Which archive would truly benefit from search?
On Monday morning

Take your largest recent data room. Check whether it fits in your assistant's context window. If it does, compare answers with and without your retrieval tool on ten questions.

Put it to work on a live question

One company or one sector, one precise question, public data first. A sourced fact base and a short memo within days.