LLM Agent for Production Planning Using Natural-Language Optimisation Modelling

Production planners describe their problems in words, but solvers need a mathematical model. This project runs a small open language model (qwen2.5:0.5b, about 0.5 billion parameters) locally on the CPU through Ollama and lets it translate a planning question into a linear or integer programme in JSON, which is built with PuLP and solved with HiGHS. An agent loop checks every model (format, solver status, all-zero optimum, invented numbers, limits of the text not used, relation and objective sense against the wording) and asks the model to repair it. Nine configurations - a rule-based template parser, the model answering the number directly, zero-shot, few-shot with retrieved examples, the agent and two ablations - are measured honestly on the public NL4OPT and IndustryOR benchmarks with published optimal values. A web application shows the model, the plan, the binding constraints and their shadow prices, lets the planner edit the model and review plans, on five databases. A MATLAB version is included.

Category: Industrial Engineering

Industrial Engineering Project IE10 from ProTechSC Academy, with graphical abstract, video demonstration and project guidance.