Back to Glossary
Concept

RAG (Retrieval-Augmented Generation)

A technique that gives AI access to external data so it can answer questions using real, up-to-date information.

Share

Definition

Retrieval-Augmented Generation (RAG) is a technique that combines AI language models with external data sources. Instead of relying solely on what the AI learned during training (which has a knowledge cutoff date), RAG first retrieves relevant information from a database, document collection, or knowledge base, then feeds that information into the AI's prompt so it can generate an answer grounded in real data.

RAG dramatically reduces hallucinations and enables AI to work with private, proprietary, or real-time data that wasn't in its training set. It's the foundation of most enterprise AI applications — customer support bots that access help documentation, internal assistants that search company wikis, and research tools that query academic databases.

Examples

1

A customer support AI that searches your help docs before answering questions — so it gives accurate, company-specific answers instead of generic ones

2

An internal tool that searches your company's Confluence wiki when employees ask policy questions

Related Terms

Frequently Asked Questions

Is RAG the same as fine-tuning?
No. Fine-tuning changes the model itself by training it on your data. RAG keeps the model unchanged but gives it access to your data at query time. RAG is faster to set up, easier to update, and works with any model.
Do I need RAG for my AI project?
If your AI needs to answer questions about specific, private, or frequently changing information — yes. If it's doing general tasks like writing or brainstorming — probably not.

Build prompts using this concept

Explore our prompt library and put rag (retrieval-augmented generation) into practice with ready-to-use templates.

Build prompts using this concept