What is retrieval-augmented generation (RAG)?
Retrieval-augmented generation (RAG) is a technique in which an AI system first retrieves relevant information from trusted sources, such as documents, knowledge bases or databases, and then gives it to a language model to generate an answer. This grounds responses in current, company-specific facts and allows sources to be cited.
How RAG works
- User asks a question.
- The system searches sources (often with vector embeddings).
- Top passages are added to the prompt.
- The model writes an answer using them.
- Sources are cited.
Strengths and limits
| Strengths | Limits |
|---|---|
| Uses current data | Only as good as retrieval |
| Cites sources | Misses relationships across records |
| No retraining | Context window limits |
Beyond basic RAG
GraphRAG and knowledge-graph approaches add relationships; agentic RAG lets the agent decide what to retrieve next.
