cs.LGSep 30, 2026

Right Answers, Costly Models: The Efficiency Gap in LLM-based Optimization Modeling

Authors: Zhong Li, Xin Huang, Jinhui Wan, Xiangyi Wang, Shenkai Zhang, Ruiqi Chen, Wenyu Liu, Zaiwen Wen, +1 more

Organizations: Great Bay University · Beijing Jiaotong University · Beihang University · Peking University

Abstract

Optimization modeling formulates real-world decision problems as mathematical programs that solvers can use to find optimal decisions. Large language models (LLMs) can automate this process, but the resulting correct formulations can require substantial time and memory to construct and solve, limiting practical scalability. Therefore, we systematically investigate whether LLMs can identify problem structure from natural-language descriptions and apply suitable optimization modeling techniques to generate mathematical models and solver code that solve the problems correctly and efficiently. To this end, we first curate OptTips, a knowledge base of 50 expert modeling techniques in eight families. Using this knowledge, we develop OptDachshund, a multi-agent framework that transforms problems from existing optimization benchmarks into new tasks for evaluating LLMs' use of modeling techniques. It constructs conventional and expert mathematical models with solver code for the same task and data, providing baselines for correctness and computational cost. The resulting EfficientOpt benchmark contains 561 expert-reviewed tasks with paired reference implementations. Evaluation of 11 representative LLMs reveals an efficiency gap on correctly solved tasks with comparable measurements: for every LLM, most generated programs take longer to solve than their expert counterparts. Within the comparable reference-size subset, 57% of programs with correct objective values and fewer variables and linear constraints have longer recorded solver times. Case studies show that different modeling techniques can achieve the same optimal value at similar recorded cost. Faster solving may not reduce execution time if the code takes longer to prepare data and build the model. LLM optimization modeling should therefore be evaluated for both correctness and computational efficiency.

Figures & tables

Appendix figures & tables23 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

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

    Jul 29, 2024Ali AhmadiTeshnizi, Wenzhi Gao, Herman Brunborg +3Optimization ModelingSolvers

  2. Opti-Agent-Bench: Benchmarking End-to-End Optimization R&D Agents on Real-World Business Problems

    Jul 12, 2026Yongchang Fu, Xinjie Huang, Chengjun Dai +3Optimization ModelingAgentic Benchmarks

  3. OR for AI That Does OR: Routing LLMs up the Escalator inside the OSCAR Framework

    Oct 1, 2026Jinzhi Bu, Haixin Tang, Huanan ZhangOptimization Modeling