cs.CLSep 29, 2026

SemOPT: Fixing Semantic Errors in LLM-based Optimization Modeling via Reward-Guided Search

Authors: Zetong Zhou, Wentao Zhang, Jingyuan Wang, Yifan Yang, Zizhuo Wang, Shixi Hu

Organizations: School of Computer Science and Engineering, Beihang University, Beijing, China · MIIT Key Laboratory of Data and Decision Intelligence, Beihang University, Beijing, China · School of Data Science, The Chinese University of Hong Kong, Shenzhen, China · Cardinal Operations Technology Co., Shanghai, China

Abstract

Operations research supports decision-making in domains such as energy, economics, and healthcare. Solving operations research problems typically begins with optimization modeling, which translates a natural-language problem description into executable solver code. LLMs offer a promising way to automate this process, but they remain prone to errors. In practice, these errors can be divided into two categories: syntactic errors refer to solver code that fails to run successfully or is judged infeasible by the solver; semantic errors refer to solver code that successfully returns an objective value but violates the intent of the original problem. Since semantic errors do not trigger runtime failures, they are difficult to detect and rectify. To address this problem, we introduce SemOPT, a semantic-guided framework for correcting LLM-based optimization models. SemOPT combines a semantic reward model that distinguishes faithful math models from plausible but incorrect ones with an adaptive correction system that applies hierarchical reward-guided search over the modeling space. Experiments on seven optimization modeling benchmarks show that SemOPT establishes a new state of the art and achieves an average 7.6% accuracy improvement over the strongest baseline on complex datasets.

Figures & tables

Appendix figures & tables14 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. Opt-Verifier: Unleashing the Power of LLMs for Optimization Modeling via Dual-Side Verification

    May 28, 2026Haoyang Liu, Jie Wang, Boxuan Niu +8Optimization ModelingOperations Research

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

    Sep 30, 2026Zhong Li, Xin Huang, Jinhui Wan +6Optimization ModelingLarge Language Model Benchmarks

  3. Strategy-Aware Optimization Modeling with Reasoning LLMs

    May 4, 2026Ruiqing Zhao, Fengzhi Li, Yuan Zuo +5Optimization ModelingFunctional Code Solvers