# Retrieval-Augmented Generation (RAG)

URL: https://www.onsomble.ai/tools/ai-glossary/retrieval-augmented-generation

Published: 2026-03-15 00:00:00.000Z

A technique that grounds a language model's output in external data by retrieving relevant documents before generating a response.

Category: Retrieval & Data

## How it works

RAG pipelines typically follow a three-step process: **index** documents into a vector store, **retrieve** the most relevant chunks at query time, and **augment** the LLM prompt with those chunks so the model can cite real sources instead of hallucinating.

## Key variations

The basic retrieve-then-read pattern has evolved into several specialized variants:

-   **Naive RAG** — single retrieval pass, straightforward but limited for complex queries.
-   **Agentic RAG** — an LLM decides when and what to retrieve, routing queries and iterating on results.
-   **GraphRAG** — combines vector retrieval with knowledge graph traversal for relationship-aware answers.
-   **Contextual Retrieval** — prepends document-level context to each chunk before embedding, dramatically improving recall.

## Common pitfalls

Poor chunking strategy is the number one source of bad RAG quality. Splitting on arbitrary token counts loses semantic coherence. Use semantic chunking or document-aware splitting instead. Also monitor retrieval recall — if the right documents aren't in the top-k results, no amount of prompt engineering will fix the output.

## Why it matters

RAG is the most practical way to give an LLM access to your private data without fine-tuning. It is the foundation of most enterprise AI deployments today.

## Related terms

- [Embeddings](https://www.onsomble.ai/tools/ai-glossary/embeddings)
- [Vector Database](https://www.onsomble.ai/tools/ai-glossary/vector-database)
- [Knowledge Graph](https://www.onsomble.ai/tools/ai-glossary/knowledge-graph)
- [Hallucination](https://www.onsomble.ai/tools/ai-glossary/hallucination)

## Related Radar topics

## Related articles

### [From Documents to Answers: How RAG Actually Works](https://www.onsomble.ai/blog/how-rag-works-4-components)

RAG isn't magic — it's a four-step system. Here's how documents become answers, explained without code.

Rosh Jayawardena · Published 2025-12-25T12:00:00+00:00 · Updated 2026-08-02T12:12:41.52786+00:00 · 9 min

### [How to Build a RAG System That Actually Works](https://www.onsomble.ai/blog/build-rag-system-guide)

Most RAG tutorials skip the hard parts. This one doesn't — here's how to actually ship a working system.

Rosh Jayawardena · Published 2025-12-25T12:00:00+00:00 · Updated 2026-08-02T12:12:41.52786+00:00 · 10 min

### [Beyond Basic RAG: Chunking, Hybrid Search, and Reranking](https://www.onsomble.ai/blog/advanced-rag-optimization)

Most RAG tutorials stop at "it works." This one shows you how to make it work well.

Rosh Jayawardena · Published 2025-12-25T12:00:00+00:00 · Updated 2026-08-02T12:12:41.52786+00:00 · 11 min
