Mathematical optimization drives decisions in supply chains, logistics, energy, and scheduling, but translating natural-language problems into solver-executable formulations remains a bottleneck. While frontier models show promise for this task, many deployments require small language models (SLMs) that run locally under privacy, latency, and cost constraints. Existing SLMs are limited by noisy data, ambiguous benchmarks, and one-shot inference that ignores the iterative, feedback-driven nature of optimization modeling. To address these challenges, we introduce OptiMind, a system that combines data cleaning and class-specific hints with training using solver feedback. OptiMind distills recurring formulation errors into class-specific hints that guide the repair of ambiguous problems and the regeneration of solution trajectories. This process provides reliable training data, which is then used for multi-turn RL to teach models to revise their formulations in response to solver feedback. At inference time, the same hint library guides further refinement as models revise their solutions over successive turns. To support reliable evaluation, we clean three challenging benchmarks from the literature. On these cleaned benchmarks, our 20B OptiMind-RL model outperforms strong open-source baselines and reaches frontier-model performance under the same protocol. The full hint library, cleaned test data, cleaning logs, and evaluation code are publicly available on Github (https://github.com/microsoft/OptiGuide/tree/main/optimind), and our trained OptiMind-RL model is available on Hugging Face (https://huggingface.co/microsoft/OptiMind-RL).
翻译:暂无翻译