Complex Optimization Modeling via Multiagent Fine-Tuning and Skill-Augmented Reasoning
Abstract
Optimization modeling (OM) is fundamental to address Operations Research (OR) problems, yet it requires specialized domain expertise. Large language models (LLMs) are promising for automating OM from natural language descriptions. Through prompting and fine-tuning, LLMs have made significant progress on easy problems, but they still struggle with complex problems involving combinatorial constraint logic and obscure decision variables. To provide a precise formulation for industry OR problems, this paper proposes a multiagent system (MAS) workflow, which decomposes the entire OM process into six structured sub-tasks: set identification, parameter abstraction, variable definition, objective formulation, constraint derivation, and solver-code generation. Existing OM benchmarks only provide a sparse judgment of the final formulation, without process rewards for intermediate agents. Therefore, the main challenge of MAS-based OM is how to fine-tune intermediate agents with OM domain knowledge. This paper proposes a sample efficient counterfactual-based credit assignment for the MAS trajectory. The augmented intermediate credit can be directly used to fine-tune each agent. Moreover, we construct an Optimization Skill Library (Opt-Skill) that provides agent-specific procedural guidance for skill-augmented reasoning, self-checking, and error correction during inference. Experimental results show that, compared with existing methods and frontier LLMs, the proposed MAS workflow achieves state-of-the-art average accuracy while maintaining strong performance on both easy and complex optimization modeling tasks. Altogether, we believe that MAS represents a concrete step forward in performing complex OM in industry scenarios.