From Prompt to Protocol: Fast Charging Batteries with Large Language Models
Ge Lei, Ferran Brosa Planella, Sterling G. Baird, Samuel J. Cooper
TL;DR
This work tackles the challenge of slow, costly, and non-differentiable battery charging evaluations by introducing two gradient-free, LLM-driven closed-loop frameworks, P2O and P2P, that broaden the space of exploitable charging protocols. P2O uses an outer LLM-driven evolution of small neural-network architectures paired with an inner SAASBO optimizer, while P2P directly generates explicit protocols in a single loop. Across three case studies, both approaches outperform traditional baselines, achieving approximately a $4.2\%$ improvement in final SOH over a state-of-the-art baseline, with P2P delivering strong results under the same trial budgets and P2O excelling with additional outer-loop refinement. The results demonstrate that LLMs can encode language-based constraints, expand functional forms beyond hand-crafted templates, and enable efficient optimization in high-cost experimental settings, with broad implications for accelerated discovery in battery design and potentially other slow-domain optimization tasks.
Abstract
Efficiently optimizing battery charging protocols is challenging because each evaluation is slow, costly, and non-differentiable. Many existing approaches address this difficulty by heavily constraining the protocol search space, which limits the diversity of protocols that can be explored, preventing the discovery of higher-performing solutions. We introduce two gradient-free, LLM-driven closed-loop methods: Prompt-to-Optimizer (P2O), which uses an LLM to propose the code for small neural-network-based protocols, which are then trained by an inner loop, and Prompt-to-Protocol (P2P), which simply writes an explicit function for the current and its scalar parameters. Across our case studies, LLM-guided P2O outperforms neural networks designed by Bayesian optimization, evolutionary algorithms, and random search. In a realistic fast charging scenario, both P2O and P2P yield around a 4.2 percent improvement in state of health (capacity retention based health metric under fast charging cycling) over a state-of-the-art multi-step constant current (CC) baseline, with P2P achieving this under matched evaluation budgets (same number of protocol evaluations). These results demonstrate that LLMs can expand the space of protocol functional forms, incorporate language-based constraints, and enable efficient optimization in high cost experimental settings.
