The digitalization of energy sectors has expanded the coding responsibilities for power engineers and researchers. This research article explores the potential of leveraging Large Language Models (LLMs) to alleviate this burden. Here, we propose LLM-based frameworks for different programming tasks in power systems. For well-defined and routine tasks like the classic unit commitment (UC) problem, we deploy an end-to-end framework to systematically assesses four leading LLMs-ChatGPT 3.5, ChatGPT 4.0, Claude and Google Bard in terms of success rate, consistency, and robustness. For complex tasks with limited prior knowledge, we propose a human-in-the-loop framework to enable engineers and LLMs to collaboratively solve the problem through interactive-learning of method recommendation, problem de-composition, subtask programming and synthesis. Through a comparative study between two frameworks, we find that human-in-the-loop features like web access, problem decomposition with field knowledge and human-assisted code synthesis are essential as LLMs currently still fall short in acquiring cutting-edge and domain-specific knowledge to complete a holistic problem-solving project.
翻译:能源领域的数字化扩大了电力工程师和研究人员的编程责任。本研究探讨了利用大语言模型(LLMs)减轻这一负担的潜力。针对电力系统中的不同编程任务,我们提出了基于大语言模型的框架。对于经典机组组合(UC)等定义明确的常规任务,我们部署了一个端到端框架,系统评估了四种主流大语言模型——ChatGPT 3.5、ChatGPT 4.0、Claude 和 Google Bard 的成功率、一致性和鲁棒性。对于先验知识有限的新型复杂任务,我们提出了一种人机协同框架,使工程师和大语言模型能够通过方法推荐、问题分解、子任务编程与综合的交互式学习来协作解决问题。通过两个框架的对比研究,我们发现人机协同功能(如网络访问、结合领域知识的问题分解以及人工辅助代码合成)至关重要,因为当前大语言模型在获取前沿知识和特定领域知识以完成整体性项目求解方面仍存在不足。