# Retrieval-Augmented Generation (RAG)

- **Canonical URL:** https://getaimath.com/dictionary/retrieval-augmented-generation-rag/
- **Topics:** [Retrieval-Augmented Generation (RAG)](https://getaimath.com/dictionary/category/retrieval-augmented-generation-rag/)
- **Last updated:** 2026-11-25

## What is Retrieval-Augmented Generation (RAG)?

**In one sentence:** RAG is a way to make an AI answer using real documents: first it searches for relevant information, then it writes an answer based on what it found.

Models only know what they learned in training, which can be outdated or missing your private info. RAG fixes this like an open-book test: the system looks up the right pages and puts them in the model's context before it answers.

![RAG (Retrieval-Augmented Generation): The Open-Book Exam — Simple cartoon comparing an AI guessing from memory and making things up versus RAG: 1. Search your real documents, 2. Hand the exact page to the AI, 3. Get a factual answer with a page citation.](https://getaimath.com/diagrams/retrieval-augmented-generation-rag.png)
*Napkin Diagram (Retrieval-Augmented Generation (RAG)): Without RAG, AI answers from blurry memory; with RAG, it opens your real documents to the right page before answering.*

## What is an example of Retrieval-Augmented Generation (RAG)?

A company chatbot that searches the employee handbook before answering "How many vacation days do I get?" uses RAG.

## Why does Retrieval-Augmented Generation (RAG) matter?

RAG reduces hallucinations and lets AI use fresh or private knowledge without retraining.

## Retrieval-Augmented Generation (RAG) vs. Fine-tuning

RAG gives a model fresh or private facts at answer time like an open-book exam; fine-tuning changes how the model behaves, formats, or speaks without acting as a live database.

| Dimension | Retrieval-Augmented Generation (RAG) | [Fine-tuning](https://getaimath.com/dictionary/fine-tuning/) |
| --- | --- | --- |
| Best for | Changing facts, private docs, citations | Consistent tone, schema, or domain skill |
| Updates | Instant—just re-index new documents | Requires a new training & eval run |
| Hallucination control | High when grounded with citations | Low for unseen or fast-changing facts |

## Related Concepts

- [Retrieval Pipeline](https://getaimath.com/dictionary/retrieval-pipeline/): A retrieval pipeline is the set of steps that finds and prepares information for an AI model to use.
- [Indexing](https://getaimath.com/dictionary/indexing/): Indexing is organizing documents ahead of time so they can be searched quickly.
- [Document Parsing](https://getaimath.com/dictionary/document-parsing/): Document parsing is reading files like PDFs, Word documents or web pages and pulling out their content and structure.
- [Document Loading](https://getaimath.com/dictionary/document-loading/): Document loading is bringing documents from sources like folders, websites, databases or apps into an AI system.
- [Text Extraction](https://getaimath.com/dictionary/text-extraction/): Text extraction is pulling readable text out of files, images or web pages.
- [Chunking](https://getaimath.com/dictionary/chunking/): Chunking splits long documents into smaller pieces before turning them into embeddings for search.

---
Source: The AI Math Dictionary (https://getaimath.com/dictionary/retrieval-augmented-generation-rag/)
