Pith. sign in

REVIEW 5 major objections 6 minor 19 references

Large Language Models for Solving Economic Dispatch Problem

T0 review · 5 major / 6 minor · reviewed 2026-08-07 · deepseek-v4-flash

Pith's one-line read No optimization code, no training: five example dispatches let LLMs solve economic dispatch.

desk verdict A plausible first test of LLMs for economic dispatch, but the evidence doesn't rule out simple interpolation; the 'effectively solve' claim is premature. read the letter →

arxiv 2505.21931 v1 pith:I5XAH74D submitted 2025-05-28 eess.SY cs.SY

classification eess.SYcs.SY
keywords economicdispatchlargelanguagemodelsfew-shotpromptingevolutionaryIEEE118-bussystemGurobioptimizerpoweroptimizationconstraintsatisfaction
verification ladder T0 review T1 audit T2 compute T3 formal

The pith

A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.

The reading

This paper tries to establish that an off-the-shelf large language model, given only five Gurobi-generated dispatch examples in its prompt, can solve the classic lossless economic dispatch problem for a 19-unit IEEE 118-bus system in a single interaction. The authors deliberately omit cost coefficients, generation limits, and any mathematical formulation, so the model must infer the objective and constraints from the examples. Across ten unseen demand levels, the tested reasoning models produce dispatch patterns close to Gurobi's solutions, with relative cost errors mostly around four percent. The paper also reports that accuracy deteriorates at demands near the edges of the example range, where errors rise to roughly 15 to 18 percent, and that the non-evolutionary prompting style gives fewer constraint violations than an evolutionary prompting style.

What carries the argument

The mechanism is in-context few-shot learning with five Gurobi-optimal dispatch vectors as the only data. The problem is lossless economic dispatch with a quadratic cost $\sum_{i} (a_i P_{Gi}^2 + b_i P_{Gi} + c_i)$, an equality constraint that the generator outputs sum to the load, and per-unit lower and upper limits. Because the prompt omits the coefficients and limits, the five examples must encode the cost structure and feasible ranges implicitly. Two task instructions are tested: a non-evolutionary instruction asking the model to follow the trend and scale the generators proportionally, and an evolutionary instruction asking the model to repeatedly select, crossover, and mutate example vectors to produce ten candidates and pick the best. The machinery works by pattern extrapolation rather than by solving the optimization explicitly, which explains both the low interior errors and the edge-of-sample failures.

What would settle it

Evaluate the same five-example prompt at a demand of roughly 6450 MW, near the 6515 MW system maximum, and compare the model's dispatch and cost with Gurobi's optimum; if the model cannot keep exact power balance and respect the implied unit limits, the examples are not carrying the constraint information the claim requires.

Watch

Extended reading notes

Core claim

The central claim is that few-shot prompting alone is sufficient for reasoning LLMs to find near-optimal solutions to economic dispatch, despite the problem being hard-constrained and normally requiring an explicit optimization formulation. The paper frames economic dispatch as a natural-language task: five optimal dispatch vectors for demands from 700 to 6500 MW are placed in the prompt, the new demand is stated, and the model is asked to return a dispatch vector with exact power balance and minimal cost. No generation limits or cost coefficients are shown; the authors argue the examples carry that information implicitly. In the non-evolutionary variant the model reasons directly from the examples, while in the evolutionary variant it selects parents from the examples, crosses them over, mutates the results, and chooses the best of ten candidates. On ten test demands the predicted patterns track the Gurobi ground truth, with most relative cost errors below five percent; the largest errors occur at 727 and 1257 MW, close to the sample extremes, which the authors attribute to the model falling back to linear scaling near the boundary of the examples.

Load-bearing premise

The claim rests on the assumption that five optimal dispatch vectors, shown without cost coefficients or generation limits, contain enough information for the model to infer the cost structure and feasible ranges of all nineteen units; if that assumption fails, the model can only interpolate near the examples, which is consistent with the paper's own observation that errors spike at the demands closest to the sample edges.

Editorial extensions

If this is right

  • Grid operators could prototype day-ahead dispatch solutions without writing optimization code or training a model, as long as a handful of trusted optimal dispatches are available for the prompt.
  • Because a single interaction suffices, the approach avoids the iterative scoring loops of earlier optimization-by-prompting schemes, cutting API cost and latency.
  • The observed boundary sensitivity implies that sample placement matters: adding few-shot examples near the minimum and maximum feasible demand should shrink the largest errors, which currently sit at roughly 15 to 18 percent.
  • Evolutionary prompting does not inherently improve exploration for economic dispatch; the simpler non-evolutionary prompt produces comparable cost errors with nearly zero generation-limit violations.
  • The authors intend the same prompting scheme to be tried on harder power-system optimization problems such as DC and AC optimal power flow.

Reading between the lines

Editorial extensions of the paper, not claims the author makes directly.

  • One reading of the edge errors is that the LLM is interpolating between the five examples rather than recovering the underlying quadratic program; if that is correct, the approach will generalize poorly to demands outside the sample range even when those demands are physically feasible.
  • A testable extension is to keep the same five examples but ask for a demand just below the system maximum of about 6515 MW, where the model must nearly exhaust total capacity; a feasible, near-optimal answer there would support genuine constraint learning.
  • The implicit-constraint trick is likely to degrade when the system's cost structure is unusual, such as one very cheap unit with a tiny capacity and one very expensive unit with a huge capacity, because the examples may not make the trade-off conspicuous.
  • Because the prompt carries no line-flow or network constraints, extending the same few-shot pattern to AC optimal power flow would require the examples to encode network feasibility implicitly, which five flat dispatch vectors are unlikely to do.
Share X Bluesky LinkedIn Reddit HN

Editorial analysis

A structured set of objections, weighed in public.

Desk editor's note, referee report, and a circularity audit.

Referee Report

5 major / 6 minor

Summary. This paper proposes using off-the-shelf large language models (O3-mini-high, O3-mini, O1, and DeepSeek R1) to solve a classic lossless economic dispatch (ED) problem on the IEEE 118-bus system with 19 generators. The method supplies the LLM with five Gurobi-generated (demand, dispatch, cost) examples in the prompt and asks it to produce a dispatch for a new demand, using either a non-evolutionary few-shot prompt or an evolutionary prompt that instructs the LLM to perform crossover, mutation, and selection among candidate dispatches. The authors report cost relative errors for 10 test demands, mostly in the 3–5% range but reaching roughly 14–18% at the two demands closest to the sample boundaries, together with nonzero generation-limit and power-balance violations. The central claim is that various prompting strategies enable LLMs to effectively solve the ED problem and offer a convenient alternative to traditional optimization methods.

Significance. If the central claim were supported, the paper would be a useful empirical demonstration that reasoning-capable LLMs can produce near-optimal economic dispatches from a handful of examples without explicit optimization formulations, which could matter for rapid prototyping and for future foundational power-system models. The paper has some genuine strengths: it uses external Gurobi solutions as ground truth, avoiding circularity in the evaluation; it documents the prompt and the modified cost data transparently; and it acknowledges the practical constraints that limited the number of test scenarios. However, the evidence as presented is not sufficient to establish the abstract's 'effectively solve' claim. The most serious gap is the absence of any non-LLM baseline, so the reported accuracy could plausibly be reproduced by simple interpolation of the five in-context dispatch vectors. The paper also lacks a synthetic-instance control for memorization, does not report constraint-violation tolerances, and relies on single runs without statistical characterization.

major comments (5)
  1. [Section III, Tables III and IV] The central claim that LLMs 'effectively solve' ED is not supported because no non-LLM baseline is reported. The observed error pattern—single-digit errors for demands bracketed by the five in-context samples and 14–18% errors at the two demands nearest the sample edges (727 and 1257 MW)—is exactly what a piecewise-linear interpolation of the five provided Gurobi dispatch vectors would produce, so the results do not demonstrate that the LLM is doing anything beyond interpolation. Please add a simple interpolation or nearest-neighbor baseline evaluated on the same metrics, and either show that the LLMs beat it or revise the abstract and conclusions to claim 'approximate dispatch generation' rather than 'effectively solving.'
  2. [Section II.B and Table I] Because cost coefficients and generation limits are deliberately omitted from the prompt, the paper relies on an untested assumption, stated in Section III, that the five few-shot samples 'encapsulate all necessary information' for finding the ED solution. This assumption should be validated with a synthetic ED instance whose cost coefficients and generation limits are not present in the LLM's training data and not inferable from the public IEEE 118/PGLib-OPF dataset. Without such a control, the reported accuracy could reflect memorization of a public benchmark rather than a general capability to solve ED problems.
  3. [Section III, Fig. 3] The paper describes ED as a hard-constrained optimization problem but reports nonzero generation-limit and power-balance violations without stating a tolerance or quantifying the aggregate violation magnitude. Figure 3 shows violation values across scenarios, but the text does not say what level of violation is acceptable for a dispatch to be called a 'solution.' Please report maximum and mean violations per model and scenario, specify a clear acceptance criterion, and qualify the 'effectively solve' claim accordingly if the violations exceed a practical threshold.
  4. [Section II.B and Table I, evolutionary prompt] The evolutionary prompt instructs the LLM to 'evaluate these 10 candidates based on their estimated cost' and then select the best candidate, but the reported cost errors in Table III compare the selected candidate against the true Gurobi cost. Because the LLM's internal cost estimates may be inaccurate, the presented results do not establish that the evolutionary selection step actually worked. Please report the true costs of all 10 generated candidates and the rank of the selected candidate, or replace the LLM's self-evaluation with an external cost evaluator in the selection step.
  5. [Section III, Tables III and IV] Each model-scenario pair is evaluated only once, with no repeated runs or confidence intervals. Differences between models of 0.01 percentage points (for example, 4.16 versus 4.17 in Table III) are well within the stochastic variation expected from LLM prompting, so the paper's comparative statements, such as the conclusion that 'it is impossible to identify the best and worst methods,' are not supported by the experimental design. Please provide multiple runs per scenario or otherwise characterize the prompt-to-prompt variability before drawing conclusions about relative model performance.
minor comments (6)
  1. [Section II.B] There are typos in this section: 'sceanarios' should be 'scenarios' and 'considerd' should be 'considered.'
  2. [Conclusions] The word 'algorihm' should be 'algorithm'; the sentence 'the non-evolutionary algorihm is more accurate' should read 'the non-evolutionary algorithm is more accurate.'
  3. [Author affiliation] There is an awkward space in 'V .-H. Bui'; please use 'V.-H. Bui.'
  4. [Section III] The authors state that the 10 loading scenarios were 'selected randomly' but then list a deterministic vector; clarify whether this vector is the result of a random draw or a manual hand-picked selection.
  5. [Table I] Because Table II indicates that the a and c coefficients were added to the PGLib-OPF data, the cost values shown in the prompt correspond to this modified cost model; please state this in the table caption to avoid giving the impression that the numbers are the standard PGLib-OPF values.
  6. [Fig. 2] The axis labels and legend in Fig. 2 are difficult to read in the current version; please enlarge the fonts and ensure the line styles are distinguishable in print.

Circularity Check

0 steps flagged · score 0.0 of 10

No significant circularity: the LLM outputs are benchmarked against an external Gurobi optimum using few-shot examples that are not fitted to the test loads.

full rationale

The paper's derivation chain is not circular. The five few-shot dispatches in Table I are Gurobi-generated ground-truth examples for loading scenarios of 700, 2150, 3600, 5050, and 6500 MW, while the ten test loads (727, 1257, 2802, 3227, 3747, 3951, 4398, 5627, 5917, 6122 MW) are disjoint from these training samples and are not inserted into the prompt. Cost coefficients and generator limits are deliberately withheld from the LLM (Section II.B), so the relative cost errors reported in Tables III and IV are computed independently by comparing each LLM dispatch against the Gurobi optimum for the same PGLib-OPF-derived cost data shown in Table II. No load-bearing step depends on the authors' own prior work; the cited references [16]–[19] are external, and no uniqueness theorem or ansatz is imported from the authors' previous publications. The evolutionary prompting strategy does use the LLM's own internal cost estimates to select among candidate dispatches, but the paper's reported accuracy is recalculated against the Gurobi cost function, so this internal self-evaluation does not force the reported result. The paper itself acknowledges that LLMs use linear scaling near the few-shot samples and exhibit larger errors at 727 and 1257 MW, which supports an interpolation-based interpretation, but that is a generalization and benchmarking limitation rather than a circular derivation. The lack of a non-LLM interpolation baseline and the possible memorization of the public IEEE 118/PGLib-OPF case are correctness risks, not circularity, and do not raise the circularity score.

Assumptions & free parameters 2 free parameters · 3 assumptions · 0 invented entities

The paper's central claim rests on the untested assumption that a handful of example dispatches is sufficient for an LLM to infer the full cost and constraint structure. It also relies on hand-added quadratic cost coefficients, since PGLib-OPF only provides linear costs. The evolutionary prompting further assumes the LLM can evaluate candidate costs without access to the cost function.

free parameters (2)
  • Quadratic cost coefficients a and c = listed in Table II (e.g., a=0.00043, c=500 for bus 10)
    PGLib-OPF provides only linear b coefficients for this system; the authors 'added' a and c to create a quadratic ED problem, making the benchmark non-standard and hand-specified.
  • Few-shot sample demand levels = 700, 2150, 3600, 5050, 6500 MW
    Five loading scenarios hand-picked to cover the demand range; the LLM's predictions are anchored to these points.
assumptions (3)
  • ad hoc to paper The few-shot dispatch examples contain all information needed to infer the ED solution.
    Section II.B states 'the few-shot samples encapsulate all necessary information for finding the ED solution'; this is an unproven assumption about LLM in-context learning.
  • ad hoc to paper Generation limits and cost coefficients are unnecessary in the prompt; the LLM can infer them from examples.
    Section II.B states cost coefficients and generation limits are not directly included to reduce prompt length and increase exploration; no evidence is given that this helps rather than harms.
  • domain assumption Gurobi solutions for the five sample scenarios are the correct ground truth for the artificial quadratic ED problem.
    The authors use Gurobi to solve the ED problem for the five few-shot samples and for the ten test scenarios; this is a standard external solver, but the problem itself is defined with hand-added coefficients.

how reviews work

0 comments
Cite this review

Pith. "Pith review of Large Language Models for Solving Economic Dispatch Problem." pith.science (2026). https://pith.science/paper/I5XAH74D

@misc{pith2026250521931,
  author       = {Pith},
  title        = {Pith review of: Large Language Models for Solving Economic Dispatch Problem},
  year         = {2026},
  howpublished = {\url{https://pith.science/paper/I5XAH74D}},
  note         = {Machine review of arXiv:2505.21931}
}
read the original abstract

This paper investigates the capability of off-the-shelf large language models (LLMs) to solve the economic dispatch (ED) problem. ED is a hard-constrained optimization problem solved on a day-ahead timescale by grid operators to minimize electricity generation costs while accounting for physical and engineering constraints. Numerous approaches have been proposed, but these typically require either mathematical formulations, face convergence issues, or depend on extensive labeled data and training time. This work implements LLMs enhanced with reasoning capabilities to address the classic lossless ED problem. The proposed approach avoids the need for explicit mathematical formulations, does not suffer from convergence challenges, and requires neither labeled data nor extensive training. A few-shot learning technique is utilized in two different prompting contexts. The IEEE 118-bus system with 19 generation units serves as the evaluation benchmark. Results demonstrate that various prompting strategies enable LLMs to effectively solve the ED problem, offering a convenient and efficient alternative. Consequently, this approach presents a promising future solution for ED tasks, particularly when foundational power system models are available.

Figures

Figures reproduced from arXiv: 2505.21931 by the authors.

Figure 1
Figure 1. Non-Evolutionary and evolutionary ED results for selected loading [PITH_FULL_IMAGE:figures/full_fig_p003_1.png] view at source ↗
Figure 2
Figure 2. Cost comparison results for ED solutions considering both approaches. [PITH_FULL_IMAGE:figures/full_fig_p004_2.png] view at source ↗
Figure 3
Figure 3. Generation limitation and power balance violation for different [PITH_FULL_IMAGE:figures/full_fig_p005_3.png] view at source ↗

Discussion (0). Sign in to comment.

Reference graph

Works this paper leans on

19 extracted references · 18 canonical work pages

  1. [1]

    A review of recent advances in economic dispatch,

    B. H. Chowdhury and S. Rahman, “A review of recent advances in economic dispatch,” IEEE Transactions on Power Systems , vol. 5, pp. 1248–1259, November 1990

  2. [2]

    Transmission management for congested power system: A review of concepts, technical challenges and development of a new methodology,

    M. B. Nappu, A. Arief, and R. C. Bansal, “Transmission management for congested power system: A review of concepts, technical challenges and development of a new methodology,” Renewable and Sustainable Energy Reviews, vol. 38, pp. 572–580, 2014

  3. [3]

    Day-ahead economic dispatch of microgrid based on game theory,

    L. Sun, Q. Xu, X. Chen, and Y . Fan, “Day-ahead economic dispatch of microgrid based on game theory,” Energy Reports, vol. 6, pp. 633–638, 2020

  4. [4]

    Real time economic dispatch considering renewable energy resources,

    S. S. Reddy and P. Bijwe, “Real time economic dispatch considering renewable energy resources,” Renewable Energy , vol. 83, pp. 1215– 1226, 2015

  5. [5]

    A newton method-based distributed algorithm for multi-area economic dispatch,

    J. Qin, Y . Wan, X. Yu, and Y . Kang, “A newton method-based distributed algorithm for multi-area economic dispatch,” IEEE Transactions on Power Systems, vol. 35, no. 2, pp. 986–996, 2019

  6. [6]

    Saadat, Power System Analysis

    H. Saadat, Power System Analysis . Milwaukee, WI: PSA Publishing, 3 ed., 2010

  7. [7]

    Optimisation of economic dispatch through quadratic and linear programming,

    N. Nabona and L. Freris, “Optimisation of economic dispatch through quadratic and linear programming,” in Proceedings of the Institution of Electrical Engineers , vol. 120, pp. 574–580, IET, 1973

  8. [8]

    Optimization of unit commit- ment and economic dispatch in microgrids based on genetic algorithm and mixed integer linear programming,

    M. Nemati, M. Braun, and S. Tenbohlen, “Optimization of unit commit- ment and economic dispatch in microgrids based on genetic algorithm and mixed integer linear programming,” Applied energy , vol. 210, pp. 944–963, 2018

Show all 19 references
  1. [9]

    Economic dispatch using quadratic pro- gramming,

    G. F. Reid and L. Hasdorff, “Economic dispatch using quadratic pro- gramming,” IEEE Transactions on Power Apparatus and Systems , no. 6, pp. 2015–2023, 1973

  2. [10]

    An improved genetic algorithm approach to the unit commitment/economic dispatch problem,

    R. Ponciroli, N. E. Stauff, J. Ramsey, F. Ganda, and R. B. Vilim, “An improved genetic algorithm approach to the unit commitment/economic dispatch problem,” IEEE Transactions on Power Systems , vol. 35, no. 5, pp. 4005–4013, 2020

  3. [11]

    Modified particle swarm optimization for nonconvex eco- nomic dispatch problems,

    M. Basu, “Modified particle swarm optimization for nonconvex eco- nomic dispatch problems,” International Journal of Electrical Power & Energy Systems, vol. 69, pp. 304–312, 2015

  4. [12]

    Economic dispatch in power sys- tems using simulated annealing-based-clonal selection optimization ap- proach,

    M. Aghaee and E. Ghanbaryan, “Economic dispatch in power sys- tems using simulated annealing-based-clonal selection optimization ap- proach,” International Journal of Electrical and Electronic Engineering & Telecommunications, vol. 5, no. 3, pp. 25–34, 2016

  5. [13]

    Neural-network- based optimization for economic dispatch of combined heat and power systems,

    M. J. Kim, T. S. Kim, R. J. Flores, and J. Brouwer, “Neural-network- based optimization for economic dispatch of combined heat and power systems,” Applied Energy, vol. 265, p. 114785, 2020

  6. [14]

    Implementation of genetic algorithm and fuzzy logic in economic dispatch problem,

    A. Nasiruzzaman and M. Rabbani, “Implementation of genetic algorithm and fuzzy logic in economic dispatch problem,” in 2008 International Conference on Electrical and Computer Engineering , pp. 360–365, IEEE, 2008

  7. [15]

    Deep reinforcement learning for economic dispatch of virtual power plant in internet of energy,

    L. Lin, X. Guan, Y . Peng, N. Wang, S. Maharjan, and T. Ohtsuki, “Deep reinforcement learning for economic dispatch of virtual power plant in internet of energy,” IEEE Internet of Things Journal , vol. 7, no. 7, pp. 6288–6301, 2020

  8. [16]

    Large foundation models for power systems,

    C. Huang, S. Li, R. Liu, H. Wang, and Y . Chen, “Large foundation models for power systems,” in 2024 IEEE Power & Energy Society General Meeting (PESGM) , pp. 1–5, IEEE, 2024

  9. [17]

    Large language models as optimizers,

    C. Yang, X. Wang, Y . Lu, H. Liu, Q. V . Le, D. Zhou, and X. Chen, “Large language models as optimizers,” 2024

  10. [18]

    Large language models as evolutionary optimizers,

    S. Liu, C. Chen, X. Qu, K. Tang, and Y .-S. Ong, “Large language models as evolutionary optimizers,” in 2024 IEEE Congress on Evolutionary Computation (CEC) , pp. 1–8, IEEE, 2024

  11. [19]

    The power grid library for benchmarking ac optimal power flow algorithms,

    S. Babaeinejadsarookolaee, A. Birchfield, R. D. Christie, C. Coffrin, C. DeMarco, R. Diao, M. Ferris, S. Fliscounakis, S. Greene, R. Huang, C. Josz, R. Korab, B. Lesieutre, J. Maeght, T. W. K. Mak, D. K. Molzahn, T. J. Overbye, P. Panciatici, B. Park, J. Snodgrass, A. Tbaileh,...

Pith tools

Reviewed August 7, 2026 · model on record in the stance chip above.