# What is Retrieval-Augmented Generation (RAG)?

> Having an AI model look up relevant documents before generating an answer.

Canonical: https://www.decimal.app/glossary/retrieval-augmented-generation · Last reviewed: 2026-09-23

RAG combines a search step with a language model: the system retrieves passages related to the question from a knowledge source, then the model writes an answer using them.

## Why it matters

RAG made AI support answers far more accurate than a model alone. Its limit is that it can only find what's been written down, so it can't diagnose a new bug or explain one customer's data.

## Best practices

1. Keep sources fresh. Retrieval is only as good as the index.
2. Show retrieved sources. Let customers and agents check them.
3. Know when to go further. Route questions that need investigation to an agent that can query live systems.

## How Decimal helps

Decimal uses retrieval for what's documented and goes further with investigation across code, logs, and data for what isn't.

## Related terms

- [Agentic Investigation](https://www.decimal.app/glossary/agentic-investigation): An AI agent working a ticket the way an engineer would: hypothesis, evidence, conclusion.
- [Grounding](https://www.decimal.app/glossary/grounding): Tying an AI's answer to specific source material it can cite.
- [Knowledge Base](https://www.decimal.app/glossary/knowledge-base): A library of help articles customers and agents use to answer questions.
- [Hallucination](https://www.decimal.app/glossary/hallucination): When an AI model states something confident and wrong.

---

Decimal · Book a demo: https://cal.com/decimal-demo/30m · Markdown index: https://www.decimal.app/llms.txt
