TL;DR
OptSkills is a novel agent framework that enables Large Language Models (LLMs) to solve complex optimization problems by abstracting them into structural "archetypes" rather than relying on surface-level text descriptions. By clustering problems by their mathematical essence and distilling successful solving trajectories into reusable, workflow-level skills, OptSkills achieves state-of-the-art performance and generalizes exceptionally well to unseen, large-scale industrial problems.
What Problem Does This Paper Address?
Using LLMs to automatically translate natural language descriptions into mathematical models and executable solver code is a powerful paradigm shift for operations research. However, current LLM-based optimization agents suffer from a major flaw: brittle generalization.
Existing methods typically reuse past experiences at a rigid, case-by-case level. As a result, they are highly sensitive to superficial narrative variations (e.g., framing the exact same mathematical problem as a logistics schedule versus a holiday package delivery). Furthermore, they struggle to adapt when faced with out-of-distribution (OOD) shifts or entirely new problem types. This paper addresses the need for a robust, generalized experience-reuse framework that operates at the structural workflow level rather than the narrative surface level.
Methods
The authors introduce OPTSKILLS, an archetype-centric skill learning and reasoning agent system that operates in three distinct phases:
- Phase I: Skill Discovery via Cluster-Based Distillation
- Archetype Representation: The system uses an LLM to strip away scenario-specific stories, extracting abstract optimization "ingredients" (variables, constraints, objectives) and creating a scenario-neutral "edited problem." It then computes an archetype embedding combining both elements.
- Clustering & Rollout: Using DBSCAN, the system clusters problems based on these structural embeddings. It then rolls out a portfolio of solvers to generate solution trajectories, analyzing successes into Standard Operating Procedures (SOPs) and failures into common pitfalls.
- Skill Distillation: These trajectories are distilled into cluster-level, reusable workflow documents (skills).
- Phase II: Skill Learning
- When a new problem arrives, a skill selector determines if an existing skill fits. If yes, the skill is executed and updated based on the new trajectory (Skill Refinement). If no matching skill is found, the problem is treated as a new archetype to expand the library (Skill Expansion).
- Phase III: Test Evaluation
- During inference, the system retrieves the most relevant skill from the learned library to guide the LLM agent step-by-step through modeling and solving.
Datasets
The framework was trained and evaluated using several diverse datasets:
- OptMATH-Train: A candidate pool used to sample 300 instances spanning Linear Programming (LP), Mixed-Integer Linear Programming (MILP), Integer Programming (IP), Non-Linear Programming (NLP), and Second-Order Cone Programming (SOCP).
- NANO-CO: A self-constructed synthetic dataset consisting of 245 combinatorial optimization instances across 49 distinct problem types, used specifically for OOD skill learning.
- Evaluation Benchmarks: Five standard benchmarks were used for core evaluation: OptiBench, OptMATH-Bench, Mamo.C, IndustryOR, and ComplexOR.
- OOD & Large-Scale Benchmarks: The hard split of the NLCO Benchmark (2,150 test samples) was used for OOD evaluation, and MIPLIB-NL (223 real-world industrial instances) was used to test high-dimensional scalability.
Key Insights and Ideas
- Narratives are Deceptive, Structures are Stable: Clustering raw problem text leads to messy, overlapping representations because the LLM gets distracted by the storyline. In contrast, clustering based on extracted optimization ingredients yields clean, well-separated structural groups.
- Mitigating Redundancy: By distilling skills at the cluster level rather than the per-sample level, OptSkills dramatically reduces library redundancy. In testing, the non-clustered baseline left 62.8% of its skills completely untouched, whereas OptSkills reduced unused skills to just 15.2%, making skill retrieval far more efficient and accurate.
- Dynamic Adaptation: The inclusion of a continuous learning phase (refinement and expansion) allows the agent to dynamically adapt to distribution shifts, effectively transferring procedural knowledge to entirely new problem categories.
Key Results
- State-of-the-Art Accuracy: OptSkills achieved a micro-averaged pass@1 accuracy of 68.27% across the five core benchmarks, outperforming the strongest skill-based baseline, Trace2Skill (63.46%).
- Industrial Scalability: On the highly challenging, large-scale MIPLIB-NL benchmark, OptSkills achieved 26.91% accuracy, outperforming DeepSeek-V3.2-Thinking by 4.53%. It successfully solved industrial instances featuring up to 87,482 decision variables.
- OOD Generalization: After performing skill learning on the synthetic NANO-CO dataset, the agent boosted its performance on the OOD NLCO benchmark to 72.79% accuracy, demonstrating significant cross-domain transferability.
Limitations and Future Work
Despite its strong performance, the authors note a few key limitations:
- Error Propagation: OptSkills relies heavily on the initial LLM-generated abstractions (ingredients and edited text). If the LLM misses a critical constraint during this phase, the error propagates downstream into clustering and skill selection. Incorporating symbolic consistency checks is a suggested fix.
- Clustering Sensitivity: The quality of the skill library is highly dependent on DBSCAN hyperparameter tuning. Over-fragmented or over-merged clusters can lead to redundant or ambiguous skills. Developing adaptive clustering and skill-pruning mechanisms remains an open challenge.
- Inference Cost: The system incurs a higher computational token overhead during inference due to its multi-round tool interactions and skill routing mechanisms. Optimizing test-time efficiency is a primary target for future iterations.
Summary updated