| name | rag-systems |
| description | Build Retrieval-Augmented Generation systems to enhance LLMs with external knowledge. Use for question answering, document search, knowledge bases, reducing hallucinations, and grounding LLM responses in factual data. |
RAG Systems
Build Retrieval-Augmented Generation systems that enhance LLMs with external knowledge.
Overview
RAG combines information retrieval with language generation, enabling LLMs to access and incorporate external knowledge for more accurate, up-to-date responses.
Quick Reference
| Scenario | Recommended Approach | Reference File |
|---|
| Document ingestion and vectorization | Chunking, embedding, indexing | /references/data-ingestion.md |
| Finding relevant information | Retrieval strategies and ranking | /references/retrieval-methods.md |
| Combining retrieval with generation | Prompt augmentation and generation | /references/generation-techniques.md |
Core Principles
- Chunking - Split documents into semantically coherent pieces
- Embedding - Convert text to dense vector representations
- Indexing - Store vectors for efficient similarity search
- Retrieval - Find most relevant chunks for query
- Augmentation - Inject retrieved context into LLM prompt
RAG Pipeline
1. Data Ingestion
- Load documents from various sources
- Split into chunks (200-500 tokens typical)
- Generate embeddings using embedding model
- Store in vector database