Reference architecture / 01
Production RAG System
A knowledge workflow must answer from changing enterprise sources while preserving provenance and measurable retrieval behavior.
QUERY
RETRIEVE
RERANK
GENERATE
EVAL
- Problem
- Response quality cannot be improved reliably because retrieval, ranking, context assembly and generation are evaluated as one opaque step.
- Constraints
- Source freshness, access control, latency budget, heterogeneous documents, provider limits.
- Key decisions
- Versioned ingestion; hybrid retrieval; isolated reranking; citation contract; offline and online evaluation surfaces.
- Trade-offs
- Freshness versus index stability. Reranking quality versus latency. Context breadth versus model cost.
- Implementation approach
- Instrument each retrieval stage, establish a labeled query set, gate releases on retrieval and answer-level regression, then add cache policy.
- Evaluation & impact
- Expected operational impact: faster diagnosis, safer changes, and controllable quality. No quantitative result is claimed.
- Potential failure modes
- Stale indexes, permission leakage, low-recall retrieval, unsupported synthesis, cache contamination.
- Economic considerations
- Attribute embedding, retrieval, reranking and generation cost to a successful grounded answer.