Retrieval-Augmented Generation (RAG) systems have become the standard architecture for grounding large language models in organizational knowledge. Yet production deployments consistently expose a gap between clean prototype performance and real-world reliability. This paper identifies three root causes of that gap: data staleness, tenant data leakage, and query composition explosion. All three trace back to the conventional split-system data layer. We propose and evaluate a unified data layer built on PostgreSQL with native vector search (pgvector) and HNSW indexing. Controlled benchmarks on 50,000 documents show 92% latency reduction for date-filtered queries, 74% for tenant-scoped queries, zero synchronization inconsistency, and complete elimination of cross-tenant data leakage with 93% less synchronization code. We additionally discuss a recommended hybrid tier architecture
翻译:检索增强生成(RAG)系统已成为将大型语言模型与组织知识进行对齐的标准架构。然而,生产环境部署持续暴露出原型系统性能与真实场景可靠性之间的差距。本文识别了导致该差距的三个根本原因:数据陈旧、租户数据泄露以及查询组合爆炸。这三个问题均可追溯至传统的分裂式数据层。我们提出并评估了一种基于PostgreSQL构建的统一数据层,该层集成了原生向量搜索(pgvector)和HNSW索引。在5万份文档上的受控基准测试表明:带日期过滤查询的延迟降低92%,租户范围查询延迟降低74%,同步零不一致性,跨租户数据泄露完全消除,同步代码减少93%。此外,我们还讨论了一种推荐的分层混合架构。