RAG Orchestration Architecture

This note set starts from a concrete failure pattern — messy user input destroying downstream RAG quality — and follows the control logic that fixes it all the way up to a general request orchestration architecture.

The central idea is:

messy request
-> intention recognition
-> capability selection and governed execution
-> RAG as one capability

The design follows one discipline throughout: place a deterministic boundary at each point where probabilistic behavior causes damage, instead of trying to make the model smarter.

How To Read This Set

  1. CH00 tells the origin story; read it first to see why the architecture looks the way it does.
  2. CH01–CH02 are the control path (intention → orchestration); CH03 is the largest capability behind it.
  3. Use the internal-layer and evaluation chapters as reference depth, not front-to-back reading.

The Control Path

The RAG Subsystem

  • CH03_RAG-Layer.md Entry overview for the knowledge pipeline, plus the named end-to-end reference stack (MinerU → Elasticsearch + Qdrant → BGE reranker → direct LLM API with Instructor/Guardrails helpers).
  • CH03_01_Ingestion-Validation-Layer.md Offline quality gate: parse / OCR, structure reconstruction, validation, and quarantine so bad documents never reach the index.
  • CH03_02_Enrichment-Chunking-Indexing-Layer.md Turning validated documents into retrievable units: enrichment with authoritative/inferred separation, structure-aware chunking, lexical plus vector indexing.
  • CH03_03_Retrieval-Layer.md The online evidence-finding pipeline: query shaping, permission-aware filtering, hybrid candidate retrieval, fusion and reranking, context assembly.
  • CH03_04_Grounded-Answering-Layer.md The final guard: thin grounded generation with citation integrity, five explicit outcomes including abstention, and known failure modes of this layer.

Evaluation

  • CH04_Testing-and-Evaluation.md What makes the design reviewable rather than aspirational: minimum test matrix, golden-case structure, first-version acceptance thresholds, and regression strategy on top of the CH02_01 runtime objects.

Principles Behind The Design

The worldview is not re-derived here; it lives in standalone articles:

How those principles show up in this set:

  • intention recognition exists because input quality is the earliest useful control point
  • the harness owns permissions and escalation because reasoning should not imply execution authority
  • evaluator contracts sit outside generation because correctness needs an external comparator
  • context discipline exists because state is costly, degradable, and attention-limited
  • layers stay modular so failures remain local and ownership stays clear
  • no platform was designed first; orchestration grew out of a concrete RAG fix (the origin story is CH00_Preface.md)
  • RAG was split into internal layers only after each layer’s responsibility stabilized
  • policy stays central in definition but local in enforcement

One guardrail that follows from this style: a new layer earns its existence only by defining a real responsibility boundary, hiding unstable details, creating a stable contract, or improving reuse and ownership. A wrapper that forwards the same parameters inward without changing responsibility or ownership is ceremony, not modularity.

What This Set Covers And What It Does Not

Covered:

  • why bad input harms downstream RAG quality and cost
  • why intention recognition should happen before expensive retrieval
  • how that control pattern grows into broader request orchestration
  • why the harness is the authority boundary for execution
  • how RAG fits as one capability inside a governed system
  • a named end-to-end reference stack, assembled in CH03_RAG-Layer.md

Not yet defined:

  • calibration of the first-version confidence thresholds against labeled data
  • detailed per-domain golden sets for routing, permission, and retrieval
  • full production alert thresholds for latency, failure, and escalation drift
Posts in 2026
  • Grounded Answering Layer

    Wednesday, July 15, 2026 in RAG Orchestration Architecture

    Purpose The grounded answering layer turns retrieved evidence into a user-facing output that remains tied to sources. Its job is to: answer from retrieved evidence preserve citation and provenance distinguish direct evidence from inference abstain, …

    Read more

  • Enrichment Chunking Indexing Layer

    Wednesday, July 15, 2026 in RAG Orchestration Architecture

    Purpose The enrichment, chunking, and indexing layer is the downstream preparation layer that turns validated canonical documents into retrievable knowledge units. Its job is to: add retrieval-useful annotations without changing source truth define …

    Read more