Skip to content

RAG Workflow

The Retrieval-Augmented Generation (RAG) workflow integrates retrieval mechanisms with generative models, allowing for more informed and contextually relevant outputs. This section explores the workflows implemented in LangChain and LangGraph.

RAG Workflow Structure
RAG Workflow Structure

Three types of RAG

  • Routing: Adaptive RAG (paper). Route questions to different retrieval approaches
  • Fallback: Corrective RAG (paper). Fallback to web search if docs are not relevant to query
  • Self-correction: Self-RAG (paper). Eg. fix hallucinations