Paper & Simulation
A language model writes battery fast-charging policies that, in simulation, keep about 4 points more battery health than a multi-step protocol
Ge Lei, Samuel Cooper and colleagues at Imperial had GPT-5 turn a plain-language list of limits into charging-policy code, either the whole current profile or a small neural network that Bayesian optimization then tunes. In an accelerated-ageing battery model both kept about 4.2 points more state of health than a three-step constant-current protocol. What changes is what gets searched, not how; every result is simulated.
●Peer-reviewed paper + simulation
Current boundary: Beats a three-step constant-current baseline on one accelerated-ageing simulated cell; real cells, other chemistries and comparisons with methods such as reinforcement learning are still missing

92.17% / 92.10%final state of health, best policies (P2O / P2P)
87.93%three-step constant-current baseline
After 100 accelerated-ageing simulated cycles; P2P used the baseline's 210 evaluations.
- Belief update
- When evaluations are slow, a language model helps by proposing new policy forms, not by replacing the optimizer.
- Strongest validation
- Same simulator, same limits, same number of evaluations as the baseline, ten runs per method.
- Key caveat
- All on one simulated cell with ageing sped up; no policy was run on a real cell.
01What happened
- Task
- Charge 0 to 90% in 30 minutes under 4.2 V, keeping the most battery health after 100 cycles.
- Approach
- GPT-5 reads the limits in plain text: P2P writes the current function; P2O writes a small neural network that Bayesian optimization (SAASBO) tunes.
- Interaction
- Software only: policy code runs in PyBaMM's electrochemical and ageing model, never on a real cell.
- Result
- Both beat the three-step baseline; P2P was best at the matched budget, P2O edged ahead with extra evaluations.
210evaluations per run (one evaluation = 100 charge cycles)
> 99%of generated candidates ran as written
4.2 Vvoltage cap written into the prompt
Ge Lei, Ferran Brosa Planella, Sterling G. Baird and Samuel J. Cooper published the paper in Advanced Science on 11 October 2026, open access under CC BY 4.0; a preprint went up on arXiv on 14 January 2026 as “From Prompt to Protocol”. Lei and Cooper are at Imperial's Dyson School of Design Engineering, Brosa Planella at the Faraday Institution and the University of Warwick, Baird at the University of Toronto's Acceleration Consortium.[S1][S2]
The paper proposes two routes. P2P (Prompt-to-Protocol, one loop) has the language model write a complete charging policy as code; each candidate is simulated and scored, and the good ones stay in a pool as parents for the next round. P2O (Prompt-to-Optimizer, two loops) has the model write a small neural network as the policy's form; an inner loop tunes its parameters with SAASBO, a Bayesian optimizer that needs no gradients, and an outer loop has the model revise the architecture from the scores. Every experiment used GPT-5 (the 2025-08-07 version, medium reasoning effort); the prompts give only operating limits such as voltage, current and time, not the cell's chemistry or parameters. The authors say no generated code was corrected by hand and over 99% of candidates ran as written.[S1]
Three cases run from simple to realistic: first, matching a predefined heat profile in a simple equivalent-circuit model, to test only the outer architecture search; second, finding the current that holds heat generation at a constant 0.4 W through a one-hour charge in a DFN electrochemical model, to test gradient-free tuning; third, the real fast-charging problem, in a DFN model with thermal and ageing submodels (SEI growth, particle cracking and others), charging from 0 to 90% in 30 minutes and reading battery health after 100 cycles.[S1]
92.17% / 92.10% / 87.93%
final state of health of the best P2O, P2P and three-step baseline results in case three[S1]

Fig. 1: (a) P2O: the language model generates and refines neural-network structures, with SAASBO tuning parameters in an inner loop; (b) P2P: the language model writes complete charging protocols directly, with no inner optimization. [S1]

Fig. 2: case one. On the complex predefined profile, LLM-guided P2O cut the loss by nearly two orders of magnitude within 20 iterations, faster than Bayesian optimization, a genetic algorithm and random search; on the simple constant-heat task the differences were much smaller. [S1]
02What changed
Workflow updateFast-charging optimization searches a few fixed shapes, such as three current steps: evaluations are slow, and more parameters cannot be tuned.
A language model proposes new policy forms from written limits and feedback keeps the good ones; safety limits go into the prompt.
Limits in words make candidates behave from the start
The authors put P2P's edge at a matched budget down to the prompt: it states that going above 4.2 V is penalised, so candidates tend to respect the voltage limit before any numerical evaluation. P2O's neural network cannot express a written constraint directly and has to discover it through repeated parameter trials, so it needed extra evaluations and outer-loop architecture changes to catch up with and slightly pass P2P. Their division of labour: P2P is efficient when the key constraints are easy to state in words; P2O is more systematic when many continuous parameters need tuning.[S1]
The best P2P policy charges hard while charge and voltage are low, lowers the current as the cell nears the high-charge, high-voltage region, and suppresses it as terminal voltage approaches 4.20 V. The authors attribute at least part of the health gain to moving charging effort away from the degradation-prone high-voltage region, while noting that the simulations do not separate the contribution of each ageing mechanism.[S1]
In case two the authors computed, with PyBaMM, the reference current that holds heat at exactly 0.4 W (not used during optimization), and the optimized current closely matched it; P2P optimized effectively within about 150 trials, fastest in the first 50, landing between SAASBO and random search. They note that such a check against a known answer is impossible in real experiments or more complex simulations.[S1]
03Why it matters
A charging team can let a language model propose policies in simulation and save scarce real-cell tests for the best few.
- Each evaluation runs 100 cycles, so which shapes get searched matters more than how they are tuned.
- No gradients are needed; the authors say the simulator could in principle be swapped for real cell cycling.
The authors sketch two routes to real cells: for P2O, pick promising network architectures in simulation and run only the inner tuning loop experimentally, perhaps with multi-fidelity Bayesian optimization combining simulated and measured data; for P2P, use simulation to update the policy pool so real experiments start from a simulation-informed point. They add that the size of the gain may change under measurement noise and model mismatch, and that deployment on real cells needs model calibration, safety screening and cell-level validation.[S1]
They also draw a boundary: the method complements surrogate modelling and differentiable optimal control, which may be better choices when a differentiable simulator, a calibrated reward model or many safe interactions are available. The paper does not compare against reinforcement learning or model-predictive control.[S1]
04Evidence status and boundaries
Evidence rung 2 / 5 · ComputedEvidence status
Proven
- At 210 evaluations P2P beats the three-step baseline
- With extra evaluations P2O ends slightly above P2P
- In case two the optimized current matches a computed reference
Boundaries
Suggested
- The gain comes partly from avoiding high voltage (the authors' reading)
- Accelerated ageing keeps the ranking (checked on 3 protocols)
Unknown
- Whether it holds on real cells
- Whether it holds for another chemistry
- How it compares with reinforcement learning
- Whether another prompt wording reproduces it
ClaimOn the same 210 evaluations, P2P's loss (lower means more health kept) is below the baseline's, with little spread over 10 runs.

ReadingOnly the left is a matched budget: baseline mean 0.4417, P2P 0.2242; on the right P2O ran extra iterations to 0.2179.
What the baseline is, and what happened when it was made richer.
The baseline follows Attia and colleagues' multi-step constant-current method: three constant-current segments switching at 20%, 40% and 60% charge, also reaching 90% in 30 minutes. It has three parameters, less expressive than the language-model policies. The authors raised it to 35 segments to give it comparable degrees of freedom, but within the same budget this high-dimensional piecewise protocol was hard to optimize and its health trajectories showed pronounced sawtooth patterns. Their conclusion: too few segments restrict the solution space, too many are hard to tune without added smoothness constraints or specialised optimizers.[S1]
How the ageing was sped up.
The cell is parameterised from the Ai2020 dataset. To see ageing within a feasible runtime, the authors scaled the SEI reaction exchange current density by five and adjusted electrode loss terms, particle cracking rates, the heat transfer coefficient and ambient temperature. To check that this keeps the ranking of protocols, they simulated three representative protocols for 1,000 cycles without acceleration, and the order held. Because the model does not include every harmful side reaction, such as electrolyte oxidation and transition-metal dissolution, they added a voltage penalty term.[S1]

Fig. 5: the charge phase is a model-generated variable current followed by a constrained constant-current segment; (c), (d) and (e) show the best, intermediate and worst trajectories for P2O, P2P and the three-step protocol, with colour bars giving state of health after 100 cycles. [S1]
05What I learned
- Transferable insight
- When evaluations are expensive, the bottleneck is often who defines the search space; a language model can propose it.
- Design heuristic
- Put one-sentence constraints, such as a voltage cap, in the prompt; leave fine tuning to an optimizer.
- Reading heuristic
- Find the matched-budget panel first: only the left of Fig. 4 is a fair comparison.
- Watch next
- The same loop on real cells; a matched-budget comparison with reinforcement learning.
Another paper from the same group adds a caution
Ge Lei and Samuel Cooper's May 2026 preprint, Elicitation Matters, found that when a language model serves as a surrogate, the prompt's wording and query format change its predictions and confidence and so the experiments chosen. For this fast-charging paper, that means P2P's result cannot be separated from how its prompt was written; another wording may not reproduce it.[S3]
There is a company behind this line
Samuel Cooper is Imperial's Professor of AI for Materials Design and co-founder and chief scientist of Polaron, spun out of his group in 2023; Ge Lei has worked part-time at Polaron as an LLM engineer since June 2025. The paper itself does not mention Polaron or say how the method is used there.[S4][S5]
Sources
Factual claims link to original announcements, project lists, trial records or journal papers where possible. Research plans are kept separate from completed results.
- S1LLMs as Representation Generators for Gradient-Free Scientific Optimization: A Case Study in Battery Fast ChargingAdvanced Science · Lei, Brosa Planella, Baird & Cooper · 2026.10.11 · Peer-reviewed paper · CC BY 4.0
- S2From Prompt to Protocol (preprint)arXiv 2601.09626 · 2026.01.14 · Preprint · not read
- S3Elicitation Matters: How Prompts and Query Protocols Shape LLM Surrogates under Sparse ObservationsarXiv 2605.04764 · Lei & Cooper · 2026.05.06 · Preprint
- S4Professor Sam CooperImperial College London · 2026.11.12 · University profile
- S5Lei Ge's homepageleigedove.github.io · 2026.11.12 · Personal homepage


