AI agents · How Founders Use AI
What is RAG in AI?
Checked 17 November 2026
RAG, retrieval-augmented generation, means the AI first looks up passages from documents you choose and then answers from them, instead of relying only on what it learned in training. It is how a support bot or an internal assistant answers from your current policies and can cite them.
On the AI map, 29 October 2026 Frontier modelsOpen-weight modelsDecision models
By case
-
If all your documents together are only a few hundred pages
Put them all in the prompt and skip RAG.
Anthropic's own guidance is that a knowledge base this small does not need retrieval.
-
If you want RAG without building the pipeline
Use a hosted file search, such as OpenAI's file search tool in its API.
It chunks, indexes and retrieves for you.
-
If answers miss facts that are in your documents
Fix retrieval first: add context to each chunk and rerank the results.
When RAG fails, the right passage usually never reached the model.
-
If your documents change every week
Use RAG rather than fine-tuning.
Updating an index is cheap; retraining a model is not.
The steps5 steps
-
Split your documents into chunks of a few paragraphs, keeping headings with them.
-
Store the chunks in a search index, usually as embeddings in a vector store, often with keyword search beside it.
-
For each question, retrieve the chunks closest to it.
-
Pass those chunks to the model with the question, and ask it to answer only from them and cite them.
-
Test it on real questions and check whether the right chunk came back before judging the answer.
The figuresEach with where it was read
- Year the paper that named RAG was posted, by Patrick Lewis and others 2020
- Failed retrievals cut by contextual retrieval in Anthropic's tests 49%, and 67% with reranking
- Knowledge base size under which Anthropic says to put it all in the prompt 200,000 tokens, about 500 pages
What goes wrong
Cutting chunks so small that each one loses the context that gives it meaning.
Letting the model answer when nothing relevant was retrieved, instead of saying it does not know.
Never re-indexing, so the bot answers from last quarter's policy.
Judging the system by its answers alone without checking what was retrieved.
Go deeper6 sources
-
Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks
Patrick Lewis et al. · Article · May 2020
The paper that named RAG: a model paired with a retriever over a document index, answering more factually than the model alone.
-
What is RAG?
AWS · Article · 2026
A plain explainer of how retrieval, augmentation and generation fit, and why RAG is cheaper than retraining a model.
-
Introducing Contextual Retrieval
Anthropic · Article · Sep 2024
Anthropic's measured fix for the weak step in RAG: contextual chunks cut failed retrievals by 49%, and by 67% with reranking.
-
File search (OpenAI API)
OpenAI · Guide · 2026
The quickest hosted RAG: upload files to a vector store and let the model search them, with no database of your own.
-
What is Retrieval-Augmented Generation (RAG)?
IBM Technology · Video · 2023
A short whiteboard video that explains RAG with one everyday example.
-
What is retrieval-augmented generation?
Google Cloud · Article · 2026
Google's explainer, including when RAG beats fine-tuning and how grounding reduces made-up answers.