
Verification and Filtering
Corrective RAG (CRAG).
Verification and Filtering
Standard RAG suffers from "Lost in the Middle" or irrelevant chunks. Corrective RAG pattern:
- Retrieve
- Filter: An LLM Node reads each chunk and labels it
RelevantorIrrelevant. - Branch:
- If 0 chunks are relevant -> Route to
WebSearchNode. - If >0 chunks are relevant -> Route to
GenerateNode.
- If 0 chunks are relevant -> Route to
This self-correction loop drastically improves quality.