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
  • Testing and Evaluation

    Saturday, August 15, 2026 in RAG Orchestration Architecture

    Purpose This note defines the minimum testing and evaluation matrix for the orchestration and RAG architecture. Its job is to answer one question: What is the minimum set of tests, golden cases, and acceptance thresholds needed before this …

    Read more

  • State Machine and Control Loop

    Monday, July 20, 2026 in RAG Orchestration Architecture

    Purpose This note defines how the request orchestration runtime moves. It focuses on lifecycle control rather than object structure. The main questions are: what states can a request enter how control returns to routing how retries and loop caps are …

    Read more

  • Runtime Objects

    Monday, July 20, 2026 in RAG Orchestration Architecture

    Purpose This note defines the main runtime objects used by the request orchestration layer. Its job is to answer a simple question: What durable objects should exist if the orchestration runtime is to be executable, observable, and reviewable? This …

    Read more

  • Confidence, Safety, and Validation

    Monday, July 20, 2026 in RAG Orchestration Architecture

    Purpose This note defines how the request orchestration runtime stays safe and reliable. It focuses on three tightly related concerns: input safety and scope control confidence-aware decision making validation before a result is accepted Related …

    Read more

  • Retrieval Layer

    Wednesday, July 15, 2026 in RAG Orchestration Architecture

    Purpose The retrieval layer is the online evidence-finding subsystem of RAG. Its job is to turn a well-shaped user request into a grounded context set that downstream answering can trust. It does this by: representing the request in …

    Read more

  • Request Orchestration Layer

    Wednesday, July 15, 2026 in RAG Orchestration Architecture

    Purpose The request orchestration layer is the shared control layer for a company-wide agent system. It extends the intention recognition layer (CH01) into a broader runtime: the front half — request conditioning, interpretation, ambiguity …

    Read more

  • RAG Layer

    Wednesday, July 15, 2026 in RAG Orchestration Architecture

    Purpose The RAG layer is the knowledge access and grounding capability inside the orchestration runtime. Its job is not simply to “retrieve documents”. Its real job is to: transform source material into retrievable knowledge retrieve the …

    Read more

  • Preface

    Wednesday, July 15, 2026 in RAG Orchestration Architecture

    Why This Design Exists This design started from a concrete RAG problem. The initial issue was simple: RAG performs badly when the input request is dirty, ambiguous, underspecified, or expressed in a form that does not match the downstream knowledge …

    Read more

  • Intention Recognition Layer

    Wednesday, July 15, 2026 in RAG Orchestration Architecture

    Purpose The intention recognition layer is the control layer that sits between raw user input and retrieval/reasoning. Its job is not only to “understand the user”, but to reduce ambiguity, narrow search space, control cost, and decide …

    Read more

  • Ingestion Validation Layer

    Wednesday, July 15, 2026 in RAG Orchestration Architecture

    Purpose The ingestion validation layer is the upstream data production layer for the RAG system. Its job is to transform raw source artifacts into validated canonical documents that are safe enough to pass downstream into enrichment, chunking, and …

    Read more