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
- 01
Load documents before building retrieval: in published experiments, long context often outperformed RAG 1.
- 02
Caching makes it cheap: about 10% of the price on repeat calls 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.
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.”
“CAG greatly reduces generation time by eliminating retrieval overhead”
Five hints: the average fund and full power
| The average fund | Full power | |
|---|---|---|
| 01 | Builds a vector database first | Loads the data room and caches it |
| 02 | Fine-tunes models | Writes skills |
| 03 | Trusts retrieval silently | Tests retrieval misses |
| 04 | Loads everything at once | Splits large rooms by workstream |
| 05 | Uses AI for arithmetic | Uses 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
- Does our largest recent data room fit in our assistant's context?
- Where are we paying for retrieval we do not need?
- Is prompt caching switched on for repeated work?
- Which archive would truly benefit from search?
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.
Sources
Figures as published at the dates shown. Vendor-reported figures are labelled; [E] marks a CarveLines estimate.
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.