Intelligent Decision Support Framework for Distribution Network Maintenance Based on Knowledge-graph-based Retrieval-augmented Generation and Large Language Models
1.School of Electrical Engineering, Beijing Jiaotong University, Beijing 100044, China
2.China Electric Power Research Institute Company Limited, Beijing 100192, China
3.State Grid Shanghai Municipal Electric Power Company, Shanghai 200122, China
Show less
文章历史+
Received
Published
2025-05-22
2026-07-20
Issue Date
2026-10-13
PDF (3388K)
摘要
针对配网检修决策人工编排效率低、通用模型专业知识储备不足、易产生幻觉等问题,提出了一种融合知识图谱增强生成与大语言模型的配网检修辅助决策框架(knowledge graph retrieval-augmented generation and llm for distribution network maintenance decision support, KRAG-LLM-DM)。首先,开展电力检修文本解析及预处理,构建基础语料库。同时,设计抽取提示词,引导大语言模型(LLM)利用少样本学习与分步推理自动识别检修实体及关联方式。随后,经过实体消歧、社区检测之后形成检修知识图谱,并利用LLM为图谱形成摘要报告。最后,通过余弦相似度检索与上下文重组实现检修知识的动态增强生成。此外,还探索了Jina、Anything LLM及Nomic 3种文本向量嵌入模型的影响。实验结果表明,本文含RAG的检修辅助决策框架在上述3种检修问答中F1值大于0.7,较无检索增强、传统RAG分别提升1.60%、3.60%,其召回率与DeepSeek-V3、GPT-4、Kimi、GLM-4等基线对照模型相比略有提升。本文KRAG-LLM-DM框架的知识图谱构建效率较传统抽取方法有所提升,自动抽取实体与关系规模分别达18 280个节点和14 002条边。基于Gephi实现该图谱的可视化,同时开发检修辅助决策交互界面。本文含RAG的检修辅助决策框架能整合配网检修知识,一定程度上提升LLM在检修辅助决策中的专业性与可解释性。
Abstract
Objective Distribution network maintenance (DNM) decision-making currently relies heavily on manual scheduling and experiential judgment, resulting in inefficient data integration, delayed information processing, and subjective bias. Although general-purpose large language models (LLMs) demonstrate strong semantic capabilities, they lack sufficient domain-specific knowledge and frequently generate hallucinations when applied to specialized maintenance scenarios. Existing retrieval-augmented generation (RAG) approaches, which rely on flat text-chunk retrieval, fail to capture the complex hierarchical structures and causal relationships embedded in power maintenance documents, including equipment fault trees, operational procedure dependencies, and cross-referenced industry standards. To address these limitations, this study proposes an intelligent DNM decision support framework that integrates knowledge graph (KG)-based retrieval-augmented generation with LLMs, termed KRAG-LLM-DM. Methods The KRAG-LLM-DM framework comprises several interconnected stages. Maintenance-related documents, including research literature, industry standards, and operational procedures in PDF format, are first converted into UTF-8-encoded plain text. The documents are then segmented into text chunks with configurable length thresholds to facilitate subsequent vectorization and retrieval. For KG construction, an LLM-guided, prompt-based extraction mechanism is employed. The prompt template incorporates few-shot learning, chain-of-thought reasoning, parameterized entity-type placeholders, descriptive anchoring for entity disambiguation, and structured delimiters to ensure output consistency. The LLM automatically identifies maintenance entities, such as transformers and circuit breakers, together with their semantic relationships, including causal and operational dependencies, thereby extracting both explicit and implicit knowledge from the segmented text. Relationship strength is quantified using an implicit scoring scheme to enable fine-grained relational modeling. Following entity and relationship extraction, the KG is partitioned into communities using the Leiden algorithm, which optimizes modularity through iterative node movement, partition refinement, and network aggregation. For each community, the LLM generates a hierarchical summary using a structured prompt that requires critical entity identification, compliance assessment, technical capability evaluation, impact scoring with explanatory justification, and source citation tracking. The resulting community summaries and corresponding text chunks are vectorized using one of three embedding models (Jina, Anything LLM, or Nomic) and stored in a vector database. During inference, a user query is encoded into the same embedding space, and cosine similarity retrieval is performed to identify the most relevant text chunks and community summaries. The retrieved knowledge is then combined with the original query to construct an augmented context, which is subsequently provided to the LLM for response generation. Results and Discussions The framework was evaluated through a series of experiments involving knowledge base construction, ablation studies, embedding model comparisons, and decision performance benchmarking. A maintenance knowledge base was constructed from a corpus of power distribution maintenance documents. Chunk recall testing using a query on transformer maintenance procedures showed that the retrieved text fragments primarily exhibited similarity scores between 0.50 and 0.52. In the first case study, the LLM-based decision support framework without RAG was evaluated on both online cloud platforms and local offline environments. Temperature coefficient analysis showed that lower coefficients produced more structured and logically coherent responses, making them more suitable for high-reliability maintenance scenarios. Comparisons among mainstream LLMs using two maintenance planning queries showed that the proposed framework achieved recall rates of 0.719 and 0.694, representing improvements of 2.36%~13.40% over GPT-4, DeepSeek-V3, GLM-4, and Kimi. The RAG-enhanced responses explicitly referenced national standards and provided hierarchically structured answers with source attribution, whereas the baseline models often omitted domain-specific information, such as maintenance grading criteria and dynamic constraint conditions. In referential ambiguity scenarios, the framework achieved an F1-score of 0.625, marginally outperforming competing models that failed to explicitly resolve anaphoric references. The second case study investigated the influence of embedding models on the RAG-based decision support framework. Among the Jina, AnythingLLM, and Nomic embedding models, Jina demonstrated superior semantic representation of nested hierarchical structures in long power maintenance documents owing to its multi-task contrastive learning and decoupled attention mechanism. Nomic provided broader semantic representations and supported dynamic dimensionality pruning, whereas AnythingLLM exhibited information loss when processing compound semantic structures. The third case study evaluated the proposed KRAG-LLM-DM framework. The KG constructed using the proposed LLM-guided extraction method contained 18 280 nodes and 14 002 edges, with an average degree of 0.21, a modularity index of 0.953, and a network diameter of 9. Graph visualization was performed using Gephi with the ForceAtlas2 layout algorithm. Comparative analysis against keyword matching, regular expression, and SpaCy-based dependency parsing methods showed that the proposed approach achieved greater knowledge coverage and structural completeness while operating automatically without manual rule maintenance. Ablation experiments involving three complex maintenance question types yielded F1-scores of 0.726 3, 0.708 1, and 0.729 0 for the KRAG-LLM-DM framework, outperforming the LLM without RAG by 1.60%~2.63% and the standard RAG-based LLM by 1.80%~3.60%. Error analysis indicated that the KG structural constraints and hierarchical community semantics improved answer consistency and reduced logical fragmentation compared with flat RAG retrieval. Compared with parameter-matched baseline models, including Mistral, Olmo, and LLaMA, the KRAG-LLM-DM framework achieved average F1-score improvements of 3%~5% across device state identification, fault cause tracing, and maintenance recommendation tasks. Finally, an interactive decision support interface featuring knowledge provenance visualization, structured answer presentation, and multi-tab version switching was developed to facilitate human-machine collaborative decision-making. Conclusions The KRAG-LLM-DM framework integrates KG construction with retrieval-augmented generation to address the limitations of general-purpose LLMs in DNM decision support. The LLM-guided, prompt-based extraction mechanism enables the automated construction of structured maintenance KGs from heterogeneous unstructured text, producing 18 280 nodes and 14 002 edges without manual annotation. Hierarchical community summarization and vector-based retrieval provide semantically organized knowledge augmentation, achieving recall rates of 0.719 and 0.694 on maintenance regulation queries and grading-based planning tasks, representing improvements of 2.36%~13.40% over mainstream LLM baselines. The framework consistently outperforms both non-RAG and conventional RAG configurations on complex domain-specific queries, demonstrating the effectiveness of structured semantic constraints and multi-hop reasoning in improving the professionalism and interpretability of generated responses. Despite these advances, the coupling mechanism between LLM reasoning and graph-structured inference remains only partially interpretable, limiting the transparency of the causal reasoning process from evidence nodes to maintenance decisions. Future research should therefore focus on enhancing causal reasoning within LLM-KG integration for safety-critical power system applications.
2)不同LLM-DM的性能对比。为进一步评估不同LLM-DM的性能,设计两个问题进行验证,并对比DeepSeek-V3[35]、GPT-4[36]、Kimi[37]、GLM-4(General Language Model 4)[38]等主流LLM方法。问题1,“电网运行中,对计划检修的内容和要求是什么?请简短回答”;问题2,“年度检修计划、月度检修计划和日检修计划分别的内容和要求是什么?请简短回答”。针对上述问题,以《电网运行准则》(GB/T 31464—2022)[39]中计划检修相关段落为依据进行评估,结果如表2及附录B表B3、B4所示。由表2及附录B表B3、B4可以看出,本文所提框架对问题1的Recall为0.719,比GPT-4、Kimi、GLM-4、DeepSeek-V3等模型分别高2.36%、3.62%、4.32%、5.00%。传统主流模型回答在一定程度上涉及设备检查、安全保障等内容,但缺检修分级、动态约束条件等垂直内容。本文所提框架通过RAG检索检修知识库文献,生成结构化、专业性回答(如“检修需满足周期性、必要性和优先级要求”),且标注文献来源,增强了可追溯性与可信度。
QiaoJi, LuHongrui, LiGengfeng,et al.Adaptive robust emergency maintenance planning for urban power distribution systems[J].Journal of Global Energy Interconnection,2024,7(5):492-498.
HaoYanpeng, LiangWei, PanRuijian,et al.Review on intelligent live-line maintenance technology applied on power transmission lines[J].Electric Power Automation Equipment,2022,42(2):163-175.
ZhaoRixiao, YanDong, ZhouXiang,et al.Artificial intelligence supports energy supply and consumption in new power system[J].Journal of Global Energy Interconnection,2023,6(2):186-195.
YangHaolan, LiuYoubo, LiZhengbo,et al.Key technologies of specialized large language model for operation of next-era distribution system:A prospective study[J/OL].Proceedings of the CSEE,(2025-08-21)[2026-04-20].
NiuZeyuan, LiJiamei, AiQian.Preliminary exploration of the application of large language models in power systems[J].Power System Technology,2025,49(4):1327-1336.
MaChao, LiWufeng, ChenYufei,et al.Core technologies,technical characteristics,and application prospects of ChatGPT class big language models on the digital transformation of standards in electric power field[J].High Voltage Engineering,2025,51(4):1727-1746.
DingLifu, ChenYing, XiaoTannan,et al.Exploration of generative intelligent application mode for new power systems based on large language models[J].Automation of Electric Power Systems,2024,48(19):1-13.
LiGang, FangHong, LiuYunpeng,et al.Large-model drive technology in new power system:Status,challenges and prospects[J].High Voltage Engineering,2024,50(7):2864-2878.
WangXiaojun, DouJiaming, LiuZhao,et al.Review and prospect of explainable artificial intelligence and its application in power systems[J].Automation of Electric Power Systems,2024,48(4):169-191. doi:10.7500/AEPS20230509007
LewisP, PerezE, PiktusA,et al.Retrieval-augmented generation for knowledge-intensive NLP tasks[C]//Proceedings of the 34th International Conference on Neural Information Processing Systems.San Diego:NeurIPS,2020:9459-9474.
[22]
GaoYunfan, XiongYun, GaoXinyu,et al.Retrieval-augmented generation for large language models:A survey[EB/OL].(2024‒03‒27)[2026-04-20].
[23]
ZhaoPenghao, ZhangHailin, YuQinhan,et al.Retrieval-augmented generation for AI-generated content:A survey[J].Data Science and Engineering,2026,11(1):1-29. doi:10.1007/s41019-025-00335-5
GuptaS, RanjanR, SinghS N.A comprehensive survey of retrieval-augmented generation(RAG):Evolution,current landscape and future directions[EB/OL].(2024-10-03) [2025-04-20].
[27]
ZhuJunyi, ZhuShangming.Development of local knowledge base application using retrieval augmented generation technology[J].Journal on Communications,2024,45(Supp2):242-247.
GuoYan.Design and implementation of knowledge base of accounting firm based on large language model[J].The Chinese Certified Public Accountant,2024(7):96-101.
WangFei, WanXingchen, SunRuoxi,et al.Astute RAG:Overcoming imperfect retrieval augmentation and knowledge conflicts for large language models[C]//Proceedings of the 63rd Annual Meeting of the Association for Computational Linguistics.Vienna:ACL,2025:30553-30571. doi:10.18653/v1/2025.acl-long.1476
[32]
GaoJun.Research on power supply reliability method of distribution network based on knowledge map[D].Shanghai:Shanghai University of Engineering Science,2023.
[33]
高俊.基于知识图谱的配电网供电可靠性方法研究[D].上海:上海工程技术大学,2023.
[34]
WangJundong, YangJun, PeiYangzhou,et al.Distribution network fault assistant decision-making based on knowledge graph[J].Power System Technology,2021,45(6):2101-2112.
TraagV A, WaltmanL, van EckN J.From Louvain to leiden:Guaranteeing well-connected communities[J].Scientific Reports,2019,9:5233. doi:10.1038/s41598-019-41695-z
[40]
HagbergA A, SwartP J, SchultD A.Exploring network structure,dynamics,and function using NetworkX[R].Los Alamos:Los Alamos National Laboratory,2008
[41]
JacomyM, VenturiniT, HeymannS,et al.ForceAtlas2,a continuous graph layout algorithm for handy network visualization designed for the gephi software[J].PLoS One,2014,9(6):e98679. doi:10.1371/journal.pone.0098679
[42]
MohrI, KrimmelM, SturuaS,et al.Multi-task contrastive learning for 8192-token bilingual text embeddings[EB/OL].(2024-02-26)[2025-04-20].
[43]
All-MiniLM-L6-v2[CP/OL].[2025-04-20].
[44]
NussbaumZ, MorrisJ X, DuderstadtB,et al.Nomic embed:Training a reproducible long context text embedder[EB/OL].(2025-02-03)[2025-04-20].
[45]
BlondelV D, GuillaumeJ L, LambiotteR,et al.Fast unfolding of communities in large networks[J].Journal of Statistical Mechanics:Theory and Experiment,2008,2008(10):P10008. doi:10.1088/1742-5468/2008/10/p10008
[46]
LambiotteR, DelvenneJ C, BarahonaM.Laplacian dynamics and multiscale modular structure in networks[EB/OL].(2009-10-09)[2025-04-20].
[47]
阿里云.阿里云百炼:一站式大模型开发和服务平台[EB/OL].[2025-04-20].
[48]
YuTianyu, YaoYuan, ZhangHaoye,et al.RLHF-V:Towards trustworthy MLLMs via behavior alignment from fine-grained correctional human feedback[C]//Proceedings of the 2024 IEEE/CVF Conference on Computer Vision and Pattern Recognition(CVPR).Seattle:IEEE,2024:13807-13816. doi:10.1109/cvpr52733.2024.01310