Self-RAG
Self-RAG: retrieve, generate, self-evaluate and decide whether to retrieve again, rewrite, refine or stop, with the architecture, a 7-step walkthrough, a worked example (green hydrogen), evaluation aspects, benefits, challenges, use cases, components and best practices.
Cheat sheet · Offered as a template
In this diagram
- Self-RAG
- What is Self-RAG?
- The model (LLM) critiques its own retrieval and generation.
- Uses self-reflection to improve answers iteratively.
- Decides whether to retrieve again, rewrite, refine, or stop.
- Leads to higher accuracy and reliability.
- Overview (Flow)
- User Query
- Retrieve (Initial)
- Generate (Answer)
- Self-Evaluate (Critique)
- Decide (Next Step)
- Final Answer (LLM)
- Response
- Evaluation Aspects
- Relevance
- Support (Groundedness)
- Completeness
- Consistency
- Next Actions
- Retrieve Again
- Rewrite Query
- Refine Answer
- Stop (Good Enough)
- Architecture (Flow Diagram)
- Query Processor
- Understand and (optional) rewrite the query
- Retriever (Vector DB)
- Retrieve relevant documents / chunks
- Generator (LLM)
- Generate answer using retrieved context
- Self-Evaluator (LLM Critic)
- Evaluate the answer on relevance, support, completeness, consistency
- Decision Maker (LLM)
- Decide next action based on evaluation
- Memory (Conversation + Iterations)
- Store intermediate results, feedback and history
- Final Generator (LLM)
- Generate final refined answer (if needed)
- Return final answer to user
- How it Works (Step-by-Step)
- User asks a question.
- System retrieves initial relevant documents.
- LLM generates an answer using the retrieved context.
- LLM (critic) evaluates the answer: relevant? well-supported? anything missing or inconsistent?