# What Is Retrieval-Augmented Generation (RAG)? A Plain-English Definition

> Retrieval-Augmented Generation (RAG) is a technique where a system first searches your own documents for passages that match a question, then hands them to a language model to answer from. It lets an AI use company knowledge without retraining the model.

Canonical URL: https://www.ruebstudio.de/en/glossary/retrieval-augmented-generation-rag  
Author: Dr.-Ing. Marcus Rüb, Founder  
Published: 2026-10-14

Retrieval-Augmented Generation, or RAG, is a technique that supplements a language model with external data, such as a company's internal documents. Before each answer, the system looks up which passages fit the question, and the model writes its reply from those passages. The term comes from a [2020 paper by Lewis et al.](https://arxiv.org/abs/2005.11401).

## How does RAG work?

RAG splits the job in two: a search system finds relevant passages, and a language model turns them into an answer. The model does not need to have learned your company knowledge. It is shown the relevant passages afresh with every question.

The [AWS guidance on RAG](https://docs.aws.amazon.com/prescriptive-guidance/latest/retrieval-augmented-generation-options/what-is-rag.html) describes four steps:

1. **Ingestion:** Documents are cleaned, split into sections and stored as embeddings (numeric representations of meaning) in a vector database. This happens once up front, then again when documents change.
2. **Question:** A person asks a question in plain language.
3. **Search:** The system finds the most similar sections in the vector database and adds them to the prompt.
4. **Answer:** The language model receives the question and the sections and writes the reply.

To the user it feels like any chat assistant, except that the answers rest on your own material.

## Example and how RAG differs from alternatives

A service technician asks what torque a particular fitting needs. The system finds the right passage in the maintenance manual, passes it to the model and shows the answer together with its source. The technician can check the figure against the original.

Two alternatives are often confused with RAG:

- **Fine-tuning** changes the model itself. Lewis et al. distinguish knowledge stored inside the model ("parametric") from knowledge looked up in an external index ("non-parametric"). RAG relies on the latter, which is why the document collection can change without touching the model.
- **Long context** means putting whole documents straight into the prompt. That works for small collections. Once the collection is larger than the model can take in at once, something has to pre-select, and that is the job of RAG's search step.

RAG is also a building block of [AI agents](https://www.ruebstudio.de/en/ai-agents), for example in [knowledge management](https://www.ruebstudio.de/en/ai-agents/knowledge-management), which look up company knowledge before they answer or act.

## What to watch for

RAG is only as good as the search and the documents behind it. Outdated or contradictory files lead to outdated or contradictory answers.

- **Data quality:** Preparing and maintaining documents often takes more effort than the model.
- **Permissions:** The search must only return documents the asking person is allowed to see.
- **Evidence:** Answers should cite their source so they can be checked.
- **Operation:** Index and model can also run [entirely in-house](https://www.ruebstudio.de/en/sovereign-ai).

## Frequently asked questions

### Is RAG the same as fine-tuning?

No. Fine-tuning changes the model's weights. With RAG the model stays as it is and receives the matching passages along with each question. New documents become usable once the search index is updated.

### Does RAG stop wrong answers?

Not entirely. RAG gives the model a verifiable basis, but if the search returns the wrong passages or the model misreports them, errors still happen. Citations and spot checks remain necessary.

### What data works well with RAG?

Mostly text you can look things up in: manuals, policies, tickets, quotes, meeting notes. The documents need preparation first, such as cleaning and splitting into sections.

### Can RAG run without the cloud?

Yes. The index, the search and the language model can all run on your own servers, so no documents leave the company.

## Sources

- [Lewis et al.: Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks (arXiv:2005.11401, NeurIPS 2020)](https://arxiv.org/abs/2005.11401)
- [AWS Prescriptive Guidance: Understanding Retrieval Augmented Generation](https://docs.aws.amazon.com/prescriptive-guidance/latest/retrieval-augmented-generation-options/what-is-rag.html)
