English

VeraGrid-Agent: Tool-Augmented LLMs for Distribution Optimal Power Flow at the Grid Edge

Systems and Control 2026-07-28 v1

Abstract

Language models have demonstrated remarkable success in solving a wide range of tasks. However, answering complex scientific questions about the power flow often requires solving the distribution optimal power flow (D-OPF) problem. These questions call for numerical solvers and simulators, as linguistic reasoning from parametric knowledge often gives incorrect answers. In this work, we present VeraGrid-Agent, a tool-augmented LLM that autonomously writes the simulator input, executes the open-source VeraGrid solver, and reads the solver output before answering. To evaluate performance, we introduce VeraGrid-MCQ-150, a set of deterministic, expert template driven, 150150 multiple-choice questions. We evaluate the performance under two regimes: (i) no-tool reasoning and (ii) agent (LLM with simulator access). Without tools, every model performs with an accuracy of 42.7%42.7\%--49.3%49.3\%. However, with VeraGrid-Agent, accuracy increases to 97.3%97.3\%--100.0%100.0\%. We also do a failure-mode analysis to show that the few remaining errors arise from wrong interpretations during multi-step reasoning, rather than any failure in the simulators execution.

Cite

@article{arxiv.2607.25155,
  title  = {VeraGrid-Agent: Tool-Augmented LLMs for Distribution Optimal Power Flow at the Grid Edge},
  author = {Shivanshu Tripathi and Hamed Mohsenian-Rad and Maziar Raissi},
  journal= {arXiv preprint arXiv:2607.25155},
  year   = {2026}
}