[Paper Review] Enabling Large Language Models to Perform Power System Simulations with Previously Unseen Tools: A Case of Daline
The paper presents a four-module modular framework to empower LLMs to perform power system simulations using a previously unseen toolbox (Daline), achieving 96.07% coding accuracy for GPT-4o on 34 tasks.
The integration of experiment technologies with large language models (LLMs) is transforming scientific research, offering AI capabilities beyond specialized problem-solving to becoming research assistants for human scientists. In power systems, simulations are essential for research. However, LLMs face significant challenges in power system simulations due to limited pre-existing knowledge and the complexity of power grids. To address this issue, this work proposes a modular framework that integrates expertise from both the power system and LLM domains. This framework enhances LLMs' ability to perform power system simulations on previously unseen tools. Validated using 34 simulation tasks in Daline, a (optimal) power flow simulation and linearization toolbox not yet exposed to LLMs, the proposed framework improved GPT-4o's simulation coding accuracy from 0% to 96.07%, also outperforming the ChatGPT-4o web interface's 33.8% accuracy (with the entire knowledge base uploaded). These results highlight the potential of LLMs as research assistants in power systems.
Motivation & Objective
- Motivate and enable LLMs to act as research assistants for power system simulations.
- Develop a modular framework combining prompt design, enhanced RAG, toolbox-oriented design, and feedback loops.
- Validate the framework on 34 tasks across the Daline power flow and linearization toolbox.
- Show that integrating multiple techniques yields superior simulation coding accuracy over baseline approaches.
Proposed method
- Propose a four-module framework: (i) prompt design, (ii) enhanced retrieval-augmented generation (RAG), (iii) LLM-oriented toolbox supplementary design, (iv) feedback loop design.
- Use chain-of-thought and few-shot prompting tailored to toolbox-based simulations to guide LLM actions step-by-step.
- Develop an enhanced RAG strategy with query-planning to decompose long requests into sub-requests and map them to function/parameter keywords for parallel retrieval.
- Create RAG-friendly knowledge-base documents and syntax-checking/error-reporting for the toolbox to improve information retrieval and reliability.
- Implement a feedback loop with detailed error reports and troubleshooting guidance to iteratively correct code.
- Validate the framework on 34 simulation tasks in Daline with 20 technique schemes, measuring coding accuracy across up to 3 attempts per task.
Experimental results
Research questions
- RQ1Can a modular framework enable LLMs to perform power system simulations with tools unknown to the model?
- RQ2How do prompt design, enhanced RAG, toolbox design, and feedback loops individually and cumulatively affect coding accuracy in power system simulations?
- RQ3What is the impact of using Daline as a previously unseen toolbox on LLM performance?
- RQ4What combination of techniques yields the highest simulation coding accuracy for LLMs?
Key findings
- GPT-4o with the proposed framework achieves 96.07% coding accuracy across 34 tasks, greatly surpassing a 33.82% accuracy from the ChatGPT-4o web interface.
- Using enhanced RAG alone improves accuracy over baseline retrieval approaches (e.g., GPT-3.5-NK to GPT-3.5-Full).
- Few-shot prompting substantially boosts accuracy when combined with enhanced RAG (e.g., from 45.09% to 81.37%).
- RAG-friendly knowledge-base documents and syntax-checking/error reporting materially improve reliability and accuracy (e.g., 75.49% vs 60.29% when comparing RAG-friendly docs to user manual only).
- The accuracy gains are cumulative across techniques, with multiple components contributing to the top performance (GPT-4o-Full at 96.07%).
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.