What Is RAG?
Retrieval-Augmented Generation is a technique where a language model retrieves relevant external information before generating an answer. This helps reduce hallucination and allows the system to answer using custom knowledge sources.
How Basic RAG Works
A common RAG pipeline includes document loading, text splitting, chunking, embedding generation, vector database storage, similarity search, context retrieval, and answer generation.
Why Chunking Matters
Chunking breaks large documents into smaller parts so they can be embedded and retrieved more accurately. Poor chunking can make retrieval noisy or incomplete.
Types of RAG
RAG can be implemented as simple vector search RAG, hybrid search RAG, metadata-filtered RAG, graph-based RAG, agentic RAG, multi-query RAG, and hierarchical RAG.
