Explore our AI courses, practical training for non-technical teamsExplore courses Explore AI courses
Learning AIAI ConceptsExplainers

What Is RAG? Retrieval-Augmented Generation Explained Without the Jargon

You already use RAG most weeks. NotebookLM, Claude Projects, a custom GPT with files attached: all the same idea. Here is what is happening under the hood, and why your answers get worse when you ignore it.

TLDR: RAG means exactly what the words say: before the AI writes an answer, something fetches relevant text from your documents and pastes it into the prompt. That’s it. Your results vary so wildly because of that fetching step, which depends almost entirely on how your documents are written and split up.
17-33%Hallucination rate of leading RAG-based legal research tools in a preregistered Stanford study
800Tokens per chunk, the default size OpenAI's file search cuts your documents into
49%Reduction in failed retrievals Anthropic measured by adding context to each chunk before indexing

Share this article

The Short Version

RAG turns a closed-book exam into an open-book exam: the AI still writes the answer from its own head, but now a few pages of your material sit in front of it. The catch is that a search step picks those pages, and if it grabs the wrong chunk, the model answers confidently from the wrong chunk. OpenAI’s file search splits documents into 800-token pieces by default[4], and a Stanford study of RAG-based legal tools found they still hallucinated 17% to 33% of the time[11]. This guide covers how retrieval works, why it fails, when RAG beats fine-tuning or pasting text in, and how to write documents that retrieve well.

What RAG actually is, in one sentence

RAG stands for retrieval-augmented generation, and the name is unusually honest. Something retrieves relevant text. That text is added to your prompt. Then the model generates an answer.

The mental model that works for almost everyone I teach: closed-book exam versus open-book exam.

A model answering from training alone is sitting the closed-book version. It has read enormously, it remembers imperfectly, and when it doesn’t know something it writes a fluent paragraph anyway, because fluent paragraphs are the whole job. With RAG, you hand it the textbook, open at the right page, seconds before it starts writing. Same student, completely different exam conditions.

The term comes from a 2020 NeurIPS paper by Patrick Lewis and eleven colleagues[1]. They pair a model’s “parametric memory,” knowledge baked into the weights during training, with “non-parametric memory,” in their case a searchable index of Wikipedia. They also named the two problems this was built to fix: models can’t tell you where an answer came from, and you can’t update what they know without retraining. Six years on, those are still the only two reasons anyone builds a RAG system.

My honest take on the term itself: “RAG” got dragged out of a research paper into a thousand vendor slide decks and stopped meaning anything specific in a sales conversation. When a platform says it “uses RAG,” you’ve learned almost nothing, because that describes NotebookLM, a seven-figure enterprise deployment, and a weekend project equally well. What matters is how good the retrieval is, and nobody puts that on the slide.

Where you are already using RAG without knowing it

I run an exercise in workshops. Hands up if you’ve uploaded a document to an AI tool this month. Nearly every hand. Hands up if you know what RAG stands for. Two hands, maybe three, usually from someone in IT who came along for moral support.

Across roughly 2,000 learners that gap has been stable. Fine, right up until someone gets a wrong answer from their handbook and concludes the tool is broken.

NotebookLM. Google’s help documentation is explicit: “NotebookLM retrieves the most relevant information based on your question, then builds a response from it. A specific question helps NotebookLM locate the most relevant pieces of information.”[9] That’s RAG, described plainly for consumers, and it contains the most useful tip in this whole article. Specific questions retrieve better.

Claude Projects. Anthropic is unusually transparent about the switchover. A project starts by loading everything straight into the context window, originally 200,000 tokens, described at launch as “the equivalent of a 500-page book”[7]. Past that point: “When your project knowledge approaches the context window limit, Claude will automatically enable RAG mode to expand your project’s capacity by up to 10x.”[5] Claude then searches rather than reading everything at once[5], with no setup and no announcement[6]. Same files, quietly different mechanism, and most people never notice.

Custom GPTs with knowledge files. Up to 20 files, each up to 512 MB[3]. OpenAI spells out what happens next: “the GPT breaks the text up into chunks, creates embeddings (a mathematical way of representing text), and stores them for later use.”[3] Our custom GPT walkthrough covers the setup side.

And your company’s new internal chatbot, the one answering from the employee handbook: almost certainly RAG, and almost certainly nobody cleaned the document library first.

The retrieval step: where your answer is won or lost

Every RAG system does roughly the same five things. Anthropic’s engineering write-up gives the standard version: break documents into chunks of “usually no more than a few hundred tokens,” turn each into a vector embedding, store those in a searchable database, then find the closest ones at question time[8].

What happens between your question and the answer

1ChunkDocuments are cut into pieces of a few hundred tokens
2IndexEach piece becomes an embedding, a fingerprint of its meaning
3SearchYour question is matched against those fingerprints, plus a keyword search
4RankThe top few chunks are picked, sometimes reordered by a reranker
5GenerateThose chunks go into the prompt and the model writes the answer

The standard retrieval-then-generation sequence, as described in Anthropic’s engineering documentation on contextual retrieval [8] and OpenAI’s file search documentation [4]. This is a process diagram, not measured data.

Notice what the model is responsible for: step five only. Steps one to four are search engineering, happening before the clever part starts. If step three hands over the wrong three paragraphs, the model will write beautifully about the wrong paragraphs.

One detail from OpenAI’s documentation explains behaviour you’ve probably noticed: the file search tool rewrites your question before searching, can split a complex question into parallel searches, and runs keyword search alongside semantic search before reranking[4]. Semantic search alone misses exact strings. Anthropic’s example: search “Error code TS-999” and meaning-based search returns general content about error codes while missing the exact match[8]. That’s why quoting a phrase from your own document often beats describing it. You’re feeding the keyword half.

Why RAG reduces hallucination but never eliminates it

This is the claim most likely to be oversold to you in a procurement meeting, so I want to be careful with it. RAG genuinely helps: the original paper found RAG models “generate more specific, diverse and factual language” than the same model working from memory alone[1]. If you’ve read our explainer on why AI hallucinates in the first place, you’ll recognise why. You’re swapping a recall problem for a reading problem, and models read better than they recall.

But several legal technology vendors marketed their RAG products as “hallucination-free.” A Stanford team tested that in the first preregistered evaluation of these tools, published in the Journal of Empirical Legal Studies: the AI research tools from LexisNexis and Thomson Reuters “each hallucinate between 17% and 33% of the time.”[11] Lexis+ AI answered 65% of queries accurately; Westlaw’s tool, 42%[11]. Their summary line is the one I quote in workshops: “RAG systems are no panacea.”[11]

Read that again with your own handbook in mind. Those are expensive systems over curated legal databases. Your internal chatbot pointed at SharePoint will not do better.

The three ways it breaks

OpenAI’s accuracy guide is blunt: “You can supply the wrong context, so the model can’t possibly answer, or you can supply too much irrelevant context, which drowns out the real information and causes hallucinations.”[2] The third failure is that the model gets the right context and does the wrong thing with it[2]. A team at Deakin University catalogued seven distinct failure points across three real deployments, most of which belong to you and your document library rather than the model[12].

Their most uncomfortable conclusion, and the one I’d put on a procurement checklist: “validation of a RAG system is only feasible during operation.”[12] You cannot tell whether it works from a demo. You find out in month three.

A number I looked for and didn’t use. You’ll see confident figures for how much RAG cuts hallucination, usually something like “reduces hallucinations by 70-90%.” Every trail I followed ended at a vendor blog citing another vendor blog, with no study underneath, so none of them are in this article. The only measured figure I could verify goes the other way[11].

Chunking and document quality decide your answer quality

Here is the part almost nobody explains to business users, and the part that would fix most of their complaints.

Your documents don’t get stored whole. They get cut up. OpenAI’s file search splits every file into 800-token chunks with 400 tokens of overlap by default[4], roughly 600 words. Gemini’s File Search lets you set your own tokens per chunk and overlap[10]. So the unit of retrieval is a page. Not your document. A page.

Anthropic’s engineering team gives the cleanest illustration. A chunk reads: “The company’s revenue grew by 3% over the previous quarter.” Perfectly good sentence. Now retrieve it when someone asks about ACME Corp’s Q2 2023 revenue growth. The chunk doesn’t say ACME, or Q2, or 2023. Cut from its document, it’s nearly unfindable[8]. Their fix: have a model write one sentence describing where each chunk came from and prepend it before indexing. Contextual embeddings cut the top-20 retrieval failure rate by 35%, adding a keyword index took it to 49%, and reranking to 67%, moving failures from 5.7% of queries to 1.9%[8].

The other half: whether the text made it in at all

Before anything can be chunked it has to be parsed out of your file, and a surprising share of “the AI is wrong” complaints start right here. OpenAI says it plainly: “A single column of text is best. The parser can struggle with multi-column PDFs, and won’t understand the nuance conveyed by the relative positions of text on a PowerPoint slide.”[3] NotebookLM refuses a source outright if the PDF is copy-protected[9].

Now think about where corporate knowledge lives. Two-column PDF policies. Slides where the meaning is in a diagram. Scanned contracts. The parser will partly or wholly fail on each, nothing tells you, and the chatbot answers as though that policy doesn’t exist.

One more gap, from OpenAI’s own list: “Better support for summarization: the tool today is optimized for search queries.”[4] Ask a RAG system to summarise a whole document and you’re asking a search tool to do a reading tool’s job. Our guide on summarising long documents covers what to do instead.

RAG vs fine-tuning vs just pasting it into the prompt

Somebody in your organisation is going to propose fine-tuning a model on your company data. Learn this distinction first, because it will save you a six-figure decision. Fine-tuning teaches a model how to behave; RAG gives it something to read.

OpenAI lists exactly two reasons to fine-tune: to improve accuracy on a task by showing the model many correct examples, and to get the same accuracy from fewer tokens[2]. Neither is “so it knows our products.” If the model doesn’t know your Q3 pricing, fine-tuning is the wrong tool, and it’ll still be wrong when the pricing changes in October.

The underrated option is the third one: paste the thing in. Anthropic puts a number on it. “If your knowledge base is smaller than 200,000 tokens (about 500 pages of material), you can just include the entire knowledge base in the prompt.”[8] Five hundred pages covers most real business use cases.

Which approach fits which problem

ApproachFixesUse whenWatch out for
Paste into the promptThe model hasn’t seen this documentYour material fits in the context window (Anthropic suggests under 200k tokens, roughly 500 pages) [8]Models retrieve less reliably from the middle of long inputs [13]
RAGThe knowledge base is too big to pasteContent changes often, you need citations, or the library is large [1]Retrieval becomes your bottleneck, and it fails silently [12]
Fine-tuningWrong format, wrong tone, wrong reasoning stepsYou need consistent behaviour, or the same accuracy from fewer tokens [2]It does not reliably add facts, and goes stale when your facts change [2]

Decision summary drawn from OpenAI’s LLM accuracy guidance [2] and Anthropic’s contextual retrieval post [8]. A framework for choosing, not benchmark data.

One real caveat on the paste option. A Stanford-led study in Transactions of the ACL found that “performance is often highest when relevant information occurs at the beginning or end of the input context, and significantly degrades when models must access relevant information in the middle of long contexts.”[13] Practical translation: paste twelve documents with the answer buried in document seven and your odds drop. Paste four, and put the one you care about first or last.

These techniques do “stack on top of each other”[2]. Just don’t start there.

How to write documents that retrieve well

This is the highest-value thing a non-technical person can do, and it needs no permissions from IT. Every rule below follows from one fact: each chunk has to make sense alone.

Repeat the nouns. A paragraph starting “It applies to all employees hired after that date” is dead on arrival as a chunk. “This parental leave policy applies to all employees hired after 1 January 2026” survives being cut out of its document. Clunkier for a human reader, who has the whole page and will cope.

Put the answer next to the heading. Chunk boundaries fall near structural breaks. Three paragraphs of throat-clearing between a heading and the actual policy is how you end up with a chunk containing only throat-clearing.

Name files by their contents. Anthropic’s own advice for RAG-enabled projects: “Well-named files help Claude understand and retrieve the right information more effectively.”[5] “Policy_v4_FINAL_updated.docx” tells the system nothing.

Date-stamp anything that expires. When two chunks contradict each other the retriever has no idea which is current, so it hands both over and the model picks or blends. Put “Effective 1 January 2026, replaces the 2024 version” in the body text, not a footer the parser may drop.

Kill the duplicates and convert the awkward formats. The most common cause of a confidently wrong internal chatbot answer isn’t a model failure. It’s three versions of one policy in the same folder, two superseded, all three indexed. And two-column PDFs need flattening to single-column[3].

And one habit that isn’t about writing at all: ask for sources, then click through. Custom GPTs avoid naming uploaded files unless instructed otherwise[3], and NotebookLM skips individual citations when a source is short[9]. Without checking, you can’t tell whether an answer came from your policy or the model’s general knowledge of policies. Our anti-hallucination toolkit goes further on verification.

Adoption is a multiplication problem

At Future Factors we frame every rollout the same way, and it applies to RAG better than to almost anything else we teach:

Tool x Workflows x Behavior = AI-powered professional.

Multiplication, deliberately, not addition. A zero anywhere zeroes the whole thing, and you can’t compensate by doubling another factor. Which is exactly what organisations attempt when they buy a better tool to fix adoption.

Tool is the licence: NotebookLM, a Claude Project, a custom GPT. Bought first, matters least on its own.

Workflows is the document library the tool retrieves from and the process keeping it current. For RAG this factor does most of the work. If your handbook is a two-column scanned PDF and the folder holds three versions of it, your workflow factor is near zero and no licence upgrade moves it.

Behavior is what the person does: asking a specific question instead of a vague one, checking the citation, speaking up when an answer contradicts what they know.

I’ve watched teams with mediocre tools and clean documents beat teams with the newest platform and a folder of scanned PDFs. Every time.

And I used to teach RAG as a technical concept, with the vector database and the embeddings and a diagram. People nodded and forgot it. The version that sticks is the exam metaphor plus one instruction: make the open book easy to read. That turns an IT problem into a writing problem, and writing is something everyone already knows how to do.

So take one action from all this. Open the folder your AI tool points at, find the three documents people ask about most, rewrite the headings so each section stands alone, spell out the acronyms, delete the superseded copies, re-upload. Then ask your five most common questions again. That’s an afternoon, and it will do more for your answer quality than any model upgrade shipping this year.

Frequently Asked Questions

What does RAG stand for and what does it actually mean?

RAG stands for retrieval-augmented generation. Before the AI writes an answer, a search step pulls relevant passages from your documents and adds them to the prompt, so the model reads rather than recalls. The term comes from a 2020 NeurIPS paper that paired a model’s “parametric memory” with a searchable index its authors called “non-parametric memory”[1]. Answering from training alone is a closed-book exam; RAG hands it the open book.

Does RAG stop AI from hallucinating?

It reduces hallucination and does not remove it. Several legal technology vendors advertised RAG products as hallucination-free, and a preregistered Stanford study in the Journal of Empirical Legal Studies found the leading tools still hallucinated between 17% and 33% of the time[11]. Their phrase: RAG systems are “no panacea.” Failures come from retrieving the wrong passage, retrieving so much noise it drowns the right answer, or the model misreading a correct passage[2].

What is chunking, and why does it affect my answers?

Your documents are not stored whole. They are cut into pieces and indexed separately, so each piece has to make sense alone to be findable. OpenAI’s file search uses 800-token chunks with 400 tokens of overlap, and passes at most 20 chunks into the prompt[4]. Anthropic’s example: a chunk reading “The company’s revenue grew by 3% over the previous quarter” can’t be retrieved by a question naming the company and quarter, because it mentions neither[8].

When should I use RAG instead of fine-tuning?

Use RAG when the model needs information it doesn’t have: your documents, your policies, anything that changes. Use fine-tuning when it has the information but behaves wrongly. OpenAI lists exactly two reasons to fine-tune: improving accuracy on a task through examples, and getting the same accuracy from fewer tokens[2]. Neither is “so it knows our products.” Check the third option first: under roughly 200,000 tokens, about 500 pages, Anthropic suggests putting it all in the prompt and skipping RAG[8].

How do I get better answers from NotebookLM, Claude Projects or a custom GPT?

Clean the source folder first, deleting superseded versions so contradictory chunks stop competing. Convert awkward files, since OpenAI’s parser struggles with multi-column PDFs and can’t read a slide’s layout[3], and NotebookLM rejects copy-protected PDFs outright[9]. Name files descriptively, which Anthropic recommends for RAG-enabled projects[5]. Then ask narrow questions and quote an exact phrase when you know one[8].

About This Article

This explainer is based on Future Factors’ work teaching document-grounded AI tools to non-technical teams, checked against primary sources: the original Lewis et al. RAG paper and the current published documentation from OpenAI, Anthropic and Google. Widely-quoted figures claiming RAG cuts hallucination by a specific percentage traced back only to vendor blogs citing other vendor blogs, so they were excluded and the omission is stated in the text. All documentation was verified on 21 August 2026.

Sources

  1. Lewis, Perez, Piktus, Petroni, Karpukhin, Goyal, Küttler, Lewis, Yih, Rocktäschel, Riedel & Kiela. Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks. NeurIPS 2020, arXiv:2005.11401. https://arxiv.org/abs/2005.11401
  2. OpenAI. Optimizing LLM Accuracy. OpenAI Platform Documentation. Accessed 21 August 2026. https://platform.openai.com/docs/guides/optimizing-llm-accuracy
  3. OpenAI. Knowledge in GPTs. OpenAI Help Center. Accessed 21 August 2026. https://help.openai.com/en/articles/8843948-knowledge-in-gpts
  4. OpenAI. Assistants File Search. OpenAI Platform Documentation. Accessed 21 August 2026. https://platform.openai.com/docs/assistants/tools/file-search
  5. Anthropic. Retrieval augmented generation (RAG) for projects. Anthropic Help Center, 16 March 2026. https://support.claude.com/en/articles/11473015-retrieval-augmented-generation-rag-for-projects
  6. Anthropic. What are projects? Anthropic Help Center. Accessed 21 August 2026. https://support.claude.com/en/articles/9517075-what-are-projects
  7. Anthropic. Collaborate with Claude on Projects. 25 June 2024. https://www.anthropic.com/news/projects
  8. Anthropic. Introducing Contextual Retrieval. Engineering at Anthropic, 19 September 2024. https://www.anthropic.com/engineering/contextual-retrieval
  9. Google. Frequently asked questions. NotebookLM Help. Accessed 21 August 2026. https://support.google.com/notebooklm/answer/16269187?hl=en
  10. Google. File search. Gemini API, Google AI for Developers. Accessed 21 August 2026. https://ai.google.dev/gemini-api/docs/file-search
  11. Magesh, Surani, Dahl, Suzgun, Manning & Ho. Hallucination-Free? Assessing the Reliability of Leading AI Legal Research Tools. Journal of Empirical Legal Studies, 22(2), 2025. https://dho.stanford.edu/wp-content/uploads/Legal_RAG_Hallucinations.pdf
  12. Barnett, Kurniawan, Thudumu, Brannelly & Abdelrazek. Seven Failure Points When Engineering a Retrieval Augmented Generation System. Applied Artificial Intelligence Institute, Deakin University, arXiv:2401.05856, January 2024. https://arxiv.org/abs/2401.05856
  13. Liu, Lin, Hewitt, Paranjape, Bevilacqua, Petroni & Liang. Lost in the Middle: How Language Models Use Long Contexts. Transactions of the Association for Computational Linguistics, 2023. arXiv:2307.03172. https://arxiv.org/abs/2307.03172
Sana Mian
Sana Mian, Co-Founder of Future Factors AI

Sana is an AI educator and learning designer specialising in making complex ideas stick for non-technical professionals. She has trained 2,000+ learners across corporate teams, bootcamps, and keynote stages. Future Factors offers AI Bootcamps, Corporate Workshops, and Speaking & Consulting for businesses ready to adopt AI without the overwhelm.

More about Sana →

Psst, Hey You!

(Yeah, You!)

Want helpful AI tips flying Into your inbox?

Weekly tips. Real examples. Practical help for busy professionals.

We care about your data, check out our privacy policy.