Adaptive Solving Method for Power System Operation Based on Knowledge-Driven LLM Agents
Abstract
1. Introduction
- (1)
- An LLM agent-based framework is developed, in which the LLM serves as the optimization solver and is integrated with a multi agent collaboration mechanism for task decomposition and execution.
- (2)
- An adaptive solving workflow based on a standardized operating procedure (SOP) is proposed to decompose power system operation optimization into modular steps. The workflow explicitly defines agent roles and operational specifications, ensuring uniformity and coordinated task execution.
- (3)
- A knowledge-driven mechanism based on retrieval-augmented generation (RAG) is constructed to incorporate an external knowledge base for decision support. The integration of knowledge retrieval and reasoning enhances the accuracy and relevance of the decision-making process.
2. Solving Paradigm of LLM Agents for Power System Problems
3. Adaptive Solving Method Based on LLM Agent Framework
3.1. LLM as Optimization Solver
3.2. LLM-Driven Multi-Agent Framework
- (1)
- The memory module includes short-term and long-term memory. Short-term memory is temporary information for the current optimization process to support the continuity of multi-round interactions. Long-term memory stores historical interaction data and optimization records to inform future optimizations. This ensures that agents have knowledge transfer and behavioral consistency in similar scenarios.
- (2)
- The knowledge base is an external repository of domain information, storing information such as device parameters, operating rules, and domain best practices, as well as providing agents with guiding references across tasks. Knowledge bases provide structured data and predefined rules for long-term memory to inform key decisions in the optimization process.
- (3)
- The prompt contains execution and feedback criteria to standardize and guide the behavior of the LLM. The execution criteria define the goals and modular structure of the generation, and the feedback criteria serve to adjust the agent’s behavior based on the results.
- (4)
- The task objective is the specific requirements of the optimization problem, including the objective function, constraints, and action sets. This has been described previously.
- (5)
- The skills and tools module covers the power flow calculation tool, API, and RAG. The power flow calculation tool provides power system state calculations for agents, the API supports interaction with external data sources or services, and the RAG provides knowledge-base retrieval services for the LLM.
- (6)
- Three agents are responsible for task execution: the Action Agent, Power Flow Agent, and Record Agent. The Action Agent generates action sets through data analysis and logical reasoning. The Power Flow Agent receives decisions from the Action Agent, performs power flow calculation, and feeds back the results. The Record Agent is responsible for extracting and recording key data to provide historical reference and traceability mechanisms.
3.3. SOP-Based Adaptive Solving Workflow
| Algorithm 1: Reactive power optimization workflow following SOP. | ||
| 1: | Task Initialization and SOP Coding: Encoding of processes and standards for reactive power optimization tasks following SOP | |
| 2: | Role Setting for Agents: Define the roles and responsibilities of agents with Prompt and equip agents with tools or skills | |
| 3: | Initialize Input Parameters: Set initial values and constraints for control actions (UG, T, and QC) | |
| 4: | for i = 1 to num_episodes, do | |
| 5: | Generating Action Sets: Action Agent generates action sets based on the objective function (PLoss) and the current system state (U, UG, T, QG and QC), and executes the action steps following SOP. | |
| 6: | Power Flow Calculation: Power Flow Agent receives the strategy from Action Agent, performs the power flow calculation and returns the PLoss and U. | |
| 7: | Data Recording and Feedback: Record Agent records key data and feeds it back to Action Agent to support the next round of action adjustments. | |
| 8: | Convergence judgment: Judging whether the task converges or not according to the optimization objective and the predefined convergence conditions. | |
| 9: | end for | |
| 10: | Validation and archiving: The final results are validated to ensure that the solution meets safe operating standards. All operational data and iteration information is archived. | |
- (1)
- Role constraint: Each agent operates strictly within its predefined functional scope and cannot generate outputs beyond its assigned responsibilities.
- (2)
- Interface constraint: Agent outputs must follow a structured and machine-readable format (dictionaries with predefined keys), enabling deterministic parsing and validation.
- (3)
- Execution-order constraint: Agents are invoked in a fixed sequence following the SOP workflow, ensuring that upstream results (e.g., power flow evaluation) are completed before downstream decision reasoning.
- (4)
- All generated control actions must respect predefined physical limits and operational constraints before execution.
4. Knowledge-Driven Approach Supported by RAG
4.1. RAG-Based Knowledge Enhancement and Decision Support
4.2. Triplet Representation and Knowledge-Base Construction for Power Grid State Transitions
5. Case Study
5.1. Test System Description
5.2. Adaptive Iterative Optimization of LLM Agents
5.3. Adaptive Iterative Optimization of Knowledge-Driven LLM Agents
6. Conclusions
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- Wu, X.; Chen, Z.; Jiang, H.; Luo, S.; Zhao, Y.; Zhao, D.; Dang, P.; Gao, J.; Lin, L.; Wang, H. From Forecasting to Foresight: Building an Autonomous O&M Brain for the New Power System Based on a Cognitive Digital Twin. Electronics 2025, 14, 4537. [Google Scholar] [CrossRef]
- Xue, Y.; Yu, X. Beyond Smart Grid—Cyber–Physical–Social System in Energy Future [Point of View]. Proc. IEEE 2017, 105, 2290–2292. [Google Scholar] [CrossRef]
- Zhang, Y.; Shi, X.; Zhang, H.; Cao, Y.; Terzija, V. Review on Deep Learning Applications in Frequency Analysis and Control of Modern Power System. Int. J. Electr. Power Energy Syst. 2022, 136, 107744. [Google Scholar] [CrossRef]
- Banad, Y.M.; Sharif, S.S.; Rezaei, Z. Artificial Intelligence and Machine Learning for Smart Grids: From Foundational Paradigms to Emerging Technologies with Digital Twin and Large Language Model-Driven Intelligence. Energy Convers. Manag. X 2025, 28, 101329. [Google Scholar] [CrossRef]
- Liu, X.; Zhang, J.; Zhou, S.; van der Plas, T.L.; Vijayaraghavan, A.; Grishina, A.; Zhuang, M.; Schofield, D.; Tomlinson, C.; Wang, Y.; et al. Towards Deployment-Centric Multimodal AI beyond Vision and Language. Nat. Mach. Intell. 2025, 7, 1612–1624. [Google Scholar] [CrossRef]
- Di Maio, F.; Gozzi, M. Degradation of Multi-Task Prompting Across Six NLP Tasks and LLM Families. Electronics 2025, 14, 4349. [Google Scholar] [CrossRef]
- Lee, M. A Mathematical Investigation of Hallucination and Creativity in GPT Models. Mathematics 2023, 11, 2320. [Google Scholar] [CrossRef]
- Fan, H.; Liu, X.; Fuh, J.Y.H.; Lu, W.F.; Li, B. Embodied Intelligence in Manufacturing: Leveraging Large Language Models for Autonomous Industrial Robotics. J. Intell. Manuf. 2025, 36, 1141–1157. [Google Scholar] [CrossRef]
- Yan, Z.; Xu, Y. Real-Time Optimal Power Flow with Linguistic Stipulations: Integrating GPT-Agent and Deep Reinforcement Learning. IEEE Trans. Power Syst. 2024, 39, 4747–4750. [Google Scholar] [CrossRef]
- M. Bran, A.; Cox, S.; Schilter, O.; Baldassari, C.; White, A.D.; Schwaller, P. Augmenting Large Language Models with Chemistry Tools. Nat. Mach. Intell. 2024, 6, 525–535. [Google Scholar] [CrossRef] [PubMed]
- Satpute, P.; Tiwari, S.; Gupta, M.; Ghosh, S. Exploring Large Language Models for Microstructure Evolution in Materials. Mater. Today Commun. 2024, 40, 109583. [Google Scholar] [CrossRef]
- Holland, M.; Chaudhari, K. Large Language Model Based Agent for Process Planning of Fiber Composite Structures. Manuf. Lett. 2024, 40, 100–103. [Google Scholar] [CrossRef]
- Xu, S.; Wei, Y.; Zheng, P.; Zhang, J.; Yu, C. LLM Enabled Generative Collaborative Design in a Mixed Reality Environment. J. Manuf. Syst. 2024, 74, 703–715. [Google Scholar] [CrossRef]
- Xiao, T.; Xu, P. Exploring Automated Energy Optimization with Unstructured Building Data: A Multi-Agent Based Framework Leveraging Large Language Models. Energy Build. 2024, 322, 114691. [Google Scholar] [CrossRef]
- Mehandru, N.; Miao, B.Y.; Almaraz, E.R.; Sushil, M.; Butte, A.J.; Alaa, A. Evaluating Large Language Models as Agents in the Clinic. npj Digit. Med. 2024, 7, 1–3. [Google Scholar] [CrossRef] [PubMed]
- Hu, J.; Asmuni, H.; Wang, K.; Li, Y. Enhanced Knowledge Graph Completion Based on Structure-Aware and Semantic Fusion Driven by Large Language Models. Electronics 2025, 14, 4521. [Google Scholar] [CrossRef]
- Lakatos, R.; Pollner, P.; Hajdu, A.; Joó, T. Investigating the Performance of Retrieval-Augmented Generation and Domain-Specific Fine-Tuning for the Development of AI-Driven Knowledge-Based Systems. Mach. Learn. Knowl. Extr. 2025, 7, 15. [Google Scholar] [CrossRef]
- Bahr, L.; Wehner, C.; Wewerka, J.; Bittencourt, J.; Schmid, U.; Daub, R. Knowledge Graph Enhanced Retrieval-Augmented Generation for Failure Mode and Effects Analysis. J. Ind. Inf. Integr. 2025, 45, 100807. [Google Scholar] [CrossRef]
- Wang, J.; Wang, B.; Gao, J.; Li, X.; Hu, Y.; Yin, B. TDN: Triplet Distributor Network for Knowledge Graph Completion. IEEE Trans. Knowl. Data Eng. 2023, 35, 13002–13014. [Google Scholar] [CrossRef]
- Zhang, G.; Xiong, Y.-J.; Hu, J.-P.; Xia, C.-M. Triplet Trustworthiness Validation with Knowledge Graph Reasoning. Eng. Appl. Artif. Intell. 2025, 141, 109813. [Google Scholar]












| Voltage Compliance Rate (%) | Power Loss (MW) | |
|---|---|---|
| OPF | 95.3 | 7.112 |
| Proposed method | 100.0 | 7.240 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.
Share and Cite
Li, B.; Zhang, H.; Cao, Y. Adaptive Solving Method for Power System Operation Based on Knowledge-Driven LLM Agents. Electronics 2026, 15, 478. https://doi.org/10.3390/electronics15020478
Li B, Zhang H, Cao Y. Adaptive Solving Method for Power System Operation Based on Knowledge-Driven LLM Agents. Electronics. 2026; 15(2):478. https://doi.org/10.3390/electronics15020478
Chicago/Turabian StyleLi, Baoliang, Hengxu Zhang, and Yongji Cao. 2026. "Adaptive Solving Method for Power System Operation Based on Knowledge-Driven LLM Agents" Electronics 15, no. 2: 478. https://doi.org/10.3390/electronics15020478
APA StyleLi, B., Zhang, H., & Cao, Y. (2026). Adaptive Solving Method for Power System Operation Based on Knowledge-Driven LLM Agents. Electronics, 15(2), 478. https://doi.org/10.3390/electronics15020478

