TL;DR
- RAG took off because early models had small context windows (4K to 32K tokens), expensive tokens, and no knowledge of your private data. Retrieving a few relevant chunks was the only practical option.
- In production, the classic pipeline proved fragile: chunking breaks documents apart, embedding similarity is not the same as relevance, and every stage (chunk size, embeddings, top-k, reranker) needs tuning and re-indexing.
- Three shifts reduced the need for it: context windows of hundreds of thousands to millions of tokens, prompt caching that makes reusing a large context cheap, and models that reliably use tools to search, open files, and query databases themselves.
- What remains is retrieval as a tool, not a pipeline. Put the corpus in context when it fits; let an agent search when it doesn't; keep vector search for very large corpora, strict latency budgets, or very high volume.
Chunk everything, embed it, stuff the top-k chunks into the prompt
Full context when it fits, agentic search when it doesn't, vector retrieval only where scale demands it
Why RAG became the default
In 2023 the problem was simple to state: the model knows nothing about your company, and you can only show it a few pages at a time. RAG solved both.
4K–32K tokens ≈ 6–50 pagesA product manual or contract set didn't fit. Something had to choose which few paragraphs the model would see.
re-sending the docs on every callEven when documents fit, paying to send all of them on every request was too costly. Sending five chunks was far cheaper.
“What's our refund policy?”Models were trained on public data up to a fixed date. Retrieval was the cheapest way to add fresh or internal knowledge without fine-tuning.
answer + [source: policy.pdf p.4]Answering from retrieved text reduced hallucination and let users check the source. Compliance teams liked that.
The recipe was easy to demo: split documents into chunks of a few hundred tokens, turn each chunk into an embedding vector, store the vectors in a vector database, and at question time pull the top few most similar chunks into the prompt. Frameworks and vector databases made it a weekend project, so it became the default architecture for 'chat with your data'.
Where classic RAG fails in production
The demo worked on ten documents. Real corpora and real questions exposed the weak points.
A clause says “the above exclusions do not apply in California”. The chunk that holds it doesn't include the exclusions.
Give the model whole documents or sections, or let it open the surrounding text when it needs more.
“What did we decide about pricing?” retrieves every chunk that mentions pricing, but not the meeting note that holds the decision.
Combine keyword search, metadata filters, and multi-step lookups, so the model can refine its search like a person would.
Top-k returns the wrong chunks, and the model answers confidently from them anyway.
Let the model see what it found, decide it isn't enough, and search again with a better query.
“Which contracts renew this quarter?” needs every contract. Five chunks can't answer it.
Use structured queries (SQL, metadata) for aggregate questions, or put the whole set in context.
Chunk size, overlap, embedding model, top-k, and reranker all interact. Changing the embedding model means re-indexing everything.
Fewer moving parts: search tools over the source of truth, so there is no separate index to keep in sync.
The vector store is a copy. It lags behind edits and ignores the source system's permissions.
Query live systems through connectors (for example MCP servers) that enforce the user's own permissions.
Three shifts that changed the math
“Does our enterprise contract with Acme allow us to subcontract data processing?”
- 01Embed the question
- 02Pull the top 5 chunks that mention “subcontract” or “data processing”
- 03Miss the amendment that changed clause 9.2
- 04Answer confidently from the original clause
- 01Search the contract system for Acme agreements
- 02Open the master agreement and read the whole clause 9
- 03Notice the reference to Amendment 2, then search for it and read it
- 04Answer from the amended clause, citing both documents
The agentic path makes more model calls and takes longer. You pay that for questions where a missed document is expensive.
Do you still need a vector RAG pipeline?
Skip the pipeline
Put the documents in context with prompt caching, or give the model search and read tools over the source systems. Fewer moving parts and better answers on hard questions.
What each approach costs
“RAG is dead” is too strong. Retrieval is still how a model reaches knowledge it wasn't trained on. What changed is who drives it: instead of a fixed pipeline choosing five chunks before the model sees the question, the model chooses what to look at, as many times as it needs.
How to choose for a new project
- 01Measure the corpus in tokens. If it fits comfortably in context, start with full context and prompt caching.
- 02Write 30 to 50 real questions with known answers, including multi-document and aggregate ones, as your eval set.
- 03If it doesn't fit, give the model search and read tools over the source systems before building any index.
- 04Add a vector index only where evals show keyword and structured search missing meaning-based matches.
- 05Keep permissions at the source: query live systems as the user instead of copying data into a shared store.
- 06Track answer accuracy, cost, and latency per approach, and re-test when models or context prices change.
Tooling options
Offered by Anthropic, OpenAI, and Google. Reuse a big prefix of documents across calls at a discount.
Expose search and read tools over Drive, Notion, databases, and internal APIs, with the source's own permissions.
Keyword and vector search next to data you already run. Usually enough before a dedicated vector database.
Cross-encoder rerankers (for example Cohere Rerank) reorder candidates when you do run a retrieval pipeline.
More guides
Want this built into your workflow?
I help small and mid-size teams decide what to build, then build it, from the first eval set to production guardrails.
Talk through your use case