Hands-On Guide To Agentic Corrective RAG-1
Hands-On Guide To Agentic Corrective RAG-1
to
Agentic
Corrective
RAG Systems
Dipanjan (DJ)
Corrective RAG System
The inspiration for our agentic RAG system will be based on the solution
proposed in the paper, Corrective Retrieval Augmented Generation, Yan et
al. , where they propose a workflow as depicted in the following figure to
enhance a regular RAG system.
The key idea here is to retrieve document chunks from the vector
database as usual and then use an LLM to check if each retrieved
document chunk is relevant to the input question.
If all the retrieved document chunks are relevant, then it goes to the LLM
for a normal response generation like a standard RAG pipeline.
Main Flow
Step 1 - Retrieve Node
Retrieves context documents from the vector database from the input query.
Step 2 - Grade Node
Use an LLM to grade if retrieved documents are relevant to the input question
– yes or no.
Step 3A - Generate Answer Node
If all documents are relevant (all 'yes'), send them to an LLM for response
generation.
Source: A Comprehensive Guide to Building Agentic RAG Systems with LangGraph Created by: Dipanjan (DJ)
Detailed Agentic
Corrective RAG System
Architecture