Opt-Verifier: Unleashing the Power of LLMs for Optimization Modeling via Dual-Side Verification
Abstract
Building mathematical optimization models is critical in operations research (OR), while it requires substantial human expertise. Recent advancements have utilized large language models (LLMs) to automate this modeling process. However, existing works often struggle to verify the correctness of the generated optimization models, without checking the rationality of the constraints and variables or the validity of solutions to the generated models. This hampers the subsequent verification and correction steps, and thus it severely hurts the modeling accuracy. To address this challenge, we propose a novel LLM-based framework with Dual-side Verification (OptiVer) from both structure and solution perspectives, thereby improving the modeling accuracy. The structure-side verification ensures that the modeling structure of the generated optimization models aligns with the original problem description, accurately capturing the problem's constraints and requirements. Meanwhile, the solution-side verification interprets and evaluates the validity of the solutions, confirming that the optimization models are logically and mathematically sound. Extensive experiments on several popular benchmarks demonstrate that our approach significantly outperforms the state-of-the-art, achieving over 20\% improvement in accuracy.
Lay Summary
Many practical decisions—such as scheduling factory work, routing deliveries, or deciding where to open warehouses—require turning a written description into a precise set of rules that a computer can use to find the best plan. AI language systems can help write these rules, but they may leave out important requirements or produce an answer that looks valid to a computer while making no sense in the real task. This paper introduces Opt-Verifier, an AI system that checks and improves such automatically written plans before they are trusted. It does this in two complementary ways: it checks whether the rules match the original description, and it checks whether the resulting answer is reasonable in the real-world setting. When it finds a missing rule or an unreasonable answer, it gives feedback and revises the plan. Tests on several standard problem collections show that this extra checking makes the AI substantially more accurate. The work suggests that future AI assistants could help people build reliable planning tools with less manual effort.