Building a RAG demo is easy; running one reliably in production is not. This deep-dive covers the three pillars that separate toy demos from production-grade systems: (1) a robust indexing pipeline with a document registry, content-hash-based change detection, correct delete/update semantics, and alias-based zero-downtime index swaps; (2) chunking strategies that actually work (recursive, semantic, and structure-aware splitting) plus the embedding model-lock problem and how to handle model upgrades via shadow indexes; (3) an observability layer built on OpenTelemetry with chunk-level attribution per request, LLM-as-judge faithfulness/relevance scoring, and index version tagging in traces so quality regressions can be correlated to specific index updates. Concrete code examples are provided for the document registry schema, reindexing flow, content-hash gating, MVCC-style valid_from staging, and trace span structure.

12m read timeFrom arpitbhayani.me
Post cover image
Table of contents
RAG BasicsRAG Indexing PipelinesObservability and Retrieval TracingFootnote
1 Impression