What is RAG
RAG (Retrieval Augmented Generation) is a system where instead of relying only on the model’s
internal knowledge, we first retrieve relevant information and then generate an answer. Layman
example: Imagine you are in an exam but allowed to open your notebook. Instead of memorizing
everything, you quickly search your notebook and then write the answer.
Failure: Retrieval
The biggest issue in RAG is retrieving wrong information. Example: If you Google something and
open wrong links, your final answer will be wrong even if you are smart. In RAG, vector similarity
often retrieves text that looks similar but is not actually useful.
Failure: Chunking
Documents are split into chunks before storing. If chunking is bad: - Important context gets split -
Meaning is lost Example: Imagine reading only half a sentence: “India won the match because…”
(rest missing) This leads to wrong understanding.
Corrective RAG
Corrective RAG improves retrieval by adding a feedback step. Flow: 1. Retrieve documents 2.
Check if they are relevant 3. If not, rewrite query and retrieve again Example: If your Google search
gives wrong results, you change keywords and search again. That is exactly what corrective RAG
does.
Self-RAG
Self-RAG introduces self-evaluation. The model: 1. Generates answer 2. Critiques it 3. Decides
whether more info is needed 4. Retrieves again if required Example: Like writing an answer, then
re-reading and thinking: “Something feels wrong, let me check again.” This loop improves quality
significantly.
Agentic RAG
Agentic RAG is the most advanced form. Here, LLM acts like an intelligent agent: - It decides what
to do - Whether to retrieve data - Whether to call tools (search, calculator, APIs) Architecture: -
Planner (decides steps) - Tools (retriever, APIs) - Memory (stores past context) Example: Think of a
human analyst: - First searches data - Then analyzes - Then maybe calculates - Then gives answer
Agentic RAG mimics this behavior.
Final Insight
Most people think RAG failures are because of LLM. Reality: Failures happen due to: - Bad data -
Poor retrieval - No evaluation RAG is not an LLM problem, it is a system design problem.