Customising Electricity Contracts at Scale with Large Language Models
Jochen L. Cremer
TL;DR
This work introduces a chat-based framework that pairs Large Language Models with functional power-system programs to automate the design of customised electricity contracts at scale. By enabling end users to negotiate feasible, dynamic agreements through a structured conversation and API-backed grid analyses, the approach addresses grid inefficiencies caused by homogeneous standard contracts and lengthy expert-led studies. Case studies on LV residential, MV SME, and HV outage planning demonstrate that the method can improve grid utilization, shorten planning timelines, and support near real-time decision making, including a reported 7-fold increase in EV connections in residential scenarios and a 1-minute solution time for 365 SCOPFs. The study also analyzes robustness to input variations, model temperature, and privacy considerations, highlighting practical potential and the need for further work on security, benchmarks, and deployment strategies.
Abstract
The electricity system becomes more complex, connecting massive numbers of end-users and distributed generators. Adding or removing grid connections requires expert studies to align technical constraints with user requests. In times of labour shortages, carrying out these studies represents a significant amount of time that engineers at system operators spend in planning departments. As time is limited, only standard block connectivity contracts can be offered to end-users, or the requests pile up. Even if offers are made, these often do not perfectly match the user's requirements, leading to overpaying or underusing the grid capacity. This paper investigates whether end-users can negotiate individual, flexible time-of-use contracts directly with the grid using Large Language Models (LLMs) in chats at scale. This work addresses core technical challenges in automating contract design under grid constraints, integrating LLMs with power system models, and ensuring secure, reliable interaction. We develop a chat system using functional programs for power system analysis, enabling users to request customised, technically feasible contracts at scale. We demonstrate high accuracy in executing engineering studies, robustness to user input variations, self-assessment of connection requests by small and medium enterprises, and potential for secure, chat-enabled maintenance planning. This initial study paves the way toward developing a tailored LLM system, resulting in possible high-efficiency gains for grid planning and customer management. The code is available at: https://github.com/TU-Delft-AI-Energy-Lab/LLM-Electricity-Contracts
