32 lines
882 B
Plaintext
32 lines
882 B
Plaintext
# RAG (Retrieval-Augmented Generation) Overview
|
|
|
|
## What is RAG?
|
|
|
|
RAG combines retrieval of relevant information with text generation. It allows LLMs to access and reference external knowledge sources.
|
|
|
|
## Components
|
|
|
|
1. **Retriever** - Finds relevant documents from a knowledge base
|
|
2. **Generator** - LLM that generates answers using retrieved context
|
|
3. **Vector Store** - Stores document embeddings for similarity search
|
|
|
|
## How it works
|
|
|
|
1. User query is converted to embeddings
|
|
2. Similar documents are retrieved from vector store
|
|
3. Retrieved context is combined with query
|
|
4. LLM generates answer based on context
|
|
|
|
## Benefits
|
|
|
|
- Access to up-to-date information
|
|
- Reduced hallucinations
|
|
- Source attribution
|
|
- Cost-effective compared to fine-tuning
|
|
|
|
## Common Use Cases
|
|
|
|
- Question answering over documents
|
|
- Chat with your data
|
|
- Research assistance
|
|
- Knowledge management |