DeepYardDeepYard
C

Corrective RAG (CRAG)

Self-correcting RAG pipeline that detects and fixes retrieval errors

Open SourceFree

About

Corrective RAG (CRAG) implements a self-correcting retrieval pipeline: after initial retrieval, a grader agent evaluates whether the retrieved documents actually answer the question. If the retrieval is poor, CRAG triggers web search as a fallback, then re-evaluates. This loop dramatically reduces hallucination from irrelevant context — a common RAG failure mode. Part of the awesome-llm-apps collection.

Details

Patternloop
StepsRetrieve documents from vector store → Grade relevance of retrieved documents → If poor: trigger web search fallback → Re-evaluate and generate grounded response
Use CasesRobust document Q&A, Hallucination reduction, Production RAG pipelines

Tags

ragself-correctingretrievalworkflow