liveBook · Manning

Crag pipeline

As explained in Retrieval Augmented Generation, The Foundational Ideas

A CRAG pipeline is an orchestration workflow that retrieves documents, evaluates them, and branches to refinement or corrective retrieval.

A CRAG pipeline adds a retrieval-quality gate to RAG. It retrieves internal documents, evaluates their confidence, and branches toward internal context, hybrid context, or corrective external search before generation. section 11.2.4

The pipeline separates evaluation from orchestration:

  • Score retrieved documents with a lightweight evaluator and classify them as correct, ambiguous, or incorrect. section 11.2.4
  • Use high-confidence internal evidence directly, supplement ambiguous results with web search, and replace incorrect retrieval with external results. section 11.2.4
  • Tune high and low thresholds on held-out data rather than treating defaults as universal; the gap defines an ambiguity zone. section 11.2.4

Outdated compliance retrieval

For the query about onboarding an EU PEP through expedited KYC, an outdated internal policy scores 0.76 while the 2024 directive scores 0.63. The ambiguous result triggers hybrid handling instead of allowing internal retrieval alone to produce the answer. section 11.2.4

How Retrieval Augmented Generation, The Foundational Ideas covers it

How deep it goes
Explains evaluator separation, confidence thresholds, branching, refinement, and threshold tuning, but not evaluator model training.
Examples
Uses an EU PEP KYC query, outdated internal policy, 2024 directive, confidence scores, and threshold sweeps.
What it assumes
Assumes a retriever, scored documents, refinement capability, and an available internal or external search source.
What you can do after
Apply it via a retriever, evaluator, and web-search dependency that branches on correct, ambiguous, or incorrect retrieval.
How it connects
Connects retrieval evaluation with RAG, web search, document refinement, hybrid retrieval, and hallucination control.

This explainer was generated by Manning's knowledge graph from the text of Retrieval Augmented Generation, The Foundational Ideas. The section links point to the parts of the book it draws on.