PowerChain: A Verifiable Agentic AI System for Automating Distribution Grid Analyses
PowerChain automates DG analysis with verifiable DAG agents, reaching up to ~144% improvement.
Key Findings
Methodology
PowerChain casts distribution-grid analysis as a directed acyclic graph (DAG) workflow: nodes are tool calls with arguments, edges encode dependencies. The system uses an orchestrator O and verifier V, plus three structured context sources—tool descriptors Δ, expert-annotated verified workflow-task pairs Wv, and error-history H—to iteratively generate, execute, and correct workflows. It also performs Wv subset selection via sentence-transformer embeddings and cosine similarity, while tool exit strings provide explicit supervisory signals for self-correction.
Key Results
- On real utility data, PowerChain achieves up to a ~144% improvement over baselines on complex DG tasks. The paper further reports absolute pass@1 gains of 0.04–0.29, corresponding to roughly 10%–60% relative improvement, and absolute precision gains of 0.07–0.47, or about 30%–200% relative improvement.
- Using Vermont Electric Cooperative (VEC) feeder and AMI data, the system successfully automates three classes of analyses: steady-state three-phase power flow, dynamic hosting capacity (DHC) with ℓ1/ℓ2/ℓ∞ curtailment formulations, and current infeasibility analysis. It outperforms unstructured RAG baselines across tasks and LLMs.
- The Wv selector is not a naive retriever: the query and examples are first expanded into simpler sentences, then embedded with a sentence transformer and ranked by cosine similarity. Keeping only Top-X exemplars improves accuracy while lowering token cost, and the framework remains usable with lightweight open-source models such as Qwen3 8b.
Significance
This work moves LLMs from fluent assistants to verifiable engineering agents. For distribution grids, many analyses still depend on scarce experts manually composing scripts, solvers, and data pipelines; this is costly and hard to scale for rural cooperatives and municipalities. PowerChain offers a practical alternative: natural-language tasks are translated into executable workflows, then validated at the tool level to reduce hallucinations and execution errors. It directly targets a long-standing bottleneck in grid operations and planning.
Technical Contribution
The technical contribution is a workflow-automation architecture tailored to expert-level power-system analysis. First, it introduces DAG-based workflow generation rather than single-shot prompting. Second, it leverages verified expert trajectories as structured in-context supervision, avoiding expensive agentic SFT. Third, it adds dynamic example selection to control context length and token cost. Fourth, it closes the loop with error-aware feedback so that invalid tool calls are not merely detected but actively used to revise the workflow. Compared with plain RAG, it optimizes executable action sequences; compared with SFT, it is lighter and more adaptable to unseen tasks.
Novelty
The novelty lies in combining three ideas for unseen distribution-grid tasks: a general agentic framework, structured verified workflows as demonstrations, and path-level verification of intermediate steps. Unlike many web/code agents, the target problems here are engineering analyses such as three-phase unbalanced power flow, DHC, and infeasibility checking. The paper presents, to our knowledge, the first agentic system that automates expert-level DG analysis workflows without prescribed task-specific scripts.
Limitations
- The paper demonstrates the approach on real VEC data, but the excerpt does not provide a full task-by-task table, complete ablations, or all baseline details, so the exact boundary of generalization remains partly unclear.
- The system relies on high-quality tools, verified codebases, and curated trajectories. If the underlying solver, data interface, or network model is unstable, the verification loop can only surface those failures rather than solve them.
- The reported evidence focuses on offline analysis workflows; robustness under real-time control, cross-region transfer, or highly anomalous inputs is not yet systematically established.
Future Work
The authors point toward expanding the library of expert-annotated workflows, studying the cost–performance trade-off of subset selection more systematically, and generalizing the framework to additional self-contained power-system toolchains and more complex online analysis settings. A natural follow-up is tighter integration with stronger open-source LLMs, the MCP ecosystem, and automated testing infrastructure.
AI Executive Summary
As rapid electrification and decarbonization push more solar, storage, and electric vehicles onto distribution grids, routine analyses such as voltage-violation screening and hosting-capacity assessment are becoming both harder and more consequential. Today, many utilities still rely on expert-crafted scripts, solvers, and data pipelines, a workflow that is slow, brittle, and expensive. PowerChain is designed to turn those analyses into an automated, verifiable agentic process.
At its core, PowerChain does not just retrieve answers. It represents an analysis as a DAG workflow and uses an orchestrator O to assemble prompts from the user query q, the tool descriptors Δ, and expert verified examples Wv. A verifier V then executes the candidate workflow and returns tool-level error context. If the workflow fails, the error history is fed back into the next prompt, so the LLM can revise the sequence until a valid executable path emerges. The paper’s example workflow chains fetch_ami, load_solar, load_network, init_model, add_constraints, add_objective, solve_model, update_voltages, and check_voltage_violations.
The experiments use real Vermont Electric Cooperative (VEC) feeder and AMI data and cover three-phase steady-state power flow, dynamic hosting capacity with ℓ1/ℓ2/ℓ∞ curtailment, and current infeasibility analysis. Reported performance is strong: PowerChain improves up to ~144% over baselines, with absolute pass@1 gains of 0.04–0.29 and absolute precision gains of 0.07–0.47. Crucially, those gains hold across all tested LLMs and tasks, and the system can run locally with lightweight open-source models such as Qwen3 8b.
What makes the approach notable is its balance of rigor and practicality. It uses sentence-transformer embeddings and cosine similarity to select only the most relevant verified exemplars, reducing token cost without sacrificing quality. In effect, PowerChain offers a path toward “self-driving” grid analysis: utilities can ask a question in natural language, and the system composes, checks, and corrects the analysis flow in place of a human expert.
Deep Analysis
Background
Distribution grids are being reshaped by distributed energy resources, variable PV generation, EV charging, and bidirectional flows. Operators must manage voltage limits, feeder loading, and unbalance; planners must estimate hosting capacity and resilience under uncertainty. Existing power-system workflows often depend on expert-built scripts in tools like GridLAB-D and MATPOWER. Prior LLM work in power systems has shown promise for simulation, forecasting, and visualization, but it typically relies on narrow, hand-written prompts and does not generalize well to unseen engineering tasks.
Core Problem
The central question is whether a tool-augmented LLM can autonomously generate a stateful, executable workflow for an unseen distribution-grid analysis task without task-specific templates. This is hard because the domain combines heterogeneous solvers, data interfaces, and optimization routines, while correctness depends on multi-step reasoning rather than a single final answer. In power engineering, many errors only appear at intermediate steps, so endpoint-only supervision is insufficient.
Innovation
PowerChain contributes four main innovations. First, it frames analysis as executable DAG workflows instead of one-shot text generation. Second, it compresses expert knowledge into verified workflow-task pairs, providing supervision without full fine-tuning. Third, it dynamically selects context by expanding queries and ranking exemplars with embedding similarity, which reduces redundancy and token overhead. Fourth, it introduces error-context reasoning: tool exit strings are fed back into the orchestration loop so invalid workflows can be corrected, not merely rejected. Together, these design choices make the system generalize better than prompt templates or unstructured RAG.
Methodology
- �� Input and task framing: a natural-language query q, e.g., an L1-norm-based three-phase AC power-flow infeasibility check for a specific feeder and timestamp.
- �� Prompt construction: build Pk={q, Wv, Hk, Δ}, where Wv are verified expert trajectories, Hk is the evolving conversation/error history, and Δ are tool descriptors.
- �� Workflow generation: the orchestrator O calls the LLM to produce wk, a DAG workflow w=(V,C) with nodes V={(ti,Θi)} and dependency edges C.
- �� Execution and verification: the verifier V runs the workflow along the DAG path and collects step-wise exit strings Yk=[y1k,…,ymk] from tools.
- �� Feedback correction: set Hk+1 = Hk ⊕ (wk, Yk), then re-prompt the LLM until an executable \hat w is obtained or a limit is reached.
- �� Example selection: expand both q and each qv into simpler sentences, embed them with a sentence-transformer model Mexp(·), compute sim(q,qi^v)=cos(Mexp(q),Mexp(qi^v)), and keep the Top-X examples as Wsub_v.
- �� Tool backend: tools are exposed through validated codebases and a MCP-style backend, including fetch_ami, load_solar, load_network, init_model, add_constraints, add_objective, solve_model, update_voltages, and check_voltage_violations.
- �� Domain tasks: the benchmark covers three-phase steady-state power flow, DHC with ℓ1/ℓ2/ℓ∞ curtailment, and current infeasibility analysis.
Experiments
The evaluation is conducted on real Vermont Electric Cooperative (VEC) data, including feeder topology, AMI load data, and solar estimates. Three tool families underpin the benchmark: fetch_ami retrieves meter-level consumption from a secure AMI API; load_solar estimates PV generation from time, geolocation, and irradiance; load_network parses GeoJSON and GridLAB-D network files. The tested analysis types are steady-state three-phase power flow, dynamic hosting capacity with ℓ1/ℓ2/ℓ∞ formulations, and current infeasibility analysis. Baselines include unstructured RAG-style prompting and other agentic setups, with metrics such as pass@1, precision, and full-path correctness.
Results
PowerChain’s headline result is up to ~144% improvement over baselines on complex DG tasks in real utility data. More granularly, pass@1 improves by 0.04–0.29 in absolute terms, which the authors translate to roughly 10%–60% relative gain, while precision improves by 0.07–0.47, or about 30%–200% relative gain. These gains indicate that the system improves both first-try success and the correctness of the full workflow. The paper also reports that PowerChain is the best-performing method across all tested LLMs and tasks, including lightweight open-source models.
Applications
In the near term, PowerChain can help utilities and engineering teams automate voltage-violation screening, feeder studies, and hosting-capacity assessments using natural language requests. Because it can be deployed locally on open-source models, it is well suited to privacy-sensitive or resource-constrained organizations. Longer term, it could become the reasoning layer of a broader grid-analysis platform, where operators ask questions in plain English and receive auditable analysis workflows rather than static answers.
Limitations & Outlook
The main limitation is dependence on curated, verified tools and expert trajectories; if those are incomplete or the underlying solver stack is fragile, the agent can only expose the failure, not magically fix the domain model. The current evidence is also mostly offline and task-specific, so real-time operations, adversarial inputs, and cross-utility transfer remain open challenges. Maintaining and expanding the verified exemplar pool will require continued expert effort, even if far less than full fine-tuning.
Plain Language Accessible to non-experts
Imagine a big factory with many machines, conveyor belts, and inspectors. If a manager asks, “Can we add more solar panels here without overloading the system?”, a human expert usually has to walk around the factory, check the machines, read the logs, and then decide what sequence of checks to run. That takes time, and if the factory is busy, it becomes hard to keep up.
PowerChain acts like a smart factory manager that can also read the machine manual. It does not just guess an answer. First it looks at the question, then it picks the most relevant example plans from a shelf of approved past plans, then it tells the right machines what to do in the right order: fetch the data, build the model, add the rules, run the solver, and check the result. If one machine complains, it listens to the complaint and tries a better plan.
This matters because distribution grids are becoming more like that busy factory: more moving parts, more uncertainty, more things that can go wrong. PowerChain helps the computer do the tedious coordination work, while still checking itself so it does not quietly make a mistake. The result is faster, cheaper, and more repeatable analysis for the people who run the grid.
ELI14 Explained like you're 14
Think of PowerChain like a super-organized teammate in a group project. You say, “Hey, can you figure out whether this neighborhood can handle more solar panels at 10:00 AM on March 22?” A regular chatbot might just give a nice-sounding answer. PowerChain does something cooler: it writes down a plan, follows the plan step by step, and checks each step like a careful gamer checking their inventory before the boss fight.
Here is the trick. It has a pile of past “good homework answers” made by experts. When a new question comes in, it finds the most similar examples, kind of like looking up solved practice problems before an exam. Then it uses tools to grab AMI data, estimate solar power, load the network, build the model, and solve it. If a step fails, it doesn’t panic—it uses the error message like a clue in a puzzle.
That is why it is better than a model that only knows how to chat. It can actually do the job and fix itself when it makes a mistake. In the paper, this helped it beat baselines by as much as about 144%. Pretty wild, right?
So if you imagine the power grid as a giant strategy game, PowerChain is the teammate who not only knows the rules, but also knows how to pick the right strategy, check the map, and recover from bad moves. That is a big deal when electricity systems are getting more complicated every year!
Glossary
DAG workflow
A directed acyclic graph that represents a sequence of steps with dependencies. In plain terms, it is a plan where some actions must happen before others. Technically, each node is a tool invocation and each edge encodes precedence.
PowerChain generates and executes analyses as DAG workflows rather than one-shot answers.
Tool descriptor
A structured description of a tool, usually including its name, arguments, and a text summary. It helps the LLM know what the tool does and how to call it correctly.
Δ is injected into the prompt to support tool selection and argument mapping.
Verified workflow-task pair
A human-reviewed pairing of a natural-language task and an executable workflow known to work correctly. It functions like a high-quality demonstration for the agent.
Wv is the expert knowledge pool used for in-context reasoning.
Pass@1
The fraction of tasks solved correctly on the first attempt. In agentic settings, it measures immediate success without retries.
The paper reports an absolute pass@1 gain of 0.04–0.29.
Precision
The share of predicted correct results that are actually correct. For workflows, it reflects how reliably the agent’s actions and outputs match the target behavior.
PowerChain improves precision by 0.07–0.47 in absolute terms.
Open Questions Unanswered questions from this research
- 1 It remains unclear how well PowerChain transfers to new utilities, new feeder types, and broader tool ecosystems beyond the VEC-centered benchmark. The paper shows strong performance on the tested setting, but the limits of cross-domain generalization are not fully mapped out.
- 2 The verified exemplar pool is central to performance, yet the paper leaves open how to scale curation efficiently over time. Future work needs lower-cost ways to add, refresh, and de-duplicate expert trajectories without introducing bias or drift.
Applications
Immediate Applications
Automated distribution-study assistant
Utilities, cooperatives, and consulting teams can use PowerChain to trigger feeder studies, voltage checks, infeasibility tests, and hosting-capacity analysis from natural-language prompts. The main prerequisites are trusted data access, validated analytical tools, and auditable output storage.
Local private deployment
Organizations with strict data-governance constraints can run the system on open-source models such as Qwen3 8b and keep data on-premise. This is useful when AMI and network data cannot be sent to external cloud services.
Long-term Vision
A natural-language operating layer for grid analytics
In the long run, PowerChain could become the reasoning layer that connects many grid-analysis tools into one auditable interface. The main obstacles are broader tool coverage, stronger robustness, and sustained maintenance of verified workflows.
Abstract
Rapid electrification and decarbonization are increasing the complexity of distribution grid (DG) operation and planning, necessitating advanced computational analyses to ensure reliability and resilience. These analyses depend on disparate workflows comprising complex models, function calls, and data pipelines that require substantial expert knowledge and remain difficult to automate. Workforce and budget constraints further limit utilities' ability to apply such analyses at scale. To address this gap, we build an agentic system PowerChain, which is capable of autonomously performing complex grid analyses. Existing agentic AI systems are typically developed in a bottom-up manner with customized context for predefined analysis tasks; therefore, they do not generalize to tasks that the agent has never seen. In comparison, to generalize to unseen DG analysis tasks, PowerChain dynamically generates structured context by leveraging supervisory signals from self-contained power systems tools (e.g., GridLAB-D) and an optimized set of expert-annotated and verified reasoning trajectories. For complex DG tasks defined in natural language, empirical results on real utility data demonstrate that PowerChain achieves up to a 144/% improvement in performance over baselines.