Articles → LANGCHAIN → Retrieval Augmented Generation
Retrieval Augmented Generation
Purpose
What Does Augmentation Means?
Augmentation means adding relevant information retrieved from an external knowledge source to the user's question before sending it to the LLM.
RAG Pipeline
Documents → Chunking → Embeddings → Vector Database → Retrieval → LLM → Answer
Different Components Of RAG
| Component | Description |
|---|
| Data Sources | Your knowledge comes from PDFs, websites, databases, Word files, FAQs, etc. |
| Document Processing / Chunking | Large documents are split into smaller pieces called chunks so they can be searched efficiently. |
| Embedding Model | Each chunk is converted into a numerical representation called an embedding.This captures the semantic meaning of the text. |
| Vector Database / Vector Store | The embeddings are stored here. |
| Retriever | When the user asks a question, the retriever searches the vector database and finds the chunks most relevant to the question. |
| Prompt / Context Builder | The retrieved information is added to the user's question to create a prompt for the LLM. |
| LLM (Large Language Model) | The LLM uses the question plus the retrieved context to generate the final answer. |
| Response / Generation | The final answer is returned to the user, sometimes with citations or references showing where the information came from. |
| Posted By - | Karan Gupta |
| |
| Posted On - | Thursday, August 13, 2026 |