Architecture notes

Production AI · Advanced

A production RAG platform

Ingestion, retrieval, evaluation, observability, and the failure paths between them. This study begins with the system’s operating constraints and follows the decisions into production.

Architecture X-RayRequest flow
ClientHealthy
AI gatewayHealthy
OrchestratorHealthy
RetrievalHealthy
ModelHealthy

The request is classified, enriched with retrieved context, evaluated, and sent through the model gateway.

A production retrieval-augmented generation system is not a vector database attached to a model. It is a set of independently changing pipelines whose quality must be measured at their boundaries.

What the system must do

Ingest changing source material, preserve access boundaries, retrieve useful evidence, produce grounded answers, and leave enough operational evidence to explain why an answer was generated.

  • Keep ingestion independent from online query traffic.
  • Make retrieval quality observable before generation.
  • Contain model-provider failure behind a stable gateway.
  • Preserve citations and tenant boundaries throughout the flow.

The high-level decision

The orchestrator owns policy and degradation. Retrieval remains a replaceable capability, while the model gateway owns provider routing, quotas, and cost attribution. This prevents provider-specific behavior from leaking through the application.

Member section

Continue beneath the diagram.

The complete study covers detailed failure handling, data contracts, scaling decisions, evaluation strategy, security boundaries, and implementation sequencing.

Failure simulation Cost model Downloadable diagram