Table of Contents
Fetching ...

LLM for Large-Scale Optimization Model Auto-Formulation: A Lightweight Few-Shot Learning Approach

Kuo Liang, Yuhang Lu, Jianming Mao, Shuyi Sun, Chunwei Yang, Congcong Zeng, Xiao Jin, Hanzhang Qin, Ruihao Zhu, Chung-Piaw Teo

TL;DR

The paper tackles the challenge of automating large-scale optimization model auto-formulation from natural-language problem descriptions and datasets. It introduces LEAN-LLM-OPT, a lightweight three-LLM agent framework that uses agentic workflows to decompose complex modeling tasks, while offloading data handling to specialized tools. The authors curate Ref-Data and Large-Scale-OR benchmarks and validate their approach on numerical simulations and a Singapore Airlines revenue-management case using Air-NRM data, showing competitive performance against state-of-the-art baselines without task-specific fine-tuning. Key findings include the effectiveness of type-tailored workflows, the value of data-handling tools, and robust performance across diverse problem classes and large-scale inputs, highlighting practical applicability for automated optimization in modern business settings.

Abstract

Large-scale optimization is a key backbone of modern business decision-making. However, building these models is often labor-intensive and time-consuming. We address this by proposing LEAN-LLM-OPT, a LightwEight AgeNtic workflow construction framework for LLM-assisted large-scale OPTimization auto-formulation. LEAN-LLM-OPT takes as input a problem description together with associated datasets and orchestrates a team of LLM agents to produce an optimization formulation. Specifically, upon receiving a query, two upstream LLM agents dynamically construct a workflow that specifies, step-by-step, how optimization models for similar problems can be formulated. A downstream LLM agent then follows this workflow to generate the final output. Leveraging LLMs' text-processing capabilities and common modeling practices, the workflow decomposes the modeling task into a sequence of structured sub-tasks and offloads mechanical data-handling operations to auxiliary tools. This design alleviates the downstream agent's burden related to planning and data handling, allowing it to focus on the most challenging components that cannot be readily standardized. Extensive simulations show that LEAN-LLM-OPT, instantiated with GPT-4.1 and the open source gpt-oss-20B, achieves strong performance on large-scale optimization modeling tasks and is competitive with state-of-the-art approaches. In addition, in a Singapore Airlines choice-based revenue management use case, LEAN-LLM-OPT demonstrates practical value by achieving leading performance across a range of scenarios. Along the way, we introduce Large-Scale-OR and Air-NRM, the first comprehensive benchmarks for large-scale optimization auto-formulation. The code and data of this work is available at https://github.com/CoraLiang01/lean-llm-opt.

LLM for Large-Scale Optimization Model Auto-Formulation: A Lightweight Few-Shot Learning Approach

TL;DR

The paper tackles the challenge of automating large-scale optimization model auto-formulation from natural-language problem descriptions and datasets. It introduces LEAN-LLM-OPT, a lightweight three-LLM agent framework that uses agentic workflows to decompose complex modeling tasks, while offloading data handling to specialized tools. The authors curate Ref-Data and Large-Scale-OR benchmarks and validate their approach on numerical simulations and a Singapore Airlines revenue-management case using Air-NRM data, showing competitive performance against state-of-the-art baselines without task-specific fine-tuning. Key findings include the effectiveness of type-tailored workflows, the value of data-handling tools, and robust performance across diverse problem classes and large-scale inputs, highlighting practical applicability for automated optimization in modern business settings.

Abstract

Large-scale optimization is a key backbone of modern business decision-making. However, building these models is often labor-intensive and time-consuming. We address this by proposing LEAN-LLM-OPT, a LightwEight AgeNtic workflow construction framework for LLM-assisted large-scale OPTimization auto-formulation. LEAN-LLM-OPT takes as input a problem description together with associated datasets and orchestrates a team of LLM agents to produce an optimization formulation. Specifically, upon receiving a query, two upstream LLM agents dynamically construct a workflow that specifies, step-by-step, how optimization models for similar problems can be formulated. A downstream LLM agent then follows this workflow to generate the final output. Leveraging LLMs' text-processing capabilities and common modeling practices, the workflow decomposes the modeling task into a sequence of structured sub-tasks and offloads mechanical data-handling operations to auxiliary tools. This design alleviates the downstream agent's burden related to planning and data handling, allowing it to focus on the most challenging components that cannot be readily standardized. Extensive simulations show that LEAN-LLM-OPT, instantiated with GPT-4.1 and the open source gpt-oss-20B, achieves strong performance on large-scale optimization modeling tasks and is competitive with state-of-the-art approaches. In addition, in a Singapore Airlines choice-based revenue management use case, LEAN-LLM-OPT demonstrates practical value by achieving leading performance across a range of scenarios. Along the way, we introduce Large-Scale-OR and Air-NRM, the first comprehensive benchmarks for large-scale optimization auto-formulation. The code and data of this work is available at https://github.com/CoraLiang01/lean-llm-opt.
Paper Structure (31 sections, 12 equations, 9 figures, 14 tables)

This paper contains 31 sections, 12 equations, 9 figures, 14 tables.

Figures (9)

  • Figure 2: Statistics of Large-Scale-OR (all problem instances are large-scale)
  • Figure 3: LEAN-LLM-OPT flow-diagram
  • Figure 4: Modeling accuracy vs. input size
  • Figure 5: Modeling accuracy vs. output size
  • Figure 6: Flight routes & the recommended flights from SBLP generated by LEAN-LLM-OPT
  • ...and 4 more figures

Theorems & Definitions (2)

  • Remark 1: The Benefit of Classification and Advantages of Reasoning
  • Remark 2: Code Generation