---
title: "RAG (retrieval-augmented generation)"
url: https://eldan.ai/glossary/rag
canonical: https://eldan.ai/glossary/rag
locale: en
language: en
published: 2026-11-23
updated: 2026-11-23
author: "Eldan Abdrashim"
cite_as: "Eldan Abdrashim. \"RAG (retrieval-augmented generation).\" Eldan.ai, 23 November 2026. https://eldan.ai/glossary/rag."
---

# RAG (retrieval-augmented generation)

> RAG retrieves passages relevant to a question from your own documents and puts them into the prompt so the model can answer from them. It is two systems in sequence, a search step and a generation step. The answer can only be as good as the passages that the search returned.

RAG lets a model answer about private or fresh information without retraining it. The pipeline is: split documents into chunks, embed and index them, retrieve the best candidates for each question, optionally rerank, and generate an answer with citations.

**Common mistake.** Debugging wrong answers by rewriting the prompt before checking whether the right passage was retrieved at all.

**In practice.** Measure retrieval alone with recall at k on real questions, fix the biggest failure group, and only then evaluate faithfulness of the generated answers.

## Related terms

- [Chunking](https://eldan.ai/glossary/chunking)
- [Hybrid search](https://eldan.ai/glossary/hybrid-search)
- [Grounding](https://eldan.ai/glossary/grounding)
- [Recall at k](https://eldan.ai/glossary/recall-at-k)
