Self-RAG and Corrective RAG — The Agent Evaluates Its Own Retrieval
Implement Self-RAG reflection tokens and CRAG quality-based fallback. Build retry/fallback logic with LangGraph conditional edges.

Self-RAG and Corrective RAG — How Agents Evaluate Their Own Retrieval
In Part 1, we solved "where to search" with Query Routing. But what if the retrieved documents are useless? The biggest problem with Naive RAG is that it never evaluates retrieval quality. It throws search results directly to the LLM and hopes the LLM will somehow produce a good answer. In this post, we cover two key patterns where the Agent evaluates its own retrieval results and switches to a different strategy when quality is low.
Series: Part 1: Query Routing | Part 2 (this post) | Part 3: Production Pipeline
The Problem After Routing
Let's say Query Routing worked perfectly and selected the right data source. Even so, three failure modes remain.
1. Documents are completely irrelevant — You asked about "how to use conditional edges in LangGraph," but the retrieved documents are about "LCEL chaining in LangChain." The keywords are similar so vector similarity is high, but the documents are practically useless for generating an answer. The LLM combines such documents to produce plausible hallucinations.
2. Documents are only partially relevant — Out of 10 documents, only 3 are relevant and the other 7 are noise. When relevant information is buried in noise, the LLM generates unfocused answers.
3. Documents contradict each other — On "GIL changes in Python 3.12," one source claims "the GIL has been removed" while another says "optional disabling is now possible." If you feed both into the context without judgment, you get contradictory answers.
This is exactly why the Faithfulness score measured in RAG Evaluation is low. Without controlling retrieval quality, answer quality will be inconsistent no matter how good the LLM is.
To solve these problems, we need to insert an evaluation step between retrieval and generation. This is the core idea behind Self-RAG and CRAG.
Related Posts

TurboQuant in vLLM on One A100 — Capacity, Speed, and Accuracy of All Four Presets on an 8B Model
vLLM 0.28, Qwen3-8B bf16, one A100 80GB: KV capacity, batched throughput, 32K decode, needle-in-haystack, and GSM8K for bf16, fp8, and all four TurboQuant presets — the 8B size vLLM's own study skipped.

TurboQuant From Scratch on Real KV Tensors — What 3 Bits Actually Cost, and Why the Forks Beat the Paper's Layout
PolarQuant in 60 lines of PyTorch on real KV from Llama-3.2-1B and Qwen3-8B: 3-bit costs +10% perplexity, k8v4 +0.2%, QJL only pays below 4 bits, and the block-32 layout explains half the forks' edge.

TurboQuant llama.cpp CUDA Fork, Measured on an A100 — turbo4 Matches q4_0, turbo3 Breaks at Long Context
Qwen3-8B Q4_K_M on one A100, six KV types: perplexity, prefill, decode-at-depth, and VRAM measured. turbo4 matches q4_0 quality and beats q8_0 decode 2.5x at depth; turbo3 triples perplexity at 32K context.