# Fine-Tuning LLMs to Generate Economical and Reliable Actions for the Power Grid

arXiv: https://arxiv.org/abs/2602.15350 · HTML: https://mlsanity.com/paper/2602.15350/

## Key facts

- No citing papers in the map yet (data through 14 Oct 2026).
- Builds on 11 of its 22 references that are in the map.
- First posted on arXiv 17 Feb 2026.

## Builds on (most cited first, 11 of 11)

- [Training language models to follow instructions with human feedback](https://mlsanity.com/paper/2203.02155/) (2022)
- [Direct Preference Optimization: Your Language Model is Secretly a Reward Model](https://mlsanity.com/paper/2305.18290/) (2023)
- [Scaling Laws for Neural Language Models](https://mlsanity.com/paper/2001.08361/) (2020)
- [Self-Consistency Improves Chain of Thought Reasoning in Language Models](https://mlsanity.com/paper/2203.11171/) (2022)
- [Large Language Models in Law: A Survey](https://mlsanity.com/paper/2312.03718/) (2023)
- [On the Robustness of Code Generation Techniques: An Empirical Study on GitHub Copilot](https://mlsanity.com/paper/2302.00438/) (2023)
- [Balancing Wildfire Risk and Power Outages through Optimized Power Shut-Offs](https://mlsanity.com/paper/2004.07156/) (2020)
- [Optimizing Transmission Infrastructure Investments to Support Line De-energization for Mitigating Wildfire Ignition Risk](https://mlsanity.com/paper/2203.10176/) (2022)
- [Distribution System Operation Amidst Wildfire-Prone Climate Conditions Under Decision-Dependent Line Availability Uncertainty](https://mlsanity.com/paper/2306.06336/) (2023)
- [Long Solution Times or Low Solution Quality: On Trade-Offs in Choosing a Power Flow Formulation for the Optimal Power Shutoff Problem](https://mlsanity.com/paper/2310.13843/) (2023)
- [Learning-Assisted Optimization for Transmission Switching](https://mlsanity.com/paper/2304.07269/) (2023)

## Abstract (arXiv)

Public Safety Power Shutoffs (PSPS) force rapid topology changes that can render standard operating points infeasible, requiring operators to quickly identify corrective transmission switching actions that reduce load shedding while maintaining acceptable voltage behavior. We present a verifiable, multi-stage adaptation pipeline that fine-tunes an instruction-tuned large language model (LLM) to generate open-only corrective switching plans from compact PSPS scenario summaries under an explicit switching budget. First, supervised fine-tuning distills a DC-OPF MILP oracle into a constrained action grammar that enables reliable parsing and feasibility checks. Second, direct preference optimization refines the policy using AC-evaluated preference pairs ranked by a voltage-penalty metric, injecting voltage-awareness beyond DC imitation. Finally, best-of-N selection provides an inference-time addition by choosing the best feasible candidate under the target metric. On IEEE 118-bus PSPS scenarios, fine-tuning substantially improves DC objective values versus zero-shot generation, reduces AC power-flow failure from 50% to single digits, and improves voltage-penalty outcomes on the common-success set. Code and data-generation scripts are released to support reproducibility.
