从简单检索到智能代理,构建高效合规问答系统。
From Naive RAG to Deep Agentic Retrieval: An Evolving Context Engineering Pipeline for Regulatory Compliance
- 分阶段升级检索架构,逐步引入智能代理与规划机制。
- 新框架可降低90%以上高成本文档读取,提升回答准确率。
- 适合需要持续更新的法规合规类企业系统建设。
检索增强生成(RAG)是大型语言模型在企业文档库中应用的主要范式,但随着语料规模和查询复杂度增长,原始实现面临瓶颈。本文以安大略省电力公司(OPG)为案例,追踪其在安大略能源委员会(OEB)报告要求下,用于法规合规与费率审查的生产级检索系统的演进过程。依次经历了朴素RAG、混合检索加重排序、代理函数调用检索,以及基于代码工具合成与显式规划的深层多代理架构。我们识别出各阶段的失败模式与权衡点,并提出成熟架构:基于成本感知升阶的渐进证据获取(PEA-CAE)。该架构优先使用低成本、高精度检索,仅在预期证据增益足以覆盖延迟与成本时才读取全文。研究显示,在大规模动态法规语料上,上下文工程比领域微调更具可操作性与经济性。整体演进体现了经典信息检索思想的复兴,引入自适应查询重构、渐进式文档发现与层级子代理摘要等实用系统原语。运营日志进一步表明,现代检索系统本质为搜索过程,迭代证据获取与自适应规划正逐步取代单次检索,成为企业级问答的基石。
原文摘要 · Abstract (English)
Retrieval-augmented generation (RAG) is the dominant paradigm for applying large language models (LLMs) to enterprise document corpora, yet naive implementations encounter hard limits as corpus scale and query complexity grow. This paper traces the evolution of a production retrieval pipeline at Ontario Power Generation (OPG) for regulatory compliance and rate case analysis under Ontario Energy Board (OEB) reporting requirements. We examine successive stages: naive RAG, hybrid retrieval with re-ranking, agentic function-calling retrieval, and a deep multi-agent architecture with code-based tool synthesis and explicit planning, and identify the failure modes and tradeoffs that motivated each transition. We formalize the mature architecture as Progressive Evidence Acquisition with Cost-Aware Escalation (PEA-CAE): begin with low-cost, high-precision retrieval and escalate to full-document reads only when the expected evidence gain justifies latency and cost. Our findings show that context engineering is a more tractable and economically viable path than domain-specific fine-tuning for large, evolving regulatory corpora. More broadly, the progression toward deep agentic retrieval mirrors classical information retrieval ideas, introducing adaptive query reformulation, progressive document discovery, and hierarchical subagent summarization as practical system primitives. Operational traces further support the search-based nature of modern retrieval systems, where iterative evidence acquisition and adaptive planning increasingly replace single-pass retrieval as the foundation for enterprise-scale question answering.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。