Large Language Model-Based Automatic Formulation for Stochastic Optimization Models
This work addresses the challenge of automating model formulation in stochastic optimization, which could benefit researchers and practitioners by enabling language-driven modeling pipelines, though it appears incremental as it builds on existing LLM capabilities.
This paper tackles the problem of automatically formulating stochastic optimization models from natural language descriptions using large language models (LLMs), specifically ChatGPT, and finds that GPT-4-Turbo outperforms other models in partial score, variable matching, and objective accuracy with effective prompting strategies.
This paper presents the first integrated systematic study on the performance of large language models (LLMs), specifically ChatGPT, to automatically formulate and solve stochastic optimiza- tion problems from natural language descriptions. Focusing on three key categories, joint chance- constrained models, individual chance-constrained models, and two-stage stochastic linear programs (SLP-2), we design several prompts that guide ChatGPT through structured tasks using chain-of- thought and modular reasoning. We introduce a novel soft scoring metric that evaluates the struc- tural quality and partial correctness of generated models, addressing the limitations of canonical and execution-based accuracy. Across a diverse set of stochastic problems, GPT-4-Turbo outperforms other models in partial score, variable matching, and objective accuracy, with cot_s_instructions and agentic emerging as the most effective prompting strategies. Our findings reveal that with well-engineered prompts and multi-agent collaboration, LLMs can facilitate specially stochastic formulations, paving the way for intelligent, language-driven modeling pipelines in stochastic opti- mization.