Table of Contents
Fetching ...

OptiMUS-0.3: Using Large Language Models to Model and Solve Optimization Problems at Scale

Ali AhmadiTeshnizi, Wenzhi Gao, Herman Brunborg, Shayan Talaei, Connor Lawless, Madeleine Udell

TL;DR

OptiMUS-0.3 presents a modular, LLM-driven framework to automatically model and solve MILPs from natural language, addressing key challenges of long problem descriptions, data scale, and correctness. It introduces NLP4LP, a 355-problem dataset with rich intermediates and a public web app for human-in-the-loop refinement, and demonstrates state-of-the-art performance gains over baselines on easy and hard optimization tasks. The system combines a structured state graph, reflective error correction, confidence-based feedback, and specialized modules to detect problem structure and enable advanced solver interactions, achieving robust accuracy with reasonable runtime. Collectively, the work advances automated optimization modeling and highlights future directions for reliability, trust, ambiguity handling, and multi-language support in AI-assisted optimization."

Abstract

Optimization problems are pervasive in sectors from manufacturing and distribution to healthcare. However, most such problems are still solved heuristically by hand rather than optimally by state-of-the-art solvers because the expertise required to formulate and solve these problems limits the widespread adoption of optimization tools and techniques. We introduce a Large Language Model (LLM)-based system designed to formulate and solve (mixed integer) linear programming problems from their natural language descriptions. Our system is capable of developing mathematical models, writing and debugging solver code, evaluating the generated solutions, and improving efficiency and correctness of its model and code based on these evaluations. OptiMUS-0.3 utilizes a modular structure to process problems, allowing it to handle problems with long descriptions and complex data without long prompts. Experiments demonstrate that OptiMUS-0.3 outperforms existing state-of-the-art methods on easy datasets by more than 22% and on hard datasets (including a new dataset, NLP4LP, released with this paper that features long and complex problems) by more than 24%.

OptiMUS-0.3: Using Large Language Models to Model and Solve Optimization Problems at Scale

TL;DR

OptiMUS-0.3 presents a modular, LLM-driven framework to automatically model and solve MILPs from natural language, addressing key challenges of long problem descriptions, data scale, and correctness. It introduces NLP4LP, a 355-problem dataset with rich intermediates and a public web app for human-in-the-loop refinement, and demonstrates state-of-the-art performance gains over baselines on easy and hard optimization tasks. The system combines a structured state graph, reflective error correction, confidence-based feedback, and specialized modules to detect problem structure and enable advanced solver interactions, achieving robust accuracy with reasonable runtime. Collectively, the work advances automated optimization modeling and highlights future directions for reliability, trust, ambiguity handling, and multi-language support in AI-assisted optimization."

Abstract

Optimization problems are pervasive in sectors from manufacturing and distribution to healthcare. However, most such problems are still solved heuristically by hand rather than optimally by state-of-the-art solvers because the expertise required to formulate and solve these problems limits the widespread adoption of optimization tools and techniques. We introduce a Large Language Model (LLM)-based system designed to formulate and solve (mixed integer) linear programming problems from their natural language descriptions. Our system is capable of developing mathematical models, writing and debugging solver code, evaluating the generated solutions, and improving efficiency and correctness of its model and code based on these evaluations. OptiMUS-0.3 utilizes a modular structure to process problems, allowing it to handle problems with long descriptions and complex data without long prompts. Experiments demonstrate that OptiMUS-0.3 outperforms existing state-of-the-art methods on easy datasets by more than 22% and on hard datasets (including a new dataset, NLP4LP, released with this paper that features long and complex problems) by more than 24%.
Paper Structure (37 sections, 8 equations, 28 figures, 5 tables)

This paper contains 37 sections, 8 equations, 28 figures, 5 tables.

Figures (28)

  • Figure 1: Optimus uses a sequential process with error correction (green circles) to model and solve optimization problems. It extracts the parameters and clauses, formulates them, generates the code for each, and finally synthesizes complete code and runs it. If the code raises an error, Optimus uses an iterative debugging loop to fix the code. Red boxes provide sample outputs of each step of the pipeline. Blue boxes indicate LLM-based components, and yellow boxes indicate deterministic components.
  • Figure 2: A completed state for a factory production optimization problem
  • Figure 3: OptiMUS-0.3 can fix its constraint modeling errors when prompted "Are units the same for both sides of $C$?"
  • Figure 4: GPT-4o can provide feedback when Llama-3-70B lacks the confidence to identify a constraint.
  • Figure 5: Impact of Structure Detection on OptiMUS Performance. (Left) Speedup of solving a facility location optimization problem with indicator variables with the structure identified to the solver (indicator) versus with OptiMUS modeling of indicator variable. (Right) Speedup of solving a flight assignment problem with SOS-constraints with the structure identified to the solver (SOS) versus with OptiMUS modeling of the SOS constraints. Full details of problem instances are included in Appendix \ref{['app:structure_detection']}.
  • ...and 23 more figures