betaFeedback

WorksComputer Science

NLData2Opt: Benchmarking Parameter Derivation and Prediction for Modeling Optimization Problems from Natural Language and Data

Abstract

Formulating optimization problems from raw inputs of problem descriptions and data is time-consuming and costly. While Large Language Models (LLMs) offer a promising way to automate this process, existing benchmarks overestimate their capabilities by relying on idealized inputs where all data is relevant and complete. This diverges from reality, where data-centric reasoning is required to extract, compute, and predict parameters from noisy sources. To address this, we introduce NLData2Opt, a benchmark to evaluate LLMs on the multi-stage reasoning inherent in practical optimization workflows. NLData2Opt decomposes problems into problem descriptions and data, and requires models to (1) extract relevant parameters from data containing misleading attributes, (2) compute missing parameters derived by transforming existing data attributes, and (3) predict unavailable future values from historical observations. Evaluation results show substantial performance decline relative to existing benchmarks, indicating that benchmark progress does not directly translate to formulation accuracy in practical optimization workflows. NLData2Opt is available at https://github.com/sumarivyn/NLData2Opt.

Introduction

Modeling real world problems through mathematical optimization to find optimal solutions has many applications, such as task scheduling ([9, 27]), vehicle routing ([3, 23]), and healthcare planning ([33, 31]). Recent works explore using Large Language Models (LLMs) to automatically translate natural language inputs into optimization models, making the time-consuming and costly formulation process more accessible. In this setting, the natural language input generally consists of two components that summarize the optimization problem: a problem description and its corresponding data. The problem description defines the objective and constraints, and data provides the concrete parameters required to formulate the problem. A parameter denotes a known attribute specified in the data, while a variable denotes a decision quantity whose value is determined by solving the optimization problem.

Current benchmarks designed to evaluate LLMs on optimization modeling generally assume clean and well-structured inputs. Specifically, they assume complete and relevant problem descriptions and data are provided. For example, NL4Opt ([28]), Mamo ([15]), OptiGuide ([20]) and OPT-Engine ([7]) assume a single unified natural language input can be directly converted into an optimization model, and explicitly provide all parameters required for the formulation within the problem description. NLP4LP ([1]), ComplexOR ([35]) and ORThought ([38]) introduce problems with significantly longer natural language descriptions. Advanced benchmarks like IndustryOR ([32]) shift towards problems from different industrial sectors, while Opti-Verse ([42]) covers complex domains such as stochastic programming. Optibench ([39]) embed linear and nonlinear tabular data in the problem description to measure LLMs’ end-to-end problem solving abilities.

However, despite recent progress, current benchmarks have two fundamental limitations. Firstly, data is directly embedded in the problem description, and the model’s task is to locate and map them into an optimization formulation. This diverges from real-world modeling, in which the construction of the objective and constraints is usually a separate process from data collection, due to the scale and independent storage of the data. Secondly, it is assumed that every parameter is provided in the data in a ready-to-use form. This is rarely guaranteed with noisy and incomplete realworld data [5]. Since raw data typically contains several pieces of contextually related information, we have to identify through parameter extraction what information is actually necessary to solve the problem [30]. Analysts must also frequently perform parameter derivation, which involves transforming multiple existing data attributes into a single usable value, such as calculating net profit from revenue and expenses. In cases such as demand forecasting or production scheduling, a predict-then-optimize pipeline is commonly adopted, where parameter prediction estimates unavailable future data from historical trends, and the predicted values are subsequently used in deterministic planning models [11, 25]. Due to these two limitations, it is difficult to evaluate LLMs’ optimization modeling capabilities in real-world applications with existing benchmarks.

To address this, we introduce NLData2Opt, a novel benchmark that incorporates multi-stage reasoning through controlled and systematic tasks, as illustrated in Figure 1. Tasks are decomposed into two structurally separate components: a natural language problem description and a collection of CSV-style data tables. Noisy and incomplete data is reflected in the need to extract, compute, and predict parameters. Under the NLData2Opt framework, an LLM needs to fulfill three challenges to complete the optimization formulation: (1) extract relevant parameters from data containing misleading attributes, (2) compute missing parameters derived by transforming existing data attributes, and (3) predict unavailable future values from historical observations. We comprehensively evaluate state-of-the-art methods and ten open-weight and proprietary LLMs. Results show that current LLMs perform competitively in simplified tasks but achieve limited success on NLData2Opt.

Figure 1. An optimization task in NLData2Opt with its components.

Contributions. We make three contributions: (1) We introduce NLData2Opt, a benchmark that evaluates whether LLMs can perform multi-stage reasoning for optimization formulation, including model–data separation, information retrieval, implicit derivation, and future-value prediction. (2) We propose an automatic construction pipeline that transforms NLP4LP and Mamo tasks while preserving the feasible region and optimal objective value. (3) We provide comprehensive evaluations of prompting, agent-based, and fine-tuned baselines, which reveal substantial gaps between structural correctness and functional executability.

Related Work

Modeling an optimization problem into an accurate formulation is often time-consuming and requires domain expertise. To enhance this process, recent work has explored automating the formulation process, reducing the time and expertise needed.

Chain-of-thought variants include Tree of Thoughts Yao et al., [41] and Autoformulation Astorga et al., [2], while multi-agent systems include CoE Wang et al., [35], OptLLM Xiao et al., [37] and EoR Yang et al., [40]. Training-free approaches [6, 18, 21] provide step-by-step instruction and incorporate prior knowledge into prompt design to improve performance. For learning-based methods, several existing works explore applying SFT with synthetic data [32, 34, 36] or adopt reinforcement learning frameworks [8, 17], while LLaMoCo Ma et al., [24] incorporates a contrastive learning-based warm-up procedure to enhance convergence behavior.

Techniques to improve formulation quality include highlighting named entities with XML-like tags Gangwar and Kani, [13]. LLMOPT Jiang et al., [16] constructs a five-element formulation and reports an 11.08% average improvement in solving accuracy over SOTA methods. NED-Tree Hu et al., [14] and LEAN-LLM-OPT Liang et al., [22] extend to handle complex nonlinear and large-scale industrial formulations. During inference, format control such as five-element formulation, LaTeX code, or JSON outputs [16, 34] (JU et al. 2024) assists models to parse the problem into symbolic optimization models.

NLData2Opt

This section introduces NLData2Opt, a benchmark for evaluating LLMs on formulating optimization problems in realistic data conditions. We introduce the class of optimization problems considered, then outline the NLData2Opt task structures, and finally provide a validity criterion to ensure ground-truth solution validity.

Mixed Integer Linear Program

A mathematical optimization problem aims to find an optimal solution of decision variables that minimizes the objective function while satisfying all constraints. In this paper, we focus on modeling Linear Program (LP) and Mixed Integer Linear Programs (MILP), which is one of the most popular optimization problems having a wide variety of industrial applications. Given a matrix A∈Rm×nA \in\mathbb{R}^{m \times n}, b∈R+mb \in\mathbb{R}_{+}^{m}, c∈Rnc \in\mathbb{R}^{n}, and a subset I⊆N={1,…,n}I \subseteq N = \{1, \ldots, n\}, the corresponding MILP P\mathcal{P} is given by

min⁡cTxsubject toAx≥b,xj≥0,j∈N,xj∈R,j∈N∖I,xj∈Z,j∈I.(1)\begin{aligned} \min\quad& c^{\mathsf{T}}x \\ \text{subject to} \quad& Ax \ge b, \\ & x_j \ge0,\quad j \in N, \\ & x_j \in\mathbb{R},\quad j \in N \setminus I, \\ & x_j \in\mathbb{Z},\quad j \in I. \tag*{(1)} \end{aligned}

where we call LP in case of I=∅I = \emptyset. Currently, many branch-and-cut solvers have been developed for MILP, where input data is written in the standard MPS (Mathematical Programming System) or LP formats. Alternatively, mathematical optimization problems can be specified via several modeling languages such as AMPL Fourer et al., [12] and GAMS McCarl et al., [26].

Task Definition in NLData2Opt

Given a natural language problem description P\mathcal{P} and a set of data T\mathcal{T}, an LLM is required to formulate the task in AMPL. We define T=Trel∪Tirr\mathcal{T} = \mathcal{T}_{rel} \cup\mathcal{T}_{irr}, where Trel\mathcal{T}_{rel} contains all parameters necessary for the optimization formulation, and Tirr\mathcal{T}_{irr} denotes the attributes irrelevant to the problem. For all cases except the base case, we consider both Tirr=∅\mathcal{T}_{irr} = \emptyset and settings where Tirr\mathcal{T}_{irr} contains irrelevant attributes. The objective is to produce an executable formulation that yields a solution to the optimization problem. We denote the generated AMPL model file and data file by M\mathcal{M} and D\mathcal{D}, respectively.

Each instance consists of the following four standard cases, expanded into nine prompt settings.

NL Case (base case). The problem is expressed entirely in natural language, with all numerical parameters embedded in the text. The LLM directly generates (M,D)(\mathcal{M}, \mathcal{D}) from P\mathcal{P}:

F(P)→(M,D).\mathcal{F}(\mathcal{P}) \to(\mathcal{M}, \mathcal{D}).

NL+Data Case. The problem description P\mathcal{P} and dataset T\mathcal{T} are provided separately. The LLM generates

F(P,T)→(M,D).\mathcal{F}(\mathcal{P}, \mathcal{T}) \to(\mathcal{M}, \mathcal{D}).

Derivation Case. In addition to the separation of the problem description and data, each k∈Kk \in\mathbb{K} in a subset of parameters k⊂Trel\mathbf{k} \subset\mathcal{T}_{rel} is defined implicitly through intermediate quantities QkQ_k. The LLM must compute the parameters via an algebraic functional relationship:

k=ϕ(Qk),∀k∈k,k = \phi(Q_k), \quad\forall k \in\mathbf{k},

before constructing the optimization model. This transformation preserves the feasible region and the optimal solution while introducing derivation-oriented reasoning. The optimization problem is formulated as:

F(P,(T∖k)∪⋃k∈kQk)→(M,D).\mathcal{F}\left(\mathcal{P},(\mathcal{T} \setminus\mathbf{k}) \cup\bigcup_{k \in\mathbf{k}} Q_k\right) \rightarrow(\mathcal{M},\mathcal{D}).

Prediction Case. In addition to the separation of the problem description and data, a subset of parameters t⊂Trel\mathbf{t} \subset\mathcal{T}_{rel} is masked from the data tables. Instead, for each missing parameter t∈tt \in\mathbf{t}, a sequence of historical observations Ht={h1,…,hn}\mathcal{H}_t = \{h_1,\ldots,h_n\} (n≥7n \ge7) is provided. We denote the full set of historical data as H\mathcal{H}. The LLM must first perform a forecasting step to estimate the missing values:

ψ(H)→t^,\psi(\mathcal{H}) \rightarrow\hat{\mathbf{t}},

where t^\hat{\mathbf{t}} is the set of predicted values for the masked parameters. The optimization problem is formulated as:

F(P,(T∖t)∪⋃t∈tHt)→(M,D).\mathcal{F}\left(\mathcal{P},(\mathcal{T} \setminus\mathbf{t}) \cup\bigcup_{t \in\mathbf{t}} \mathcal{H}_t\right) \rightarrow(\mathcal{M},\mathcal{D}).

Validity Criterion

To maintain the validity of the benchmark, every transformation must satisfy the following criterion. Let S∗(O)S^*(\mathcal{O}) denote the optimal objective value of an optimization problem O\mathcal{O}. Let Oorig\mathcal{O}_{\mathrm{orig}} be the original problem and Otrans\mathcal{O}_{\mathrm{trans}} its transformed counterpart. Each transformation Ψ∈{Base,Prediction,Derivation}\Psi\in\{\mathrm{Base}, \mathrm{Prediction}, \mathrm{Derivation}\} is required to preserve the original feasible region and optimal solution. Accordingly, we ensure that

S∗(Otrans)=S∗(Oorig),(2)S^*(\mathcal{O}_{\mathrm{trans}}) = S^*(\mathcal{O}_{\mathrm{orig}}), \tag*{(2)}

which guarantees that the ground-truth solution of the optimization problem remains invariant under all transformations.

Automatic Construction of NLData2Opt

Separation of Problem Description and Data

Each task in NLData2Opt, except for the NL case, is decomposed into two structurally separate components to simulate practical optimization workflows:

Problem description. A structured natural language description that specifies the objective and constraints, but does not include any concrete numerical values. This component guides the LLM to construct the AMPL model file.

Data. A collection of CSV-style tables that contain numerical parameters. Each table includes a name, a brief description and multiple rows of numerical or categorical data. Provided independently of the problem description, this component guides the LLM to construct the AMPL data file.

The transformation process for the prediction and derivation cases follows a multi-stage pipeline, as illustrated in Figure 2. In the single-parameter prediction case, we first augment the data with historical observations. An AMPL Formulator samples from predefined prompt templates to produce controlled temporal patterns that systematically evaluate whether models can predict parameters and integrate them into optimization formulations. Patterns such as seasonality, abrupt changes, intermittent missing data and outliers are then introduced to simulate richer temporal dynamics. Finally, the problem description is revised to explicitly specify the parameter to be predicted and the corresponding future time period.

Figure 2. Transformation pipeline for prediction and derivation cases.

The multi-parameter prediction case extends this procedure by applying the same transformation to multiple target parameters, incorporating historical data and prediction requirements for each parameter independently.

For derivation case, directly transforming existing optimization problems to require intermediate calculations in a single step proved challenging for GPT-4o. Instead, we adopt a two-stage transformation strategy. The Context Generator first revises the task at the natural language level to introduce intermediate quantities from which the target parameter pp can be computed. Only after this modification is the revised task separated into a problem description and corresponding data tables. To further encourage valid derivation-based optimization formulations, we employ few-shot prompting during generation. Detailed prompt templates are provided in Appendix § 10–§ 11.

Generating Gold Solutions in AMPL

To construct gold-standard solutions for NLData2Opt, we adopt AMPL as the modeling language for mathematical programming. This choice is motivated by several considerations. (1) AMPL explicitly separates the model, which details the sets, parameters, decision variables, objectives, and constraints, from the data, which defines the specific set and parameter values, as shown in Figure 3. This encourages more compact and readable model definitions, while mirroring practical scenarios where large-scale data is stored separately. (2) Treating data as a separate component allows modifications without altering the underlying model structure, allowing the same model to be evaluated on different datasets or vice versa [12]. (3) AMPL is a declarative language based on algebraic representations of objectives and constraints, which is natural and familiar to practitioners in large-scale mathematical programming.

Figure 3. AMPL formulation of an example optimization task with model–data separation.

To generate AMPL formulations, we adopt a CoE framework, as illustrated in Figure 4. Our implementation builds on prior work [35], with prompts adapted to produce AMPL files. The system consists of multiple specialized experts, each responsible for a specific subtask. A Problem Classifier first identifies the optimization problem class (e.g., transshipment or max-flow). If a standard template is available, it is passed directly to the AMPL Formulator; otherwise, a Model Constructor and a Data Extractor generate the formulation from scratch. The resulting code is then refined through an iterative Code Runtime and Self-correction loop. Detailed prompt templates for each expert are provided in Appendix I.

Figure 4. Ground-truth AMPL formulation construction framework.

Evaluation Metrics

Since generated formulations may be partially correct, we adopt three complementary metrics to evaluate outputs from different perspectives.

Entity F1 Score (EF1). Structural correctness is measured using an entity-level F1 score. Each AMPL model is represented as a multiset E\mathcal{E} of entity types drawn from

Ω={set,parameter,variable,constraint,objective}.\Omega= \{\text{set},\text{parameter},\text{variable},\text{constraint},\text{objective}\}.

Let Ecand\mathcal{E}_{\mathrm{cand}} and Egt\mathcal{E}_{\mathrm{gt}} denote the multi-sets extracted from the candidate and ground-truth models, respectively. The number of true positives is computed as

TP=∑ω∈Ωmin⁡(mult⁡(Ecand,ω),mult⁡(Egt,ω)),\mathrm{TP} = \sum_{\omega\in\Omega} \min\left(\operatorname{mult}(\mathcal{E}_{\mathrm{cand}},\omega),\operatorname{mult}(\mathcal{E}_{\mathrm{gt}},\omega)\right),

where mult⁡(E,ω):=∣{e∈E∣e=ω}∣\operatorname{mult}(\mathcal{E},\omega) := \lvert\{e \in\mathcal{E} \mid e = \omega\}\rvert denotes the multiplicity of entity type ω\omega in E\mathcal{E}. Precision and recall are defined as P=TP∣Ecand∣\mathrm{P} = \frac{\mathrm{TP}}{|\mathcal{E}_{\mathrm{cand}}|} and R=TP∣Egt∣\mathrm{R} = \frac{\mathrm{TP}}{|\mathcal{E}_{\mathrm{gt}}|}, and the F1 score becomes F1=2PRP+R\mathrm{F1} = \frac{2\mathrm{PR}}{\mathrm{P}+\mathrm{R}}. This captures structural correctness independent of variable or constraint naming.

Execution-Based Correctness (EBC). Functional correctness is evaluated by executing each model–data pair using the AMPL interpreter with the CBC solver. If execution fails, the score is set to 0. Otherwise, a smoothed correctness score is computed:

Correctness={max⁡(0,1−∣O−AA∣)if A≠0,1if O=A=0,0otherwise,(3)\mathrm{Correctness} = \begin{cases} \max\left(0,1-\left|\frac{O-A}{A}\right|\right) & \text{if } A \ne0,\\ 1 & \text{if } O=A=0,\\ 0 & \text{otherwise}, \end{cases} \tag*{(3)}

where OO denotes the objective value from the candidate formulation and AA is the ground-truth value.

LLM-Based Evaluation Score (LLM-ES). We employ GPT-4o-mini to perform a holistic evaluation of candidate formulations. The evaluator compares the constraints specified in the AMPL model and the parameter values specified in the data against the corresponding components of the gold-standard formulation, assigning a score on a 0-10 scale. The full evaluation prompt is provided in Appendix V.

Quality Control

We rigorously validate each generated AMPL formulation through a combination of execution-based and semantic checks. Every formulation is executed to detect runtime or modeling errors, and the resulting objective value is compared against the ground-truth solution. In addition, we employ LLM-based reviewers to perform holistic verification of formulation soundness. When validating different cases of natural language problem descriptions and data pairs, these reviewers ensure that all transformation rules are satisfied and that each transformed instance preserves the original feasible region and optimal solution.

Experiments

We develop NLData2Opt and comprehensively evaluate SOTA methods to assess their ability to formulate and solve realistic optimization problems from natural language and data. The observed performance decline highlights the challenges posed by NLData2Opt and indicates that current methods are not yet capable of fully addressing such tasks.

Experimental Setup

Benchmarks. We construct NLData2Opt from two existing benchmarks: NLP4LP (AhmadiTeshnizi et al., [1]) and Mamo (Huang et al., [15]). NLP4LP consists of 269 LP and MILP tasks collected from optimization textbooks and lecture notes. Mamo is divided into two subsets: Easy LP, which contains 647 high school-level MILP problems, and Complex LP, which includes 210 undergraduate-level tasks integrating both LP and MILP formulations.

Baselines. We evaluate NLData2Opt using a diverse set of methods. Proprietary LLMs evaluated under direct prompting include GPT-4o-mini (gpt-4o-mini-2024-07-18), GPT-4o (gpt-4o-2024-11-20), Gemini 2.5 Pro, Claude Haiku 4.5 (claude-haiku-4-5-20251001), Claude Sonnet 4.6 and Claude Opus 4.6. Open-weight models include Llama-3.1-8B-Instruct, Ministral-3-8B-2512, Llama-3.3-70B-Instruct and Mistral-Large-2411. We use a temperature of 0.1 and limit each model to a single attempt per task. Generated formulations are normalized to AMPL .mod/.dat format using the reformatting prompt in Appendix V and executed using the AMPL interpreter with the CBC solver. Non-executable outputs are assigned zero EBC.

In addition, we evaluate several structured baselines: the five-element formulation approach proposed by LLMOPT using GPT-4o-mini, CoE with its default backbone GPT-3.5-turbo, and a SFT baseline trained on Qwen3-1.7B.

Results and Analysis

Figure 5 reports EBC across nine prompt settings: NL, NL+Data, derivation, two prediction cases, and four cases with irrelevant attributes. Comprehensive evaluation results for all metrics (EF1, EBC and LLM-ES) are summarized in Table 7-Table 15 in Appendix § 12, averaged over a 15% subset per dataset using a random seed of 42. Additionally, we report full results in Table 16-Table 18 for three representative models: claude-opus-4.6, gpt-4o-mini, and llama-3.3-70b-instruct. Overall, current LLMs and other baseline methods achieve limited success on NLData2Opt, with subset-based evaluation showing trends consistent with the full benchmark.

Heatmap of average EBC scores across task cases

Figure 5. Average EBC scores across task cases. The heatmap illustrates functional correctness achieved on the nine task cases of NLData2Opt (rows, cases with irrelevant attributes are marked with "+ Irr"), when evaluated with an LLM model or baseline method (columns). The columns are ranked to reflect the worst to best performing models. Higher saturation represents a higher EBC score. While models with smaller capacity did not generate executable code, stronger models only reached scores as high as 0.77, highlighting the challenges of the tasks.

Model/MethodNLP4LP EF1NLP4LP EBCNLP4LP LLM-ESMamo Easy EF1Mamo Easy EBCMamo Easy LLM-ESMamo Complex EF1Mamo Complex EBCMamo Complex LLM-ES
GPT-4o Mini0.5820.8180.568 ± 0.0560.7290.8670.481 ± 0.0550.8090.1300.548 ± 0.061
GPT-4o0.9680.1500.667 ± 0.0470.6870.7670.383 ± 0.0500.8700.4680.670 ± 0.034
Gemini 2.5 Pro0.4130.0000.282 ± 0.0560.3700.0000.203 ± 0.0590.3010.0000.390 ± 0.047
Claude Haiku 4.50.5880.7020.463 ± 0.0510.8250.8450.638 ± 0.0600.8650.6190.625 ± 0.043
Claude Sonnet 4.60.8800.4500.403 ± 0.0390.8500.6000.610 ± 0.0460.9050.6160.596 ± 0.042
Claude Opus 4.60.8980.6500.413 ± 0.0370.8900.7500.610 ± 0.0390.8720.7410.611 ± 0.042
LLaMA 3.1 8B Inst.0.7760.0000.538 ± 0.0510.6020.0000.324 ± 0.0520.6900.0000.542 ± 0.049
Ministral 8B0.8980.0000.626 ± 0.0510.6450.0000.356 ± 0.0530.8240.0000.601 ± 0.029
LLaMA 3.3 70B Inst.0.7960.0750.493 ± 0.0530.6510.9060.367 ± 0.0560.7940.3080.609 ± 0.039
Mistral Large0.9220.0750.588 ± 0.0610.6540.1000.347 ± 0.0410.8670.4170.650 ± 0.041
Five-element0.8720.1930.738 ± 0.0130.6910.6250.132 ± 0.0180.8270.3490.700 ± 0.024
CoE0.5810.6020.747 ± 0.0350.6720.7330.132 ± 0.0070.5770.0910.249 ± 0.035
SFT0.9020.5070.732 ± 0.0220.7260.7480.183 ± 0.0140.8170.0520.367 ± 0.022

Table 7. Comprehensive metrics for performance on NL case.

Model/MethodNLP4LP EF1NLP4LP EBCNLP4LP LLM-ESMamo Easy EF1Mamo Easy EBCMamo Easy LLM-ESMamo Complex EF1Mamo Complex EBCMamo Complex LLM-ES
GPT-4o Mini0.3970.2640.426 ± 0.0350.2500.1810.415 ± 0.0500.2920.1400.472 ± 0.050
GPT-4o0.7430.5690.453 ± 0.0370.4920.5100.419 ± 0.0590.7110.4710.485 ± 0.052
Gemini 2.5 Pro0.3000.2060.333 ± 0.0550.1920.1300.298 ± 0.0740.0900.0340.395 ± 0.058
Claude Haiku 4.50.7780.5990.428 ± 0.0480.6100.3450.409 ± 0.0450.8250.3890.503 ± 0.045
Claude Sonnet 4.60.8030.2530.331 ± 0.0690.6830.4290.444 ± 0.0520.7730.6050.473 ± 0.048
Claude Opus 4.60.9080.6560.432 ± 0.0470.6600.5580.441 ± 0.0450.8640.6360.518 ± 0.058
LLaMA 3.1 8B Inst.0.5830.0000.384 ± 0.0340.4270.0000.337 ± 0.0370.4570.0000.354 ± 0.045
Ministral 8B0.6760.0000.392 ± 0.0330.4930.0110.395 ± 0.0530.5910.0000.439 ± 0.042
LLaMA 3.3 70B Inst.0.3190.2440.366 ± 0.0400.2730.2300.394 ± 0.0360.2630.1390.435 ± 0.046
Mistral Large0.3530.2700.410 ± 0.0460.1170.1110.407 ± 0.0390.2850.1900.478 ± 0.045
Five-element0.8940.3000.507 ± 0.0150.6810.1000.329 ± 0.0100.7680.2330.269 ± 0.019
CoE0.7220.3090.743 ± 0.0030.5760.0900.471 ± 0.0330.7190.0940.294 ± 0.011
SFT0.9040.1580.439 ± 0.0220.7120.1640.286 ± 0.0130.7780.0320.141 ± 0.019

Table 15. Comprehensive metrics for performance on prediction case (multiple variables) with irrelevant attributes.

CaseNLP4LP EF1NLP4LP EBCNLP4LP LLM-ESMamo Easy EF1Mamo Easy EBCMamo Easy LLM-ESMamo Complex EF1Mamo Complex EBCMamo Complex LLM-ES
NL0.54880.72310.41900.79330.75170.61990.80620.70660.6224
NL + Data0.83420.70800.60330.72680.64630.54530.83190.72410.6148
NL + Data + Irr0.76400.54510.38480.71430.58130.49260.85500.70680.5743
Derivation0.75890.55470.45950.66760.33690.39550.80430.57720.5443
Derivation + Irr0.69210.37940.35190.63620.31180.36980.78480.51510.4881
Prediction (1-Var)0.80210.50760.53610.71570.58650.49400.83920.62130.5524
Prediction (1-Var) + Irr0.77680.32830.41120.69440.51570.44680.85240.56250.5057
Prediction (Multi-Var)0.81620.56320.54090.71210.54920.47360.85390.57080.5667
Prediction (Multi-Var) + Irr0.79880.41440.41000.68920.37480.41510.80130.37940.5081

Table 16. Evaluation results for Claude Opus 4.6 on the full benchmark.

CaseNLP4LP EF1NLP4LP EBCNLP4LP LLM-ESMamo Easy EF1Mamo Easy EBCMamo Easy LLM-ESMamo Complex EF1Mamo Complex EBCMamo Complex LLM-ES
NL0.69000.27450.51930.67110.11240.64030.63710.27870.6095
NL + Data0.45540.29950.60330.50430.38950.52020.60370.22720.5914
NL + Data + Irr0.47100.20090.40040.42150.30460.43540.50170.13820.4881
Derivation0.41920.16360.44980.38290.19300.40970.57780.12620.4990
Derivation + Irr0.37070.08470.36990.31030.11610.36280.44870.07490.4305
Prediction (1-Var)0.45220.14120.50410.52040.32210.46560.58220.12030.5043
Prediction (1-Var) + Irr0.40670.09840.39290.39730.19740.40790.40910.07390.4243
Prediction (Multi-Var)0.46290.23510.55910.51280.23450.45140.47030.06080.4895
Prediction (Multi-Var) + Irr0.33850.14510.41450.37670.11900.39530.36290.02830.4186

Table 18. Evaluation results for LLaMA 3.3 70B Instruct on the full benchmark.

Impact of model–data separation. Transitioning from NL (Table 7) to NL+Data cases (Table 8), LLMs struggle with mapping declared variables in the model to instantiated values in the data. Consequently, we observe a general decrease in EBC, even when EF1 remains relatively stable. However, we note that all proprietary models achieve higher EBC on Mamo Complex for NL+Data case. As Mamo Complex contains more complicated tasks, extracting data into separate tables might have provided more clarity and structure.

Model/MethodNLP4LP EF1NLP4LP EBCNLP4LP LLM-ESMamo Easy EF1Mamo Easy EBCMamo Easy LLM-ESMamo Complex EF1Mamo Complex EBCMamo Complex LLM-ES
GPT-4o Mini0.9310.4000.421 ± 0.0490.7000.3450.419 ± 0.0490.8760.3930.529 ± 0.049
GPT-4o0.9400.1500.645 ± 0.0490.6700.6390.361 ± 0.0560.8870.6120.658 ± 0.049
Gemini 2.5 Pro0.4270.0000.317 ± 0.0460.2390.0000.147 ± 0.0440.3270.0000.396 ± 0.061
Claude Haiku 4.50.8960.7330.644 ± 0.0450.7340.7530.543 ± 0.0590.8720.6300.625 ± 0.042
Claude Sonnet 4.60.9450.2900.515 ± 0.0500.6700.5530.495 ± 0.0620.8790.7940.596 ± 0.042
Claude Opus 4.60.9380.6990.598 ± 0.0510.6790.7620.513 ± 0.0610.8850.8530.611 ± 0.042
LLaMA 3.1 8B Inst.0.7780.0000.530 ± 0.0560.6000.0000.294 ± 0.0490.6500.0000.522 ± 0.047
Ministral 8B0.8850.0000.596 ± 0.0470.6640.0000.382 ± 0.0630.8050.0000.615 ± 0.044
LLaMA 3.3 70B Inst.0.8460.0250.593 ± 0.0530.6570.4990.385 ± 0.0590.7860.1910.620 ± 0.043
Mistral Large0.9160.1000.657 ± 0.0500.6580.2390.357 ± 0.0550.8370.2530.628 ± 0.038
Five-element0.9340.4000.839 ± 0.0260.6840.6000.165 ± 0.0050.9220.5340.583 ± 0.024
CoE0.7240.5160.698 ± 0.0050.6340.3810.122 ± 0.0110.7450.0920.388 ± 0.030
SFT0.9050.4830.699 ± 0.0400.7020.6030.168 ± 0.0100.8300.1290.458 ± 0.012

Table 8. Comprehensive metrics for performance on NL+Data case.

Qualitative analysis shows that LLMs tend to embed coefficients directly into constraints in the NL case. In contrast, in the NL+Data case, LLMs use a more elegant approach by defining the parameters in the model file and recording the corresponding values in the data file. While both methods yield the same solution, parameterizing is more desirable as it allows for higher scalability and generalizability. Impact of irrelevant attributes. Our experiments illustrate that the performance drop is not simply due to noise. Rather, when multiple conceptually related pieces of information are present, models struggle to identify the correct data. In our initial experiments, adding irrelevant attributes did not significantly affect results. However, after introducing more semantically similar attributes, we observe performance declines across all three metrics. Error analysis (Figure 6) further confirms this, revealing that irrelevant attributes increase undefined entities errors, including a rise from 36.3% to 47.6% for the derivation case. This confirms that the presence of semantically similar yet irrelevant data hinders the model’s ability to maintain a mapping between declared variables and instantiated data.

Distribution of AMPL execution errors across nine task cases

Figure 6. Distribution of AMPL execution errors across nine task cases. The breakdown highlights the relative frequency of specific compilation and logical errors, such as undefined entities, undeclared data assignments, and syntax errors.

Derivation case analysis. The derivation cases (Table 10) receive drops in EBC across baselines. Table 4 reports the percentage of correctly identified models, revealing that correct constraint structures are relatively low. This indicates that models struggle to maintain structural consistency when parameters are not explicitly provided.

Model/MethodNLP4LPMamo E.Mamo C.
GPT-4o-mini0.0000.0000.000
GPT-4o0.4250.3670.467
Gemini-2.5-Pro0.0000.0670.000
Claude Haiku 4.50.6000.5870.593
Claude Sonnet 4.60.5730.5330.307
Claude Opus 4.60.5670.5470.440
Llama-3.1-8B-Instruct0.2500.1650.129
Ministral-3-8B-25120.1250.0520.097
Llama-3.3-70B-Instruct0.2500.3000.129
Mistral-Large-24110.3000.0670.194
Five-element formulation0.5250.7940.419
CoE0.4500.3090.129
SFT0.3750.8450.355

Table 4. Percentage of correctly identified optimization models on derivation case.

Model/MethodNLP4LP EF1NLP4LP EBCNLP4LP LLM-ESMamo Easy EF1Mamo Easy EBCMamo Easy LLM-ESMamo Complex EF1Mamo Complex EBCMamo Complex LLM-ES
GPT-4o Mini0.9010.2590.476 ± 0.0530.6370.1510.289 ± 0.0350.7300.1320.433 ± 0.040
GPT-4o0.9130.1250.553 ± 0.0620.6090.3280.310 ± 0.0500.7920.4160.502 ± 0.052
Gemini 2.5 Pro0.3780.0000.318 ± 0.0430.2220.0000.131 ± 0.0450.2820.0000.372 ± 0.049
Claude Haiku 4.50.7820.5420.486 ± 0.0410.6960.5600.459 ± 0.0400.8180.4380.511 ± 0.037
Claude Sonnet 4.60.8640.2890.416 ± 0.0340.6460.2150.408 ± 0.0380.8450.5420.543 ± 0.042
Claude Opus 4.60.8660.5000.441 ± 0.0430.6370.5140.410 ± 0.0310.8610.6090.556 ± 0.039
LLaMA 3.1 8B Inst.0.7520.0000.476 ± 0.0530.5200.0000.289 ± 0.0350.6080.0000.433 ± 0.040
Ministral 8B0.8620.0000.548 ± 0.0580.5800.0000.300 ± 0.0460.6940.0000.465 ± 0.046
LLaMA 3.3 70B Inst.0.7870.0000.506 ± 0.0570.5570.3450.318 ± 0.0440.7000.1480.526 ± 0.054
Mistral Large0.8980.0500.575 ± 0.0420.6270.0920.309 ± 0.0590.7150.1920.514 ± 0.051
Five-element0.9010.3140.793 ± 0.0120.5740.1330.072 ± 0.0280.8970.1940.342 ± 0.011
CoE0.6390.1860.499 ± 0.0330.4910.0340.086 ± 0.0100.6320.0320.271 ± 0.024
SFT0.8940.3640.612 ± 0.0090.6750.2160.136 ± 0.0360.8150.3420.206 ± 0.019

Table 10. Comprehensive metrics for performance on derivation case.

Qualitative analysis further supports that models often struggle during optimization formulation that requires parameter derivation. When a total quantity must be derived from multiple components, models may fail to aggregate, generating multiple false constraints instead. Moreover, even when derivation is performed correctly, models introduce irrelevant constraints that unnecessarily restrict the feasible region. This suggests that models struggle to integrate intermediate derived results into correct downstream optimization constraints.

Prediction case analysis. Performance drops in both cases, though one-variable prediction (Table 12) does not show significant EBC improvement over multiple-variable cases (Table 14). Table 5 shows that even if an exact match is not achieved, predictions often lie in the ground truth value’s vicinity. Simple forecasting and oracle-prediction baselines (Table 1–3) confirm that forecasting errors alone cannot explain the observed performance gap caused by formulation errors.

CaseSimple ForecastingOracle PredictionLLM
EF1EBCLLM-ESEF1EBCLLM-ESEF1EBCLLM-ES
One-Variable0.86650.61440.53770.86540.73050.58580.88360.73570.5572
One-Variable + Irr0.85510.47960.46550.84360.65380.50180.84410.53310.4602
Multi-Variable0.87390.58100.55520.86430.62570.58860.86260.62250.5300
Multi-Variable + Irr0.84240.49720.44820.83250.58980.47690.86830.63930.4671

Table 1. Performance breakdown for Claude Opus 4.6 across prediction baselines (Simple Forecasting, Oracle Prediction, and LLM).

Model/MethodOne-variable Standard EMOne-variable Standard SCOne-variable Irr. attributes EMOne-variable Irr. attributes SCMultiple-variables Standard EMMultiple-variables Standard SCMultiple-variables Irr. attributes EMMultiple-variables Irr. attributes SC
GPT-4o Mini0.4330.7790.3220.7110.3710.5260.2870.506
GPT-4o0.6110.8920.4000.8450.4080.5600.2580.511
Gemini 2.5 Pro0.0780.2190.0220.1250.1020.1460.0690.107
Claude Haiku 4.50.5560.9720.4780.9610.6030.7440.5210.718
Claude Sonnet 4.60.6670.9800.5670.9420.5900.7450.6000.745
Claude Opus 4.60.5330.9590.5110.9580.5710.7390.5630.738
LLaMA 3.1 8B Inst.0.3440.6150.4000.6200.3300.4580.2170.386
Ministral 8B0.2780.4410.1890.4110.2600.3880.1500.287
LLaMA 3.3 70B Inst.0.4220.8460.3330.8200.3350.5220.1960.452
Mistral Large0.5220.8940.4110.8130.4090.5710.2800.501
Five-element0.3890.6610.4110.7520.3270.5030.3030.491
CoE0.3670.6380.3560.7000.4130.5080.2840.435
SFT0.5440.6800.5330.7490.4690.5470.4110.497

Table 5. Percentage of Exact Matches (EM) and continuous Smoothed Correctness (SC) across four prediction cases.

Model/MethodNLP4LP EF1NLP4LP EBCNLP4LP LLM-ESMamo Easy EF1Mamo Easy EBCMamo Easy LLM-ESMamo Complex EF1Mamo Complex EBCMamo Complex LLM-ES
GPT-4o Mini0.3260.2400.531 ± 0.0580.3990.3850.471 ± 0.0440.4420.2040.559 ± 0.048
GPT-4o0.6760.5540.575 ± 0.0490.5460.5480.505 ± 0.0660.7100.4040.548 ± 0.041
Gemini 2.5 Pro0.4050.3220.472 ± 0.0430.2970.2930.385 ± 0.0570.1130.0380.424 ± 0.046
Claude Haiku 4.50.8910.3550.528 ± 0.0570.7090.4730.468 ± 0.0440.9020.6290.574 ± 0.056
Claude Sonnet 4.60.7690.1640.439 ± 0.0390.7120.5570.505 ± 0.0540.8440.6020.531 ± 0.043
Claude Opus 4.60.9090.7200.557 ± 0.0500.6830.7210.448 ± 0.0650.8960.7590.582 ± 0.049
LLaMA 3.1 8B Inst.0.7190.0000.456 ± 0.0440.6300.0000.426 ± 0.0450.5860.0000.435 ± 0.042
Ministral 8B0.5980.0000.507 ± 0.0600.5690.0000.530 ± 0.0430.6930.0000.484 ± 0.048
LLaMA 3.3 70B Inst.0.3610.2160.466 ± 0.0390.3340.3670.502 ± 0.0560.3360.0980.526 ± 0.048
Mistral Large0.3870.2400.576 ± 0.0570.1130.1370.521 ± 0.0620.3710.2050.542 ± 0.052
Five-element0.9040.1000.471 ± 0.0160.6830.1000.514 ± 0.0120.8110.3000.372 ± 0.002
CoE0.8320.1330.560 ± 0.0020.7050.1420.575 ± 0.0180.7710.0310.423 ± 0.010
SFT0.8840.3510.540 ± 0.0130.7640.6760.661 ± 0.0140.8010.2850.216 ± 0.009

Table 12. Comprehensive metrics for performance on prediction case (one variable).

Model/MethodNLP4LP EF1NLP4LP EBCNLP4LP LLM-ESMamo Easy EF1Mamo Easy EBCMamo Easy LLM-ESMamo Complex EF1Mamo Complex EBCMamo Complex LLM-ES
GPT-4o Mini0.3340.2830.568 ± 0.0560.3230.2980.481 ± 0.0550.4610.2420.548 ± 0.061
GPT-4o0.7760.5960.600 ± 0.0500.5310.5380.503 ± 0.0620.7110.4470.574 ± 0.047
Gemini 2.5 Pro0.4100.1990.480 ± 0.0390.2450.1840.395 ± 0.0630.1370.0000.426 ± 0.041
Claude Haiku 4.50.8790.6300.640 ± 0.0390.6320.3940.454 ± 0.0400.9070.4670.557 ± 0.056
Claude Sonnet 4.60.8420.3280.489 ± 0.0510.6220.4930.465 ± 0.0460.8530.5980.528 ± 0.046
Claude Opus 4.60.8520.5180.493 ± 0.0490.6800.6330.460 ± 0.0540.9170.7540.593 ± 0.053
LLaMA 3.1 8B Inst.0.7950.0000.498 ± 0.0490.5510.0000.404 ± 0.0340.5960.0000.420 ± 0.042
Ministral 8B0.8290.0000.546 ± 0.0590.5590.0000.470 ± 0.0430.6700.0000.494 ± 0.058
LLaMA 3.3 70B Inst.0.4290.3110.493 ± 0.0600.3890.3990.492 ± 0.0500.4040.2200.522 ± 0.058
Mistral Large0.3080.3240.598 ± 0.0600.1230.0900.490 ± 0.0620.3410.2960.546 ± 0.049
Five-element0.8900.2000.745 ± 0.0110.6770.1000.418 ± 0.0120.7960.2330.267 ± 0.018
CoE0.8260.2980.736 ± 0.0090.6910.0340.518 ± 0.0080.7680.0330.358 ± 0.005
SFT0.8790.3140.610 ± 0.0340.7300.3390.321 ± 0.0140.7800.2850.160 ± 0.018

Table 14. Comprehensive metrics for performance on prediction case (multiple variables).

Qualitative analysis shows that models occasionally predict incorrect values, such as directly copying from the second-to-last time period. Others correctly predict the required parameters but fail to incorporate them into the formulation. Across both derivation and prediction cases, common AMPL execution errors include undefined entities and undeclared data assignments. Therefore, even when arithmetic or forecasting is correct, integrating intermediate results into downstream constraints remains a key challenge in multi-step tasks.

Human Alignment

Although human evaluation remains the gold standard, evaluating NLData2Opt presents scalability challenges. Each task requires the evaluation of nine distinct cases, and assessing AMPL formulations requires domain expertise. Consequently, comprehensive human evaluation on the entire benchmark across baselines is far too expensive.

To provide a scalable and cost-effective alternative, we adopt an LLM-as-a-judge framework using the GPT-4o-mini-based LLM-ES metric. To verify this approach, we manually evaluated 108 candidate formulations generated by Claude Opus 4.6. The instructions used were identical to the LLM judge’s prompt (Appendix V). The evaluation yields a Spearman’s rank correlation coefficient of ρ=0.39\rho= 0.39 (p=3.90×10−6p = 3.90 \times10^{-6}) and a Pearson linear correlation coefficient of r=0.30r = 0.30 (p=3.90×10−4p = 3.90 \times10^{-4}). These results indicate a positive alignment with human judgments, consistent with prior work on LLM-based evaluators ([4, 29]). Results suggest that evaluating specialized programming is more challenging than evaluating open-ended natural language generation. While LLM-ES provides a scalable signal, its moderate correlation with human judgments suggests it should be interpreted with caution and used alongside other execution-based metrics.

Conclusion

We introduced NLData2Opt, a benchmark designed to evaluate optimization modeling under realistic data conditions. NLData2Opt reflects practical workflows by separating data from problem descriptions and incorporating irrelevant yet misleading attributes. In addition, it requires the derivation of missing parameters and prediction of future values that are common in applied optimization but largely absent from prior benchmarks.

Through comprehensive evaluations, we demonstrate that current LLMs and baseline methods achieve only limited success on NLData2Opt. These findings underscore the need for more robust approaches to optimization problem formulation.

Limitations

NLData2Opt utilizes LLM-based transformations for benchmark construction, which may contain hallucinated information, temporal inconsistencies, or other logical distortions. They may also introduce synthetic parameters that differ systematically from real-world data distributions. Common mitigation strategies include human evaluation, comparison between real and synthetic data, error analysis, and execution-based validation. In NLData2Opt, we reduce these risks through execution-based checks of generated optimization formulations and LLM-based validation of transformed instances against predefined consistency criteria. Nevertheless, automated validation cannot guarantee that all semantic or logical errors are detected, and certain distortions may remain in the benchmark.

Because NLData2Opt is derived from existing datasets such as NLP4LP and Mamo, some source instances may have appeared in the pretraining data of evaluated models. Our transformations substantially modify the original tasks, but potential data contamination cannot be fully ruled out.

Our conclusions on industrial realism and general optimization are limited to the LP/MILP task families, data perturbations, and AMPL-based formulation setting studied in this work, and should not be interpreted as directly representing the full complexity of industrial optimization problems.

Finally, while NLData2Opt requires LLMs to predict or derive parameters before generating formal optimization formulations, this workflow may emphasize formalization ability over deeper conceptual reasoning. For example, an LLM may correctly construct an AMPL formulation using a predicted parameter without fully understanding how that parameter affects the feasible region or optimal solution. Future benchmarks could evaluate conceptual understanding and decision-making independently from formulation ability, enabling more nuanced assessments of mathematical reasoning.

Ethical considerations

NLData2Opt is constructed by adapting open-source datasets NLP4LP and Mamo. Both datasets are licensed under CC BY NC 4.0. We respect their creators’ ownership and intellectual property, and our use of these artifacts is strictly consistent with their intended purpose of evaluating the mathematical modeling capabilities of LLMs.

NLData2Opt is a benchmarking dataset designed to evaluate LLMs on optimization tasks. The tasks presented focus solely on mathematical optimization modeling and do not contain personal or sensitive data. We plan to release NLData2Opt under the same CC BY NC 4.0 license, allowing only non-commercial use for research purposes.

AI assistants were utilized to support prompt template development and improve the clarity of this paper. We maintain full responsibility for the content, experimental design, and conclusions presented.

Acknowledgments

This work was supported by JST CREST Grant Number JPMJCR21D1.

Appendix

We provide the details of the exact templates utilized in the automated-generation of NLData2Opt that were omitted in the main text. GPT-4o-mini (gpt-4o-mini-2024-07-18) and GPT-4o (gpt-4o-2024-11-20) were used with a temperature of 0.1. While GPT-4o-mini primarily constructed NL+Data and prediction cases for NLP4LP, GPT-4o was employed for more complex tasks, including derivative cases within NLP4LP and task instances that were challenging for GPT-4o-mini to process effectively.

Templates for AMPL formulation construction

To construct high-quality and executable gold-standard solutions for NLData2Opt, we utilize a CoE framework adapted to produce AMPL code. This pipeline decomposes the complex modeling task into subtasks handled by respective experts. The initial formulator proposed an initial AMPL formulation, and consists of the following experts: Problem Classifier: Identifies the precise mathematical model and objective (e.g., transshipment or max-flow) while ensuring all numerical inputs are treated as generic parameters. It also provides mathematical formulations for linking constraints in discrete decision problems. If a standard template is available, it is passed directly to the AMPL Formulator.

AMPL Formulator: Synthesizes the provided components into an executable .mod file, adhering to the blueprint and ensuring no numerical data values are included in the model logic.

Model Constructor: Collaborates with the Data Extractor to generate the formulation from scratch if a standard template is unavailable.

Data Extractor: Extracts data from the base case and synthesizes the final components into AMPL .mod and .dat files.

After executing the generated AMPL formulation, the following experts revise the initial formulation through an iterative loop:

Debugger: Identifies the source of numerical errors, determining if the discrepancy between predicted and expected values arises from model logic or data errors.

Code Reviewer: Conducts a detailed analysis of the previous AMPL formulation, identifying whether the discrepancy arises from model logic or data errors, and providing a corrected proposed fix.

Code Modifier: Implements the proposed modifications by the Code Reviewer to ensure the final AMPL code accurately models the optimization problem.

Listing 1: Prompt template for Problem Classifier

As the Optimization Modeler and Knowledge Retriever, your primary role is to create a complete, mathematically precise blueprint for the model, ensuring all necessary constraints are included. Your output MUST be generic, using parameters for all numerical inputs (costs, demands, capacities).

### 1. Model Type & Objective:
Identify the precise mathematical model (e.g., TSP, Transshipment Problem, Min-Cost Flow) and the objective (Minimize/Maximize).

### 2. Variables and Sets:
Define all necessary Sets (e.g., CITIES, I, J) and Variables (e.g., binary x[i,j], continuous flow[i,j], auxiliary u[i]).

### 3. Binary Linking Constraints Check:
For any problem involving discrete decisions (TSP, Fixed-Charge, etc.), you MUST provide the precise mathematical formulation for the **LINKING CONSTRAINTS** necessary to connect the binary variables to the continuous variables.
* Example for Fixed-Charge: Define the constraint ensuring flow is zero if a facility is closed (using generic parameters like 's[j]' and 'y[j]').
* Example for TSP: Define the Miller-Tucker-Zemlin (MTZ) Subtour Elimination Constraint, including all required index exclusions (e.g., i != 1 and j != 1) and using 'N' or 'card(CITIES)' for the scaling factor.

Problem Description: {q}

Output only the complete, mathematically precise list of sets, variables, objective, and constraints, strictly adhering to the instructions above, and using generic parameter names only. Do not include any specific numerical data.

Listing 2: Prompt template for Model Formulator

You are a highly specialized AMPL Coder. Your sole function is to synthesize the provided components into a complete, executable AMPL model (.mod) file.

### 1. Model Blueprint (From Peer):
You must strictly adhere to the model type, parameters, and constraints listed here:
{constraint_output}

### 2. Synthesis Instructions:
1. Define all sets and parameters using generic AMPL syntax (e.g., 'param cost {SETS};').
2. You must not include any data assignment operators (:=) or data values in the .mod file. All data belongs in the .dat file.
3. Define all variables, Objective function, and Constraints, integrating the complex linking constraints provided in the blueprint.

Return only the AMPL model code for the .mod file. Do not include explanations or comments anywhere.

Listing 3: Prompt template for Data Extractor

You are the final, highly specialized AMPL Coder. Your sole function is to synthesize the provided components into a complete, executable AMPL model (.mod) and data (.dat) file.
Pay attention to the units required in the final output.

The optimization problem is the following:
{q}

The model file is already attempted by your peer:

{mod}

Your job is to create the model and data files for the optimization problem.

Return both the AMPL model and data code. Do not include explanations or comments anywhere.
...
1.mod:

[.mod file content here]

2.dat: [.dat file content here]

Listing 4: Prompt template for Debugger

````text As a specialized Optimization Code Reviewer, your responsibility is to identify the source of the numerical error in the provided AMPL model. Here is the optimization problem:

{q}

Here is the previous AMPL code:

{ampl}

Return in a few short lines why the AMPL code gave the wrong answer of {predicted}, when the correct answer should be {expected}. Propose a fix briefly. ````

Listing 5: Prompt template for Code Reviewer

````text As a specialized Optimization Code Reviewer, your responsibility is to identify the source of the numerical error in the provided AMPL model. Your analysis must determine if the discrepancy between the PREDICTED value ({predicted}) and the EXPECTED value ({expected}) is due to a modeling error or a data error. Now, here is the problem:

{q}

Here is the AMPL code for review:

{ampl}

Your response should follow this format:

  1. Diagnosis of Error Source [State clearly whether the error is in the Model Logic (.mod) or the Data (.dat). If the code is correct, state that the expected value is likely flawed due to source data.]

  1. Code Review: Model Logic (.mod) [Review structure, variable definitions, and constraints. Check for MTZ exclusions, capacity links, and correct Objective function.]

  1. Proposed Fix [If the error is in the model, provide the corrected AMPL code for the .mod file. If the error is in the data, specify which parameter(e.g., unit error, transcription error).]

If both the model and the data file is correct, and the error lies in the optimization problem, output 1 in the final line. ````

Listing 6: Prompt template for Code Modifier

````text As a specialized Optimization Code Reviewer, your responsibility is to improve the current AMPL model. Here is the optimization problem:

{q}

Here is the previous AMPL code:

{ampl}

Here is the comment and proposed fix by your peer:

{comment}

Modify the AMPL code such that it models the question accurately, based on the comment and proposed fix by your peer. Return only the new AMPL code. Do not include explanations or comments anywhere. Use the exact format below: 1.mod: [.mod file content here]

2.dat: [.dat file content here] ````

Templates for model–data separation

To systematically separate the natural language description from its associated data, we employ a pipeline consisting of a NL-Data Separator and a Verifier.

Model-Data Separator: Transforms a given optimization problem into two distinct components: a problem statement in natural language and a dataset in CSV format. The problem statement presents a structured task description and specifies the optimization objective without including any numerical values. All quantitative information is captured exclusively in the dataset, which contains only the values explicitly provided in the original problem.

Verifier: Ensures the integrity of the model–data separation by checking that all numerical values required to solve the optimization problem are present in the data file.

Listing 7: Prompt template for NL-Data Separator

The following is an optimization problem. Please construct:

  1. A problem statement in natural language, beginning with "You are..." and following a structured task description. It should clearly explain what the objective is, but must NOT contain any specific numerical values. No concrete quantities, figures, or units of measurement should be mentioned.

  1. A dataset composed of multiple CSV-style tables that define a specific parameters.

  • All variables referenced in the optimization problem must be represented in the tables.

  • All table cells should be numeric, do not use placeholders.

  • Only include values explicitly mentioned in the problem.

The optimization problem is as follows: {ques}

Please construct a problem specification and tabular dataset according to the above requirements, and provide the results the following format:

1. Problem statement
[Write the problem specification in plain English.]

2. Tables
table1_name.csv - Description
Column1, Column2, ...
value1, value2, ...
...

table2_name.csv - Description
Column1, Column2, ...
value1, value2, ...
...

Listing 8: Prompt template for Verifier

You are asked to compare an optimization problem and its corresponding tabular datasets.
The optimization problem is as follows:
{ques}

The tabular datasets corresponding are as follows:
{dat}

Please check if the tabular datasets contain all values needed to solve the optimization problem.
If this is satisfied, return 1. If not, return 0.
Return 1 or 0 only.

Templates for prediction case construction

To construct prediction cases for NLData2Opt, we transform NL+Data cases into tasks that require LLMs to predict future parameter values from historical data. To construct tasks that require different numbers of parameters to be predicted, we implement a pipeline that consists of the following components:

AMPL Formulator: Modifies the data of a task from NL+Data case to create prediction cases. It handles single or multiple targets, and supports increasing and stable trends. Historical data are generated for each target, with the final time period containing the true value. After passing the Verifier, this value is subsequently blanked out in the historical data table using automated scripts. Based on these patterns, seasonality, abrupt changes, intermittent missing data, and outliers are introduced to simulate richer temporal dynamics.

Verifier: Inspects the new optimization problem if all data in the NL+Data case are included. In addition, historical data are provided for a certain number of parameters, with the final time period containing the value to be predicted. Two separate verifiers are used for single variable and multi-variable prediction, respectively.

Description Writer: Generates a natural language problem description from the tabular datasets. In addition to clearly stating the overall optimization objective, it explicitly specifies which variables must be predicted at which exact time period.

Listing 9: Prompt template for AMPL Formulator (increasing case, single variable)

The following are a problem description and its data tables:

{base}


Modify the tabular datasets following the below requirements:
- Choose one value in the tabular datasets of the optimization problem as the prediction target.
- Provide historical data of at least 8 time periods that show a realistic trend with small random noise.
- The historical data show an increasing trend that approaches the true target value naturally, without overshooting it.
- The historical trend must stop immediately at the true target value.
- The time period should have its own column, with realistic names and values.
- Do not remove or rename any existing columns or rows in the original tables. However, the single true target value must be visibly blanked out exactly where it originally appeared.

Provide the results the following format, do not add comments:
1. Problem statement
[The original problem statement]

2. Tables
table1_name.csv - Description
Column1, Column2, ...
value1, value2
...

table2_name.csv - Description
Column1, Column2, ...
value1, value2
...

Listing 10: Prompt template for AMPL Formulator (stable case, multiple variables)

The following are a problem description and its
data tables:

{base}


Modify the tabular datasets following the below
requirements:
- The given problem description and tables
  already contain one value that has been
  blanked out as an existing prediction target
  . Keep that historical data table unchanged.
- Select one additional value in the tabular
  datasets to serve as a second new prediction
  target. Blank it out exactly where it
  originally appeared, without removing or
  renaming any columns or rows.
- For the new prediction target, provide at
  least 8 time periods of historical data in a
  separate table.
- The historical series for the new target must
  show natural small random fluctuations
  around the prediction target while
  maintaining integer constraints when
  necessary.
- The historical data should hover both slightly
  above and below the new prediction target,
  centering roughly on it.
- The final row for all historical data should
  have the target value exactly, do not leave
  it blank.
- The time period should have its own column,
  with realistic names and values.
- Do not remove or rename any existing data
  aside from blanking out the two true target
  values.

The final sentence in the problem description
should specify which two parameters need to
be predicted at which time period. Phrase it
as "you need to predict...".

Provide the results the following format, do not
add comments:
  1. Problem statement [Rewrite the original problem statement]

  1. Tables table1_name.csv - Description Column1, Column2, ... value1, value2, ... ... table2_name.csv - Description Column1, Column2, ... value1, value2, ... ...


Listing 11: Prompt template for Verifier (single variable)

You are asked to verify if the given tabular datasets satisfy certain rules.

Optimization problem: {ques}

Tabular datasets:


{dat}

Check if the data tables satisfy the following rules:

  1. Historical data is only provided for 1 variable in the data tables.

  2. All variables mentioned in the optimization problem appear in the main data tables except for one missing value.

  3. A historical table provides the correct value for one variable, with the value in the final time period appearing in the question.

Output "1" if all rules are satisfied, otherwise output "0". Do not provide any extra text.


Listing 12: Prompt template for Verifier (multiple variable)

You are asked to verify if the given tabular datasets satisfy certain rules.

Optimization problem: {ques}

Tabular datasets:


{dat}

Check if the data tables satisfy the following rules:

  1. Historical data ending at the same numerical value as the optimization problem are provided for at least 2 variables. Ignore textual differences when comparing numerical values.

  2. All variables mentioned in the optimization problem appear in the main data tables except for those in the historical tables.

Output "1" if all rules are satisfied, otherwise output "0". Do not provide any extra text.

Listing 13: Prompt template for Description Writer

The following is an optimization problem, with
its corresponding tabular datasets. You are
asked to write a problem description.

Optimization problem:
{ques}

Tabular datasets:
{dat}

Please write a problem description in natural
language, beginning with "You are..." and
following a structured task description.
Do not include any specific numerical values. No
concrete quantities, figures, or units of
measurement should be mentioned.
It should clearly explain what the overall
objective of the optimization problem is.
Specify which parameters needs to be predicted
at which time period. Phrase it as "you need
to predict...". Explicitly mention the **
exact time** to be predicted as it appears
of the provided tables. Do not paraphrase it
as "the final row" or "the next time".

Provide only the problem statement, do not add
comments.

Templates for derivation case construction

To generate derivation cases for NLData2Opt, we transform straightforward optimization problems into new problems that require intermediate calculations. Because directly transforming existing optimization problems to require intermediate calculations in a single step proved challenging for LLMs, we adopt a two-stage transformation strategy. The components of the pipeline are as follows:

Context Generator: Produces a rewritten optimization problem where exactly one numerical quantity is expressed via meaningful intermediate quantities, without changing the total value or feasible region. Example transformations are provided to encourage the LLM to generate valid decompositions. Example transformations are provided to guide the LLM toward valid decompositions. Two context generators are used sequentially, with context generator 2 employed after context generator 1 to process questions that were not successfully transformed according to the Verifier.

Verifier: Inspects the new optimization problem if it maintains the same feasible region and optimal solution as the problem before the transformation. In addition, it makes sure the transformation successfully introduced intermediate quantities to require derivation-based manipulation by making sure one numerical quantity is decomposed into possible components.

NL-Data Separator: Separates the model from its associated data for the new optimization problem. Compared to the standard NL+Data Separator used for the NL+Data case, this version specifies to only include the intermediate quantities when both aggregated parameters and intermediate quantities are provided, ensuring that derivation-based reasoning is required while modeling the optimization problem.

Listing 14: Prompt template for Context Generator 1

Rewrite the given optimization problem so that
exactly one numerical variable is optionally
expressed in terms of meaningful
intermediate components, without changing
the total value or the feasible region of
the problem. All other parts of the problem
must remain unchanged. The decomposition
should reflect derivation-oriented reasoning
, such as computing profit from revenue and
costs, or breaking down total production
time into separate tasks. Return only the
rewritten problem.

---

The optimization problem is as follows:
A school needs to provide lunch for at least 300
    students.

Rewrite:
A school needs to provide lunch for at least 150
    boys and 150 girls.

---

The optimization problem is as follows:
It makes a profit of $3 per regular sandwich and
    a profit of $4 per special sandwich.

Rewrite:
A regular sandwich costs $1 to make and has a
    selling price of $4. A special sandwich
    costs $3 to make and has a selling price of
    $7.

---

The optimization problem is as follows:
{ques}

Rewrite:

Listing 15: Prompt template for Context Generator 2

You are an Optimization Problem Decomposer. Your
task is to take a straightforward
optimization problem and rewrite it into a
new, more detailed narrative.

You must follow these rules:

1. You *must* take the simple numbers (constants
   ) in the problem (e.g., 10, 6, 150) and
   break them down arithmetically into
   nontrivial new components.
* FAILURE: A trivial split like '100' -> '50+50'
  is a **complete failure**.
* GOOD EXAMPLE: A good split adds new concepts:

'4' -> 'a 1-unit prep fee and 3 units of application time'.

  1. You must rewrite only the parts of the sentence that contain the numbers you are decomposing. Do not add extra, unnecessary sentences or rephrase parts of the problem that are not being changed.

  1. Simply rephrasing the problem in new words or translating it into its algebraic form (like "minimize 10x + 6y") is a complete failure. The rewrite must contain the arithmetic decomposition from Rule 1.

  1. The final, rewritten problem must be mathematically identical to the original. The objective function and all constraints must simplify to the exact same equations.

  1. The rewritten problem should preserve the narrative style, sentence structure, and context around the numbers. It should read like a natural problem statement, not a formula or explanation.


Example 1: Objective Function

The optimization problem is as follows: A company earns a profit of $5 per product.

Rewrite: Each product sells for $15 and costs $10 to produce.


Example 2: Simple Constraint

The optimization problem is as follows: A factory produces 800 units per day.

Rewrite: The factory operates for 10 hours a day. It spends 2 hours setting up machines and then produces 100 units per hour for the remaining 8 hours.


Example 3: Constraint with Multipliers

The optimization problem is as follows: Four times the man-hours spent on task X plus those spent on task Y should not exceed 16

Rewrite: Each unit of task X contributes 4 man-hours, consisting of 2 hours of planning and 2 hours of execution; each unit of task Y contributes 1 man-hour of work. Then, summing these contributions, the total man-hours 4X + Y cannot exceed 16.


TASK

The optimization problem is as follows: {ques}

Rewrite:

Listing 16: Prompt template for Verifier

Compare the two optimization problems below and determine if the rewritten one correctly follows the transformation rules:

  1. The rewritten problem must have the same feasible region and optimal solution as the original problem after the transformation.

  2. At least one numerical quantity from the original problem is split into meaningful components.

Original problem: {ques}

Rewritten problem: {new}

Return 1 if both rules are satisfied, else 0. Only return 1 or 0. If 0, in the next paragraph, change the rewritten problem to fulfill the rules.

Listing 17: Prompt template for NL-Data Separator

The following is an optimization problem. Please construct:

  1. A problem statement in natural language

    • Begin with "You are..." and following a structured task description.

    • Include only those constraints that are not already evident or numerically encoded in the dataset tables.

    • Do not include any numbers, units, or placeholders anywhere in the text.

  1. A dataset composed of multiple CSV-style tables that define a specific parameters.

    • All variables referenced in the optimization problem must be represented in the tables.

    • All table cells should be numeric, do not use placeholders.

    • Only include values explicitly mentioned in the problem.

    • When both aggregated parameters and intermediate parameters are provided, only include the intermediate parameters.

The optimization problem is as follows: {ques}

Please construct a problem specification and tabular dataset according to the above requirements, and provide the results the following format:

...

  1. Problem statement [Write the problem specification in plain English.]

  1. Tables table1_name.csv – Description Column1, Column2, ... value1, value2, ... ...

    table2_name.csv – Description Column1, Column2, ... value1, value2, ... ...

...


# Templates for LLM evaluation

In this section, instructions templates to assess the accuracy of AMPL formulation are introduced. Given that LLM outputs may contain conversational headers or omit the target .mod/.dat markers, we utilize the template detailed in Listing 18 to extract the AMPL formulation and ensure the files are in a compatible format with the CBC solver.

To perform a holistic evaluation, in addition to the EF1 and EBC, we employ LLM-based evaluation with the template provided in Listing 19. The rating of 0-10 is then normalized to a score between 0 and 10, which is consistent with the other two metrics.

Listing 18: Prompt template for reformatting generated messy formulation

You are given an output. Extract the AMPL formulation if possible. For the data file, leave #empty if empty, but do not omit the "2.dat" marker.

Output: {AMPL_Formulation}

Return strictly in this format: ```1.mod: <AMPL model>

2.dat: <AMPL data>```

If the text does not contain tangible AMPL formulation, return: 1.mod: #empty

2.dat: #empty ```


Listing 19: Prompt template for evaluating overall correctness

Does this .mod and .dat pair represent the same optimization problem as the ground-truth . mod and .dat? Rate this solution from 0 to 10:

.mod file: {mod1_content}

ground truth .mod file: {mod2_content}

.dat file: {dat1_content}

ground truth .dat file: {dat2_content}

Specifically, evaluate:

  • Whether the constraints in the candidate .mod file are equivalent to those in the ground- truth .mod file,

  • Whether the parameter values in the candidate . dat file exactly match those in the ground- truth .dat file.

Return an explanation. The final line should be the rating.


# Controlled Prediction Baselines

We implement two additional controlled baselines to separate forecasting difficulty from formulation difficulty, focusing on three representative models: claude-opus-4.6 ({xref}`Table 1`), gpt-4o-mini ({xref}`Table 2`), and llama-3.3-70b-instruct ({xref}`Table 3`). In the simple forecasting baseline, the LLM-generated predictions are replaced with estimates from a linear trend extrapolation over historical series data, while the remaining formulation process remains unchanged. In the oracle-prediction baseline, the predicted values are replaced with the ground-truth future values, thereby removing forecasting error and allowing us to examine errors arising from incorporating these values into the final optimization formulation.

We observe that replacing the LLM-generated predictions with the simple forecasting baseline generally reduces EBC. However, using oracle-prediction values yields only small improvements over the original LLM baseline. This suggests that the forecasting capability of modern LLMs is already sufficient for many tasks and that forecasting errors alone cannot explain the observed performance gap.

The oracle-prediction baseline generally improves EBC and LLM-ES only slightly. For example, EBC of Llama 3.3 70B Instruct on the One-Variable Prediction case increases from 0.1824 to just 0.1847 under oracle prediction. This indicates that formulation errors remain persistent even when forecasting difficulty is isolated. In particular, lower-capacity models continue to struggle with incorporating predicted values into the optimization instance and constructing the corresponding formulation correctly.

# Further Analysis

{xref}`Table 4` summarizes the percentage of tasks where the optimization model is correctly identified for the derivation case. Here, a correct model is when the constraint relation types ($\le$, $\ge$, $=$) and objective function type (maximize or minimize) exactly
CaseSimple ForecastingOracle PredictionLLM
EF1EBCLLM-ESEF1EBCLLM-ESEF1EBCLLM-ES
One-Variable0.89680.22130.53900.85480.22240.60430.37880.23860.5368
One-Variable + Irr0.92080.16710.48780.87650.19450.47160.42590.25550.4443
Multi-Variable0.95350.22290.52390.85820.27980.58300.38370.26800.5522
Multi-Variable + Irr0.87140.15120.46920.85000.15330.48330.34190.20710.4434

Table 2. Performance breakdown for GPT-4o Mini across prediction baselines (Simple Forecasting, Oracle Prediction, and LLM).

match the ground truth formulation, regardless of the values of the parameters.

Table 5 analyzes the performance of the prediction step prior to optimization. It reports percentage of tasks where future prediction exactly matches the ground truth value (EC) and relative correctness (RC). We find that most methods obtain over 30% on the EC metric and over 60% on the RC metric.

To further investigate the failure modes of the generated optimization models, we categorize AMPL execution errors encountered across all models and datasets. Figure 6 visualizes the proportional distribution of the error types across the nine distinct task cases, while Table 6 reorganizes failures into tool-specific syntax errors and structural errors.

CaseCompilation SuccessExact Match RateSyntax ErrorStructural Error
NL51%23%11%43%
NL + Data45%22%24%46%
NL + Data + Irr48%25%16%46%
Derivation42%8%20%50%
Derivation + Irr43%10%12%49%
Prediction (1-Var)37%7%17%54%
Prediction (1-Var) + Irr35%12%8%63%
Prediction (Multi-Var)41%8%16%52%
Prediction (Multi-Var) + Irr38%11%13%58%

Table 6. Failure type breakdown across all task cases.

Across task cases, maintaining structural consistency between the model and the data is demonstrated to be a significant challenge for LLMs. We identify three primary types of errors that are prevalent across tasks:

  • Undefined Entities: A structural error where the model (.mod) attempts to use a set, parameter, or variable in a constraint or objective function that has not been formally declared or initialized.

  • Undeclared Data Assignments: A structural error where the data file (.dat) attempts to assign values for parameters or sets that do not exist in the corresponding .mod file.

  • Syntax Errors: Fundamental formatting violations, such as missing semicolons or incorrect assignment operators, prevent the AMPL compiler from parsing the scripts. This includes dimension mismatches such as improper set index, reflecting a failure of mathematical indexing as well as grammar.

Beyond compile-time failures, semantic modeling errors cannot be caught during compilation but manifest as discrepancies in the final objective value. As shown in Table 6, the exact objective match rate is consistently lower than the compilation success rate, which indicates that many generated formulations are executable but still contain semantic modeling errors that lead to incorrect solutions.

Comprehensive Evaluation Results

The experimental results reported in Table 7-Table 15 are based on a randomly sampled 15% subset of the full benchmark, selected using a random seed of 42. The results are categorized across all cases, datasets, and methods to provide a comprehensive overview of baseline performance. We report the three evaluation metrics: entity F1 score (EF1), execution-based correctness (EBC) and LLM-based evaluation score (LLM-ES). To assess the variance and stability of LLM-ES, we measure self-consistency by evaluating each candidate formulation with prompt variations. Specifically, we apply character-level errors in high-attention words, insert sentence-level line breaks, and paraphrase certain verbs and adjectives [10]. We report the mean score and standard deviation across four evaluation runs with different prompt varia-

CaseSimple ForecastingOracle PredictionLLM
EF1EBCLLM-ESEF1EBCLLM-ESEF1EBCLLM-ES
One-Variable0.87560.09620.48740.80070.18470.56260.34860.18240.4932
One-Variable + Irr0.80040.07330.43080.80460.09990.44930.15570.11800.4176
Multi-Variable0.80870.13870.51070.86810.23970.57390.41540.28250.5045
Multi-Variable + Irr0.66930.10660.43050.71590.14250.45430.29250.20080.3960

caption: Performance breakdown for Meta LLaMA 3.3 70B Instruct across prediction baselines (Simple Forecasting, Oracle Prediction, and LLM).

:::

tions.

To assess whether the subset is representative of the full benchmark, we evaluated claude-opus-4.6 (Table 16), gpt-4o-mini (Table 17), and llama-3.3-70b-instruct (Table 18) on the complete benchmark. The full-benchmark results exhibit trends consistent with those reported on the 15% subset. In particular, the relative ranking of models is preserved, with Claude Opus 4.6 outperforming GPT-4o Mini and Llama 3.3 70B Instruct. Similarly, the comparative difficulty of different task settings are preserved: task cases involving derivation, prediction, and irrelevant attributes remain more challenging than the base NL and NL+Data cases. These observations suggest that the subset-based evaluation is representative of overall model performance.

CaseNLP4LP EF1NLP4LP EBCNLP4LP LLM-ESMamo Easy EF1Mamo Easy EBCMamo Easy LLM-ESMamo Complex EF1Mamo Complex EBCMamo Complex LLM-ES
NL0.51720.01290.45540.78530.04840.64220.61450.13780.5933
NL + Data0.75120.40180.65060.62800.48610.53010.68220.24860.6205
NL + Data + Irr0.70970.35520.42530.57810.42920.43680.62160.24680.5376
Derivation0.65030.22720.45020.52330.22000.40940.53930.17690.4886
Derivation + Irr0.57970.19910.36360.47480.17380.36710.55040.13900.4419
Prediction (1-Var)0.70910.21030.51970.60530.30590.46340.65770.18950.5148
Prediction (1-Var) + Irr0.67760.18700.39410.57070.33030.41260.58500.17200.4752
Prediction (Multi-Var)0.71280.31860.60820.58020.26100.44980.68520.18900.5138
Prediction (Multi-Var) + Irr0.66710.27980.42010.55820.25860.40330.62060.16570.4595

Table 17. Evaluation results for GPT-4o Mini on the full benchmark.

Model/MethodNLP4LP EF1NLP4LP EBCNLP4LP LLM-ESMamo Easy EF1Mamo Easy EBCMamo Easy LLM-ESMamo Complex EF1Mamo Complex EBCMamo Complex LLM-ES
GPT-4o Mini0.7370.2660.421 ± 0.0490.6000.4900.419 ± 0.0490.8110.3360.529 ± 0.049
GPT-4o0.7230.6270.451 ± 0.0470.6270.5130.403 ± 0.0530.8010.3850.558 ± 0.066
Gemini 2.5 Pro0.8790.2730.347 ± 0.0550.6350.2190.299 ± 0.0590.8000.0320.411 ± 0.055
Claude Haiku 4.50.8240.6130.438 ± 0.0470.6670.6970.461 ± 0.0560.8750.5510.554 ± 0.043
Claude Sonnet 4.60.8610.2230.355 ± 0.0740.7010.2840.503 ± 0.0490.8760.6780.539 ± 0.055
Claude Opus 4.60.9120.6550.412 ± 0.0500.6830.5860.480 ± 0.0590.8720.7870.551 ± 0.045
LLaMA 3.1 8B Inst.0.7200.0000.371 ± 0.0390.5370.0000.363 ± 0.0460.5930.0320.418 ± 0.049
Ministral 8B0.8010.0000.417 ± 0.0600.5630.0100.398 ± 0.0610.7360.0000.483 ± 0.050
LLaMA 3.3 70B Inst.0.6060.1870.398 ± 0.0450.5280.3050.420 ± 0.0480.8520.1010.473 ± 0.052
Mistral Large0.5390.1320.453 ± 0.0560.5400.1200.416 ± 0.0480.8260.2840.503 ± 0.052
Five-element0.8520.6330.710 ± 0.0140.7420.4400.543 ± 0.0070.8210.4150.629 ± 0.010
CoE0.5690.0330.031 ± 0.0160.5070.0140.254 ± 0.0220.9350.0060.245 ± 0.029
SFT0.8120.4950.666 ± 0.0170.5420.5800.431 ± 0.0090.8210.1800.526 ± 0.006

Table 9. Comprehensive metrics for performance on NL+Data case with irrelevant attributes.

Model/MethodNLP4LP EF1NLP4LP EBCNLP4LP LLM-ESMamo Easy EF1Mamo Easy EBCMamo Easy LLM-ESMamo Complex EF1Mamo Complex EBCMamo Complex LLM-ES
GPT-4o Mini0.6720.1940.389 ± 0.0410.4990.1900.353 ± 0.0400.6540.0480.453 ± 0.037
GPT-4o0.6850.4440.396 ± 0.0520.5370.2830.388 ± 0.0340.6950.2750.447 ± 0.042
Gemini 2.5 Pro0.9140.1280.290 ± 0.0650.7080.0250.209 ± 0.0630.8000.0330.373 ± 0.052
Claude Haiku 4.50.7660.5100.398 ± 0.0420.6530.4780.394 ± 0.0510.8270.3570.491 ± 0.033
Claude Sonnet 4.60.7950.2250.341 ± 0.0380.5610.2760.381 ± 0.0470.8510.4260.493 ± 0.049
Claude Opus 4.60.8040.3150.355 ± 0.0390.6430.4170.408 ± 0.0490.8440.5400.484 ± 0.038
LLaMA 3.1 8B Inst.0.6100.0000.345 ± 0.0430.4830.0000.328 ± 0.0280.4420.0000.379 ± 0.038
Ministral 8B0.7170.0000.368 ± 0.0440.4890.0000.340 ± 0.0440.6000.0000.423 ± 0.041
LLaMA 3.3 70B Inst.0.6960.0960.392 ± 0.0400.4210.1600.359 ± 0.0390.5740.0200.428 ± 0.045
Mistral Large0.6680.1500.398 ± 0.0420.4800.0340.382 ± 0.0390.7140.0790.439 ± 0.040
Five-element0.6520.3200.493 ± 0.0160.5120.1100.366 ± 0.0120.6480.1450.390 ± 0.017
CoE0.6000.0240.085 ± 0.0080.6970.3420.218 ± 0.0160.6730.0120.191 ± 0.019
SFT0.5420.2800.393 ± 0.0150.4120.1950.295 ± 0.0120.6210.2850.327 ± 0.016

Table 11. Comprehensive metrics for performance on derivation case with irrelevant attributes.

Model/MethodNLP4LP EF1NLP4LP EBCNLP4LP LLM-ESMamo Easy EF1Mamo Easy EBCMamo Easy LLM-ESMamo Complex EF1Mamo Complex EBCMamo Complex LLM-ES
GPT-4o Mini0.4230.2470.418 ± 0.0490.3300.2980.426 ± 0.0430.4510.2570.482 ± 0.044
GPT-4o0.6700.4800.435 ± 0.0360.5270.5850.446 ± 0.0570.7540.4100.513 ± 0.052
Gemini 2.5 Pro0.3300.0650.312 ± 0.0680.2420.2680.315 ± 0.0680.0240.0350.411 ± 0.045
Claude Haiku 4.50.8000.4010.407 ± 0.0470.6840.4220.416 ± 0.0440.8510.5040.529 ± 0.054
Claude Sonnet 4.60.7510.3170.364 ± 0.0370.7160.4930.468 ± 0.0560.8540.6940.498 ± 0.055
Claude Opus 4.60.8530.3910.415 ± 0.0410.6690.6900.452 ± 0.0570.8720.6800.520 ± 0.060
LLaMA 3.1 8B Inst.0.5710.0000.355 ± 0.0340.4650.0000.389 ± 0.0410.5010.0000.374 ± 0.049
Ministral 8B0.6920.0000.388 ± 0.0410.5640.0110.417 ± 0.0570.5640.0000.436 ± 0.052
LLaMA 3.3 70B Inst.0.1390.1020.385 ± 0.0390.2370.3170.442 ± 0.0510.1590.0940.454 ± 0.052
Mistral Large0.2900.1210.443 ± 0.0470.0750.0570.438 ± 0.0540.2000.0580.470 ± 0.052
Five-element0.8640.2670.453 ± 0.0170.6820.1000.421 ± 0.0110.7290.2000.288 ± 0.034
CoE0.7150.1080.592 ± 0.0180.5890.2310.522 ± 0.0120.7260.0570.374 ± 0.011
SFT0.8690.3250.449 ± 0.0170.7320.4170.576 ± 0.0070.7950.2850.124 ± 0.015

Table 13. Comprehensive metrics for performance on prediction case (one variable) with irrelevant attributes.

References

  1. [1]Ali AhmadiTeshnizi, Wenzhi Gao, and Madeleine Udell. 2023. Optimus: Optimization modeling using MIP solvers and large language models. CoRR, abs/2310.06116.arxiv.org/abs/2310.06116
  2. [2]Nicolás Astorga, Tennison Liu, Yuanzhang Xiao, and Mihaela van der Schaar. 2025. Autoformulation of mathematical optimization models using llms. In Forty-second International Conference on Machine Learning, ICML 2025, Vancouver, BC, Canada, July 13-19, 2025. OpenReview.net.arxiv.org/abs/2411.01679
  3. [3]Léo Baty, Kai Jungel, Patrick S. Klein, Axel Parmentier, and Maximilian Schiffer. 2024. Combinatorial optimization-enriched machine learning to solve the dynamic vehicle routing problem with time windows. Transportation Science, 58(4):708–725.arxiv.org/abs/2304.00789
  4. [4]Anna Bavaresco, Raffaella Bernardi, Leonardo Bertolazzi, Desmond Elliott, Raquel Fernández, Albert Gatt, Esam Ghaleb, Mario Giulianelli, Michael Hanna, Alexander Koller, André F. T. Martins, Philipp Mondorf, Vera Neplenbroek, Sandro Pezzelle, Barbara Plank, David Schlangen, Alessandro Suglia, Aditya K. Surikuchi, Ece Takmaz, and Alberto Testoni. 2025. Llms instead of human judges? A large scale empirical study across 20 NLP evaluation tasks. In Proceedings of the 63rd Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers), ACL 2025, Vienna, Austria, July 27 - August 1, 2025, pages 238–255. Association for Computational Linguistics.
  5. [5]Yoshua Bengio, Andrea Lodi, and Antoine Prouvost. 2021. Machine learning for combinatorial optimization: A methodological tour d’horizon. European Journal of Operational Research, 290(2):405–421.arxiv.org/abs/1811.06128
  6. [6]Hao Chen, Gonzalo E. Constante-Flores, and Can Li. 2024. Diagnosing infeasible optimization problems using large language models. INFOR Inf. Syst. Oper. Res., 62(4):573–587.arxiv.org/abs/2308.12923
  7. [7]Yitian Chen, Cheng Cheng, Yinan Sun, Zi Ling, and Dongdong Ge. 2026. Opt-engineering: Benchmarking the limits of llms in optimization modeling. CoRR, abs/2601.19924.arxiv.org/abs/2601.19924
  8. [8]Yitian Chen, Jingfan Xia, Siyu Shao, Dongdong Ge, and Yinyu Ye. 2025. Solver-informed RL: ground-ing large language models for authentic optimization modeling. CoRR, abs/2505.11792.arxiv.org/abs/2505.11792
  9. [9]Yuqing Cheng, Zhiying Cao, Xiuguo Zhang, Qilei Cao, and Dezhen Zhang. 2024. Multi objective dynamic task scheduling optimization algorithm based on deep reinforcement learning. J. Supercomput., 80(5):6917–6945.DOI
  10. [10]Junhyuk Choi, Sohhyung Park, Chanhee Cho, Hyeonchu Park, and Bugeun Kim. 2026. Diagnosing the reliability of llm-as-a-judge via item response theory. CoRR, abs/2602.00521.arxiv.org/abs/2602.00521
  11. [11]Adam N. Elmachtoub and Paul Grigas. 2022. Smart "predict, then optimize". Manag. Sci., 68(1):9–26.arxiv.org/abs/1710.08005
  12. [12]Robert Fourer, David M Gay, and Brian W Kernighan. 1990. Ampl: A mathematical programming language. Management Science, 36(5):519–554.
  13. [13]Neeraj Gangwar and Nickvash Kani. 2023. Highlighting named entities in input for auto-formulation of optimization problems. In Intelligent Computer Mathematics - 16th International Conference, CICM 2023, Cambridge, UK, September 5-8, 2023, Proceedings, volume 14101 of Lecture Notes in Computer Science, pages 130–141. Springer.DOI
  14. [14]Zhijing Hu, Yufan Deng, Haoyang Liu, and Changjun Fan. 2026. Ned-tree: Bridging the semantic gap with nonlinear element decomposition tree for LLM nonlinear optimization modeling. CoRR, abs/2604.01588.arxiv.org/abs/2604.01588
  15. [15]Xuhan Huang, Qingning Shen, Yan Hu, Anningzhe Gao, and Benyou Wang. 2024. Mamo: a mathematical modeling benchmark with solvers. CoRR.
  16. [16]Caigao Jiang, Xiang Shu, Hong Qian, Xingyu Lu, Jun Zhou, Aimin Zhou, and Yang Yu. 2025a. LLMOPT: learning to define and solve general optimization problems from scratch. In The Thirteenth International Conference on Learning Representations, ICLR 2025, Singapore, April 24-28, 2025. OpenReview.net.arxiv.org/abs/2410.13213
  17. [17]Xia Jiang, Yaoxin Wu, Minshuo Li, Zhiguang Cao, and Yingqian Zhang. 2025b. Large language models as end-to-end combinatorial optimization solvers. CoRR, abs/2509.16865.arxiv.org/abs/2509.16865
  18. [18]Zihao Jiao, Mengyi Sha, Haoyu Zhang, Xinyu Jiang, and Wei Qi. 2024. City-leo: Toward transparent city management using LLM with end-to-end optimization. CoRR, abs/2406.10958.arxiv.org/abs/2406.10958
  19. [20]Beibin Li, Konstantina Mellou, Bo Zhang, Jeevan Pathuri, and Ishai Menache. 2023a. Large language models for supply chain optimization. CoRR, abs/2307.03875.arxiv.org/abs/2307.03875
  20. [21]Ran Li, Chuanqing Pu, Junyi Tao, Canbing Li, Feilong Fan, Yue Xiang, and Sijie Chen. 2023b. Llm-based frameworks for power engineering from routine to novel tasks. Preprint, arXiv:2305.11202.arxiv.org/abs/2305.11202
  21. [22]Kuo Liang, Yuhang Lu, Jianming Mao, Shuyi Sun, Chunwei Yang, Congcong Zeng, Xiao Jin, Hanzhang Qin, Ruihao Zhu, and Chung-Piaw Teo. 2026. Large-scale optimization model auto-formulation: Harnessing LLM flexibility via structured workflow. CoRR, abs/2601.09635.arxiv.org/abs/2601.09635
  22. [23]Fu Luo, Xi Lin, Yaoxin Wu, Zhenkun Wang, Tong Xialiang, Mingxuan Yuan, and Qingfu Zhang. 2025. Boosting neural combinatorial optimization for large-scale vehicle routing problems. In International Conference on Representation Learning, volume 2025, pages 14754–14780.
  23. [24]Zeyuan Ma, Hongshu Guo, Jiacheng Chen, Guojun Peng, Zhiguang Cao, Yining Ma, and Yue-Jiao Gong. 2024. Lamoco: Instruction tuning of large language models for optimization code generation. CoRR, abs/2403.01131.arxiv.org/abs/2403.01131
  24. [25]Jayanta Mandi, James Kotary, Senne Berden, Maxime Mulamba, Victor Bucarey, Tias Guns, and Ferdinando Fioretto. 2024. Decision-focused learning: Foundations, state of the art, benchmark and future opportunities. J. Artif. Intell. Res., 80:1623–1701.DOI
  25. [26]Bruce McCarl, Alex Meeraus, Paul van der Eijk, Michael Bussieck, Steven Dirkse, and Franz Nelissen. 2012. Mccarl expanded gams user guide version 23.6. GAMS Development, Washington, DC.
  26. [27]Vishal Pallagani, Bharath C. Muppasani, Kaushik Roy, Francesco Fabiano, Andrea Loreggia, Keerthiram Murugesan, Biplav Srivastava, Francesca Rossi, Lior Horesh, and Amit P. Sheth. 2024. On the prospects of incorporating large language models (llms) in automated planning and scheduling (APS). In Proceedings of the Thirty-Fourth International Conference on Automated Planning and Scheduling, ICAPS 2024, Banff, Alberta, Canada, June 1-6, 2024, pages 432–444. AAAI Press.DOI
  27. [28]Rindranirina Ramamonjison, Timothy T. L. Yu, Raymond Li, Haley Li, Giuseppe Carenini, Bissan Ghaddar, Shiqi He, Mahdi Mostajabdaveh, Amin Banitalebi-Dehkordi, Zirui Zhou, and Yong Zhang. 2023. Nl4opt competition: Formulating optimization problems based on their natural language descriptions. CoRR, abs/2303.08233.
  28. [29]Kayla Schroeder and Zach Wood-Doughty. 2024. Can you trust LLM judgments? reliability of llm-as-a-judge. CoRR, abs/2412.12509.arxiv.org/abs/2412.12509
  29. [30]Freda Shi, Xinyun Chen, Kanishka Misra, Nathan Scales, David Dohan, Ed H. Chi, Nathanael Schä rli, and Denny Zhou. 2023. Large language models can be easily distracted by irrelevant context. In International Conference on Machine Learning, ICML 2023, 23-29 July 2023, Honolulu, Hawaii, USA, Proceedings of Machine Learning Research, pages 31210–31227. PMLR.arxiv.org/abs/2302.00093
  30. [31]Paul Mingzheng Tang, Kenji Kah Hoe Leong, Nowshad Shaik, and Hoong Chuin Lau. 2024a. Automated conversion of static to dynamic scheduler via natural language. CoRR, abs/2405.06697.arxiv.org/abs/2405.06697
  31. [32]Zhengyang Tang, Chenyu Huang, Xin Zheng, Shixi Hu, Zizhuo Wang, Dongdong Ge, and Benyou Wang. 2024b. ORLM: training large language models for optimization modeling. CoRR, abs/2405.17743.
  32. [33]Satvik Tripathi, Rithvik Sukumaran, and Tessa S Cook. 2024. Efficient healthcare with large language models: optimizing clinical workflow and enhancing patient care. Journal of the American Medical Informatics Association, 31(6):1436–1440.DOI
  33. [34]Teng Wang, Wing-Yin Yu, Ruifeng She, Wenhan Yang, Taijie Chen, and Jianping Zhang. 2024. Leveraging large language models for solving rare MIP challenges. CoRR, abs/2409.04464.arxiv.org/abs/2409.04464
  34. [35]Zihan Wang, Rui Pan, Jiarui Yao, Robert Csordas, Linjie Li, Lu Yin, Jiajun Wu, Tong Zhang, Manling Li, and Shiwei Liu. 2025. Chain-of-experts: Unlocking the communication power of mixture-of-experts models. CoRR, abs/2506.18945.arxiv.org/abs/2506.18945
  35. [36]Yang Wu, Yifan Zhang, Yurong Wu, Yuran Wang, Junkai Zhang, and Jian Cheng. 2025. Evo-step: Evolutionary generation and stepwise validation for optimizing llms in or.
  36. [37]Ziyang Xiao, Dongxiang Zhang, Xiongwei Han, Xiaojin Fu, Wing Yin Yu, Tao Zhong, Sai Wu, Yuan Wang, Jianwei Yin, and Gang Chen. 2024. Enhancing LLM reasoning via vision-augmented prompting. In Advances in Neural Information Processing Systems 38: Annual Conference on Neural Information Processing Systems 2024, NeurIPS 2024, Vancouver, BC, Canada, December 10 - 15, 2024.
  37. [38]Beinuo Yang, Qishen Zhou, Junyi Li, Chenxing Su, Panagiotis Angeloudis, and Simon Hu. 2026. Orthought: Benchmarking and automating logistics optimization modeling via structured llm reasonings. Artificial Intelligence for Transportation, 6:100059.DOI
  38. [39]Zhicheng Yang, Yiwei Wang, Yinya Huang, Zhijiang Guo, Wei Shi, Xiongwei Han, Liang Feng, Linqi Song, Xiaodan Liang, and Jing Tang. 2025a. Optibench meets resocratic: Measure and improve llms for optimization modeling. In The Thirteenth International Conference on Learning Representations, ICLR 2025, Singapore, April 24-28, 2025. OpenReview.net.arxiv.org/abs/2407.09887
  39. [40]Zhicheng Yang, Yiwei Wang, Yinya Huang, Zhijiang Guo, Wei Shi, Xiongwei Han, Liang Feng, Linqi Song, Xiaodan Liang, and Jing Tang. 2025b. Optibench meets resocratic: Measure and improve llms for optimization modeling. In The Thirteenth International Conference on Learning Representations, ICLR 2025, Singapore, April 24-28, 2025. OpenReview.net.arxiv.org/abs/2407.09887
  40. [41]Shunyu Yao, Dian Yu, Jeffrey Zhao, Izhak Shafran, Tom Griffiths, Yuan Cao, and Karthik Narasimhan. 2023. Tree of thoughts: Deliberate problem solving with large language models. In Advances in Neural Information Processing Systems 36: Annual Conference on Neural Information Processing Systems 2023, NeurIPS 2023, New Orleans, LA, USA, December 10 - 16, 2023.arxiv.org/abs/2305.10601
  41. [42]Xinyu Zhang, Boxuan Zhang, Yuchen Wan, Lingling Zhang, YiXing Yao, Bifan Wei, Yaqiang Wu, and Jun Liu. 2026. Optiverse: A comprehensive benchmark towards optimization problem solving. CoRR, abs/2604.21510.arxiv.org/abs/2604.21510

Paper details

vlnc:W_amcr7nrz
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 0

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

Not recorded for this paper

View statement
Looking for related papers…
Contents