0% found this document useful (0 votes)
17 views2 pages

Advanced RAG Detailed Notes

RAG (Retrieval Augmented Generation) enhances answer generation by retrieving relevant information before generating responses, but it faces challenges such as retrieving incorrect data and poor chunking of documents. Corrective RAG and Self-RAG improve the process by incorporating feedback and self-evaluation, respectively, while Agentic RAG represents the most advanced form, acting like an intelligent agent that decides on retrieval and analysis steps. Ultimately, RAG failures stem from system design issues rather than limitations of the language model itself.

Uploaded by

Aditya Abhinav
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views2 pages

Advanced RAG Detailed Notes

RAG (Retrieval Augmented Generation) enhances answer generation by retrieving relevant information before generating responses, but it faces challenges such as retrieving incorrect data and poor chunking of documents. Corrective RAG and Self-RAG improve the process by incorporating feedback and self-evaluation, respectively, while Agentic RAG represents the most advanced form, acting like an intelligent agent that decides on retrieval and analysis steps. Ultimately, RAG failures stem from system design issues rather than limitations of the language model itself.

Uploaded by

Aditya Abhinav
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

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.

You might also like