PEARL: Solver-in-the-Loop Interactive Optimization Modeling from Natural Language
06:00 · July 22, 2026 · arXiv cs.AI RSS

Optimization modeling is the process of translating real-world decision problems, often described in natural language, into formal mathematical formulations and executable solver code. While recent advances in large language models have shown promise in automating this process, most existing approaches remain one-shot: a model produces a formulation once, without executing it, conditioning on solver feedback, or iteratively revising errors. This stands in sharp contrast to real-world optimization modeling, which is inherently interactive and proceeds through repeated solve-debug-revise cycles. We introduce PEARL, a system for interactive optimization modeling that uses Python execution and mathematical programming solvers inside this loop. Rather than relying on a fixed repair workflow, PEARL learns when to test partial models, how to revise from solver diagnostics, and when to stop. It operates in a multi-turn tool-integrated setting where intermediate execution results, feasibility signals, and solution checks are used to improve both formulations and solver code before finalization. Across diverse optimization benchmarks, PEARL substantially improves verified solve rates over strong one-shot and tool-augmented baselines; notably, our PEARL-Qwen3-\textbf{4B} model outperforms the much larger DeepSeek-V3.2-\textbf{685B} in both macro- and micro-averaged accuracy on optimization modeling tasks.
Summary
Optimization modeling converts real-world decision problems described in natural language into formal mathematical programs and executable solver code. Traditional large-language-model approaches treat this as a one-shot generation task, producing a candidate formulation without running it or incorporating feedback from execution. In practice, modeling proceeds through repeated cycles of solving, inspecting diagnostics, and revising both the mathematical model and its implementation.
PEARL embeds Python execution and mathematical programming solvers directly into the generation loop. The system learns to decide when to test partial models, how to interpret solver output such as infeasibility or unboundedness signals, and when further revision is unlikely to improve the result. Intermediate execution traces, feasibility checks, and solution validation are used to refine both the symbolic formulation and the concrete code across multiple turns.
Evaluations on diverse optimization benchmarks show that this solver-in-the-loop approach raises verified solve rates above strong one-shot and tool-augmented baselines. A 4-billion-parameter model trained with PEARL exceeds the macro- and micro-averaged accuracy of the 685-billion-parameter DeepSeek-V3.2 model, indicating that iterative interaction with solvers can compensate for reduced model scale.
Why it matters
This research is highly relevant for Dutch AI researchers and operations research practitioners, given the Netherlands' strong logistics, agriculture, and finance sectors that rely heavily on optimization. The solver-in-the-loop approach offers a more reliable and transparent method for deploying LLMs in complex decision-making processes, aligning with EU/Dutch goals for trustworthy AI.




