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


ComponentDescription
Data SourcesYour knowledge comes from PDFs, websites, databases, Word files, FAQs, etc.
Document Processing / ChunkingLarge documents are split into smaller pieces called chunks so they can be searched efficiently.
Embedding ModelEach chunk is converted into a numerical representation called an embedding.This captures the semantic meaning of the text.
Vector Database / Vector StoreThe embeddings are stored here.
RetrieverWhen the user asks a question, the retriever searches the vector database and finds the chunks most relevant to the question.
Prompt / Context BuilderThe 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 / GenerationThe 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

Query/Feedback


Your Email Id
 
Subject
 
Query/FeedbackCharacters remaining 250