Home

Evaluating the correctness of LLM-generated optimization models

This research evaluates the correctness of optimization models generated by large language models from textual scheduling problems. It distinguishes agreement on a finite set of numerical instances from model correctness and examines how numerical test coverage affects the detection of modeling errors.

TYPE
LLM-based optimization modeling and evaluation
STATUS
Working paper
WHEN
2026

Research problem

Optimization modeling for scheduling problems translates textual specifications into decision variables, constraints, and an objective function for a solver. Large language models can assist with this translation, but the fidelity of the generated formulation requires independent evaluation.

Numerical testing on a finite set of instances typically compares solutions from the generated and reference models. Agreement does not establish model correctness. An omitted constraint may be inactive for a given instance, allowing an incorrect formulation to produce the same optimum. Changing the numerical parameters may then expose the error (fig. 1). This research examines the relationship between numerical test coverage and the detection of modeling errors.

Numerical agreement and model correctnessText specificationdescribing a scheduling problemLLMparsing and formulationOptimization modelvariables, constraints, objectiveSolveTest instanceNew instance, same problemmatching solutionincorrect solution

FIG. 1 · One model evaluated on different numerical instances

Mechanism schematic, not experimental results.

Research status

The paper is at the working-draft stage. The evaluation method and experimental results will be made available after publication.