收录期刊

    高级检索

    轻量级本地化RAG水利枢纽动态知识库问答方法研究——以万家寨、龙口水利枢纽为例

    Lightweight localized RAG-based dynamic knowledge base question answering method for water conservancy hubs——A case study of Wanjiazhai and Longkou Water Conservancy Hubs

    • 摘要: 针对水利枢纽现有知识库静态固化、问答模块语义理解能力弱且联动性差的问题,提出一种轻量级本地化检索增强生成(Retrieval-Augmented Generation,RAG)动态知识库问答方法。该方法以万家寨、龙口两大水利枢纽1 368份业务资料为基础,建立覆盖公司规程、运行管理、水利信息化与政策规范四大领域、16个二级分类的水利专业知识体系;基于Ollama与LangChain框架,在本地环境中部署Qwen3-Embedding与Qwen3:8B模型,轻量化实现“文本向量化—语义检索—增强生成”全链路搭建;通过多路混合检索策略融合BM25关键词匹配与向量语义检索优势,结合父子分块策略保留文档层级语义结构,并引入上下文窗口管理机制增强多轮对话连贯性,实现知识全生命周期动态管理与自然语言智能问答。该方法无需云端依赖与高昂硬件投入,通过纯本地化轻量部署即可完成枢纽知识的持续沉淀与按需复用。测试结果表明:本方法平均上下文精确率为0.91,平均上下文召回率为0.89,满足工程现场实时咨询需求,为黄河流域同类水利工程的知识服务智能化升级提供了可复用的轻量级技术方案。

       

      Abstract: To address the issues of a static and rigid knowledge base, weak semantic understanding, and poor integration of the question-answering module in the existing system of Wanjiazhai Water Conservancy Hub, a lightweight localized RAG-based dynamic knowledge base question-answering method is proposed. Based on 1,368 business documents from the Wanjiazhai and Longkou hubs, this method establishes a specialized water conservancy knowledge system covering four major domains,including company management and hub operation, with 16 subcategories. Using the Ollama and LangChain frameworks, the Qwen3-Embedding and Qwen3: 8B models are deployed locally to build a lightweight full pipeline of “text vectorization -semantic retrieval-augmented generation.” A multi-recall hybrid retrieval strategy is employed to combine the advantages of BM25 keyword matching and vector semantic retrieval, while a parent-child chunking strategy is adopted to preserve the hierarchical semantic structure of documents, and a context window management mechanism is introduced to enhance the coherence of multi-turn dialogues, thereby enabling full-lifecycle dynamic knowledge management and natural language intelligent question answering. The method requires no cloud dependency or high hardware investment, achieving continuous knowledge accumulation and on-demand reuse through pure localized lightweight deployment. RAGAS evaluation results show that the method achieves an average context precision of 91% and context recall of 89%, meeting the real-time consultation needs at engineering sites. This provides a replicable lightweight technical solution for the intelligent upgrade of knowledge services for similar water conservancy projects in the Yellow River basin.

       

    /

    返回文章
    返回