Agentic Application in Power Grid Static Analysis: Automatic Code Generation and Error Correction
Fuente:
arXiv
Saved in:
| Main Authors: | , , |
|---|---|
| Format: | Preprint |
| Published: |
2026
|
| Subjects: | |
| Online Access: | |
| Tags: |
Add Tag
No Tags, Be the first to tag this record!
|
| _version_ | 1866918439516372992 |
|---|---|
| author | Wang, Qinjuan Yang, Shan Zhu, Yongli |
| author_facet | Wang, Qinjuan Yang, Shan Zhu, Yongli |
| contents | This paper introduces an LLM agent that automates power grid static analysis by converting natural language into MATPOWER scripts. The framework utilizes DeepSeek-OCR to build an enhanced vector database from MATPOWER manuals. To ensure reliability, it devises a three-tier error-correction system: a static pre-check, a dynamic feedback loop, and a semantic validator. Operating via the Model Context Protocol, the tool enables asynchronous execution and automatically debugging in MATLAB. Experimental results demonstrate that the system achieves a 82.38% accuracy regarding the code fidelity, effectively eliminating hallucinations even in complex analysis tasks. |
| format | Preprint |
| id |
arxiv_https___arxiv_org_abs_2604_09995 |
| institution | arXiv |
| publishDate | 2026 |
| record_format | arxiv |
| spellingShingle | Agentic Application in Power Grid Static Analysis: Automatic Code Generation and Error Correction Wang, Qinjuan Yang, Shan Zhu, Yongli Systems and Control Artificial Intelligence This paper introduces an LLM agent that automates power grid static analysis by converting natural language into MATPOWER scripts. The framework utilizes DeepSeek-OCR to build an enhanced vector database from MATPOWER manuals. To ensure reliability, it devises a three-tier error-correction system: a static pre-check, a dynamic feedback loop, and a semantic validator. Operating via the Model Context Protocol, the tool enables asynchronous execution and automatically debugging in MATLAB. Experimental results demonstrate that the system achieves a 82.38% accuracy regarding the code fidelity, effectively eliminating hallucinations even in complex analysis tasks. |
| title | Agentic Application in Power Grid Static Analysis: Automatic Code Generation and Error Correction |
| topic | Systems and Control Artificial Intelligence |
| url | https://arxiv.org/abs/2604.09995 |