Knowledge Question-Answering Method in Power Field Based on Large Language Models
Yang Yan1,2, Liu Hao1,2, Song Jie3, Wu Yi3
1. School of Computer Science and Technology Chongqing University of Posts and Telecommunications Chongqing 400065 China; 2. Chongqing Key Laboratory of Computational Intelligence Chongqing University of Posts and Telecommunications Chongqing 400065 China; 3. State Grid Shanghai Municipal Electric Power Company Shanghai 200122 China
Abstract:Efficient and accurate acquisition of required knowledge from massive power field information sources poses a significant challenge to knowledge management in the power industry. Large language models (LLMs) have achieved breakthroughs in natural language understanding and generation, offering new avenues for knowledge question-answering. However, their application in the power field remains limited, as they struggle to comprehend specialized concepts and are prone to generating hallucinations. To address these issues, this paper proposes a knowledge question-answering method in the power field based on LLMs. This method improves the answer accuracy by integrating domain-specific knowledge bases with parameter-efficient fine-tuning optimization. Firstly, this paper constructs a power field knowledge question-answering framework based on retrieval-augmented generation (P-RAG). This framework employs an adaptive text information extraction method based on LLMs to efficiently parse power document layouts and extract text. It then recursively segments the text based on hierarchical document titles to ensure semantic integrity, building a high-quality power field knowledge base. On this basis, prompt engineering guides the LLM to fully comprehend and utilize this power knowledge, thereby improving question-answering accuracy. Secondly, this paper proposes a model optimization method based on sample augmentation and LoRA fine-tuning. This method utilizes LLMs to rewrite and expand original question-answering pairs, diversifying textual expressions without altering the semantics, thereby effectively resolving the scarcity of fine-tuning samples. Meanwhile, the question and retrieved relevant knowledge are combined as the training input vector to construct a sample structure consistent with the actual input of the P-RAG framework. Through LoRA fine-tuning, the understanding of power field knowledge by LLMs and their ability to utilize external retrieved information are enhanced. Comparative tests on a series of LLMs, including BaiChuan2-7B, BlueLM-7B, Qwen-7B, ChatGLM3-6B, and DeepSeek-R1-7B, show that after integration with the P-RAG framework, the performance of all participating models in power field knowledge question-answering tasks improved by 0.152 to 0.238. This verifies the universality and effectiveness of the P-RAG framework. Furthermore, based on Qwen-1.8B, Qwen-7B, and ChatGLM3-6B models, different fine-tuning optimization methods are compared. The results show that after standard LoRA fine-tuning optimization method, model performance decreased by approximately 0.035 to 0.104. In contrast, applying the proposed optimization method can improve the model performance by 0.024 to 0.124, validating the effectiveness of the proposed sample-augmentation fine-tuning optimization method. The following conclusions can be drawn from the experimental analysis: (1) The proposed P-RAG framework provides external professional power knowledge for general LLMs, alleviating the hallucination problem of LLMs in the power field. (2) Compared with standard LoRA fine-tuning, the proposed model optimization method is more suitable for the P-RAG framework. Since the training sample input is consistent with the actual input of the P-RAG framework, it enhances the ability of LLMs to utilize external information and improves question-answering accuracy.
杨燕, 刘豪, 宋杰, 吴裔. 基于大语言模型的电力领域知识问答方法[J]. 电工技术学报, 2026, 41(19): 6679-6692.
Yang Yan, Liu Hao, Song Jie, Wu Yi. Knowledge Question-Answering Method in Power Field Based on Large Language Models. Transactions of China Electrotechnical Society, 2026, 41(19): 6679-6692.
[1] 国家发展改革委, 市场监管总局, 生态环境部. 关于进一步强化碳达峰碳中和标准计量体系建设行动方案(2024—2025年)的通知[EB/OL]. (2024-07-14) [2025-09-01]. https://www.gov.cn/zhengce/zhengceku/202408/content_6967197.htm. [2] 高洪超, 康重庆, 李嘉宇, 等. 新型电力系统下虚拟电厂的技术演进研判与运营挑战分析[J]. 电工技术学报, 2025, 40(19): 6057-6071. Gao Hongchao, Kang Chongqing, Li Jiayu, et al.Analysis of technological evolution and operational challenges for virtual power plants in new power systems[J]. Transactions of China Electrotechnical Society, 2025, 40(19): 6057-6071. [3] 张思慧, 宋文胜, 唐涛, 等. 一种基于数字孪生的灰盒单相PWM整流器建模与健康参数监测方法[J]. 电工技术学报, 2025, 40(2): 463-476. Zhang Sihui, Song Wensheng, Tang Tao, et al.A gray-box single-phase PWM rectifier modeling and health parameter monitoring method based on digital twins[J]. Transactions of China Electrotechnical Society, 2025, 40(2): 463-476. [4] 金亮, 苏浩展, 郭劭男, 等. 基于AI的电磁场计算建模研究综述[J]. 电工技术学报, 2025, 40(10): 3013-3029. Jin Liang, Su Haozhan, Guo Shaonan, et al.A review of AI-based computational modelling studies of electromagnetic fields[J]. Transactions of China Electrotechnical Society, 2025, 40(10): 3013-3029. [5] 田萱, 吴志超. 基于信息检索的知识库问答综述[J]. 计算机研究与发展, 2025, 62(2): 314-335. Tian Xuan, Wu Zhichao.Review of knowledge base question answering based on information retrieval[J]. Journal of Computer Research and Development, 2025, 62(2): 314-335. [6] 刘雨蒙, 赵怡婧, 王碧聪, 等. 结构化数据库查询语言智能合成技术研究进展[J]. 计算机科学, 2024, 51(7): 40-48. Liu Yumeng, Zhao Yijing, Wang Bicong, et al.Advances in SQL intelligent synthesis technology[J]. Computer Science, 2024, 51(7): 40-48. [7] Chang Sijie, Wan Meng, Wang Jiaxiang, et al.Engineering material failure analysis report generation based on QWen and Llama2[J]. Results in Engineering, 2025, 26: 104532. [8] Xiong Luolin, Wang Haofen, Chen Xi, et al.DeepSeek: paradigm shifts and technical evolution in large AI models[J]. IEEE/CAA Journal of Automatica Sinica, 2025, 12(5): 841-858. [9] Ren Xinyuan, Song Yilin, Yan Chenwei, et al.CMed- baichuan: task explanation-enhanced prompt method onPromptCBLUE benchmark[C]//Health Information Processing: Evaluation Track Papers, 9th China Conference, CHIP 2023, Hangzhou, China, 2024: 31-48. [10] Zeng Zijian, Ratnavelu K.Deep learning-driven enhancement of chatbot interaction: a comprehensive study on ChatGLM[J]. WSEAS Transactions on Computer Research, 2024, 12: 377-383. [11] Acharya K, Velasquez A, Song H H.A survey on symbolic knowledge distillation of large language models[J]. IEEE Transactions on Artificial Intelligence, 2024, 5(12): 5928-5948. [12] Bai Ye, Yi Jiangyan, Tao Jianhua, et al.Fast end-to- end speech recognition via non-autoregressive models and cross-modal knowledge transferring from BERT[J]. IEEE/ACM Transactions on Audio, Speech, and Language Processing, 2021, 29: 1897-1911. [13] 文森, 钱力, 胡懋地, 等. 基于大语言模型的问答技术研究进展综述[J]. 数据分析与知识发现, 2024, 8(6): 16-29. Wen Sen, Qian Li, Hu Maodi, et al.Review of research progress on question-answering techniques based on large language models[J]. Data Analysis and Knowledge Discovery, 2024, 8(6): 16-29. [14] 黄君豪, 朱锦文, 向宗元, 等. 大语言模型引导的文本摘要技术与系统[J]. 计算机应用, 2024, 44(增刊1): 29-33. Huang Junhao, Zhu Jinwen, Xiang Zongyuan, et al.Large language model guided text summarization technology and system[J]. Journal of Computer Applications, 2024, 44(S1): 29-33. [15] 孙光耀, 赵志枭, 沈思, 等. 基于大语言模型的人文社会科学汉英机器翻译研究[J]. 数据分析与知识发现, 2025, 9(4): 32-45. Sun Guangyao, Zhao Zhixiao, Shen Si, et al.Optimizing Chinese-English machine translation for humanities and social sciences via large language models[J]. Data Analysis and Knowledge Discovery, 2025, 9(4): 32-45. [16] 蒲天骄, 赵琦, 王新迎. 电力人工智能技术研究框架、应用现状及展望[J]. 电网技术, 2025, 49(5): 1751-1770. Pu Tianjiao, Zhao Qi, Wang Xinying.Technology framework, application status and prospects on electric power artificial intelligence[J]. Power System Technology, 2025, 49(5): 1751-1770. [17] 籍欣萌, 昝红英, 崔婷婷, 等. 大模型在垂直领域应用的现状与挑战[J]. 计算机工程与应用, 2025, 61(12): 1-11. Ji Xinmeng, Zan Hongying, Cui Tingting, et al.Status and challenges of large language models applications in vertical domains[J]. Computer Engineering and Applications, 2025, 61(12): 1-11. [18] 牛泽原, 李嘉媚, 艾芊. 大语言模型在电力系统中的应用初探[J]. 电网技术, 2025, 49(4): 1327-1336. Niu Zeyuan, Li Jiamei, Ai Qian.Preliminary exploration of the application of large language models in power systems[J]. Power System Tech-nology, 2025, 49(4): 1327-1336. [19] 刘雪颖, 云静, 李博, 等. 基于大型语言模型的检索增强生成综述[J]. 计算机工程与应用, 2025, 61(13): 1-25. Liu Xueying, Yun Jing, Li Bo, et al.Survey of retrieval-augmented generation based on large language models[J]. Computer Engineering and Applications, 2025, 61(13): 1-25. [20] Wan Yuwei, Chen Zheyuan, Liu Ying, et al.Empowering LLMs by hybrid retrieval-augmented generation for domain-centric Q&A in smart manufacturing[J]. Advanced Engineering Informatics, 2025, 65: 103212. [21] Boateng G O, Sami H, Alagha A, et al.A survey on large language models for communication, network, and service management: application insights, challenges, and future directions[J]. IEEE Communi- cations Surveys & Tutorials, 2026, 28: 527-566. [22] Qian Hongjin, Liu Zheng, Mao Kelong, et al.Grounding language model with chunking-free in-context retrieval[C]//Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), Bangkok, Thailand, 2024: 1298-1311. [23] Petrov A V, MacAvaney S, MacDonald C. Shallow cross-encoders forLow-latency retrieval[C]//Advances in Information Retrieval. Cham: Springer, 2024: 151-166. [24] Islam S, Elmekki H, Elsebai A, et al.A comprehensive survey on applications of transformers for deep learning tasks[J]. Expert Systems with Applications, 2024, 241: 122666. [25] Zhu Yutao, Yuan Huaying, Wang Shuting, et al.Large language models for information retrieval: a survey[J]. ACM Transactions on Information Systems, 2025, 44(1): 1-54. [26] 张钦彤, 王昱超, 王鹤羲, 等. 大语言模型微调技术的研究综述[J]. 计算机工程与应用, 2024, 60(17): 17-33. Zhang Qintong, Wang Yuchao, Wang Hexi, et al.Comprehensive review of large language model fine- tuning[J]. Computer Engineering and Applications, 2024, 60(17): 17-33. [27] 秦董洪, 李政韬, 白凤波, 等. 大语言模型参数高效微调技术综述[J]. 计算机工程与应用, 2025, 61(16): 38-63. Qin Donghong, Li Zhengtao, Bai Fengbo, et al.Review of parameter-efficient fine-tuning technology for large language models[J]. Computer Engineering and Applications, 2025, 61(16): 38-63. [28] Chen Huiqiang, Zhu Tianqing, Liu Bo, et al.Fine- tuning a biased model for improving fairness[J]. IEEE Transactions on Big Data, 2025, 11(3): 1397-1410. [29] Inoue N, Otake S, Hirose T, et al.ELP-adapters: parameter efficient adapter tuning for various speech processing tasks[J]. 2024, 32: 3867-3880. [30] Mou Shangyang, Xue Qiang, Chen Xunquan, et al.Prefix tuning with prompt augmentation for efficient financial news summarization[J]. Journal of Compu-tational Social Science, 2024, 8(1): 19. [31] Balasubramanian P, Liyana S, Sankaran H, et al.Generative AI for cyber threat intelligence: applications, challenges, and analysis of real-world case studies[J]. Artificial Intelligence Review, 2025, 58(11): 336. [32] Liu Xiaoyang, Zhu Rongyi, Zha Daochen, et al.Differentially private low-rank adaptation of large language model using federated learning[J]. 2025, 16(2): 1-24. [33] 丁俐夫, 陈颖, 肖谭南, 等. 基于大语言模型的新型电力系统生成式智能应用模式初探[J]. 电力系统自动化, 2024, 48(19): 1-13. Ding Lifu, Chen Ying, Xiao Tannan, 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. [34] Xia Shujun, Hua Qing, Mei Zihan, et al.Clinical application potential of large language model: a study based on thyroid nodules[J]. Endocrine, 2025, 87(1): 206-213. [35] Zhang Tianyi, Kishore V, Wu F.BERTScore: evaluating text generation with BERT[C]//8th International Conference on Learning Representations, Addis Ababa, Ethiopia, 2020: 5333-5376.