OptiMUS: Scalable Optimization Modeling with (MI)LP Solvers and Large Language Models

Ali AhmadiTeshnizi, Wenzhi Gao, Madeleine Udell
2/12/2026

No official code found. Best implementation: teshnizi/OptiMUS (290 stars, MIT, last commit 2025-11-04).

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. This paper introduces OptiMUS, a Large Language Model (LLM)-based agent designed to formulate and solve (mixed integer) linear programming problems from their natural language descriptions. OptiMUS can develop mathematical models, write and debug solver code, evaluate the generated solutions, and improve its model and code based on these evaluations. OptiMUS 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 outperforms existing state-of-the-art methods on easy datasets by more than $20\%$ and on hard datasets (including a new dataset, NLP4LP, released with this paper that features long and complex problems) by more than $30\%$.

View on arXivView PDF

Code Implementations(1)

teshnizi/OptiMUSCommunity100%
MIT

Optimization Modeling Using mip Solvers and large language models

29051Python, Jupyter NotebookOct 5, 202311 months agoMIT

Similar Papers

Cite this paper

@article{ahmaditeshnizi2026optimus,
  title  = {OptiMUS: Scalable Optimization Modeling with (MI)LP Solvers and Large Language Models},
  author = {Ali AhmadiTeshnizi and Wenzhi Gao and Madeleine Udell},
  year   = {2026},
  eprint = {2402.10172},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2402.10172},
  journal = {ICML 2024 2024}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2402.10172.svg)](https://codeofpaper.com/paper/2402.10172)

Discussion