- The paper introduces an archetype-centric framework for learning generalizable optimization skills through cluster-based distillation that shifts from case-level experience.
- It employs a three-phase pipeline including skill discovery via DBSCAN clustering, incremental skill learning, and test-time application to drive robust performance on both in-distribution and OOD benchmarks.
- Experimental results demonstrate improved accuracy (up to 68.27% micro Pass@1) and enhanced retrieval performance, underscoring its potential for scalable industrial and research applications.
OptSkills: Archetype-Centric Skill Distillation for Robust Optimization Modeling and Solving
Motivation and Problem Setting
Automated formulation and solution of optimization problems from natural language using LLMs has become a strategic direction for industrial and academic operations research. Despite progress in prompt engineering, few-shot example retrieval, and agent-based modular workflows, prevailing systems remain fragile to narrative variation and exhibit limited generalization—primarily reusing experience at the case level. This leads to sensitivity to textual surface forms and constrained adaptation to unseen or emergent optimization archetypes. OptSkills, introduced in "OptSkills: Learning Generalizable Optimization Skills from Problem Archetypes via Cluster-Based Distillation" (2605.29829), directly addresses these limitations by shifting experience organization and skill distillation from the case-centric to the archetype-centric paradigm.
Archetype-Based Problem Representation
OptSkills operationalizes the concept of an optimization problem archetype as the canonical structural signature abstracted from varying scenario-specific narratives. For each problem, an extractor decomposes the natural language into ingredients (variables, constraints, objective) and edits the description into a scenario-agnostic version, removing entity references while preserving mathematical fidelity. These processed artifacts are then fused into archetype embeddings—weighted combinations of keyword and edited text embeddings. Empirical analysis demonstrates dramatic improvements in clustering properties and nearest-neighbor retrieval: archetype embeddings produce tight intra-class groupings and mitigate inter-class overlap in the embedding space, increasing clusterability and supporting more principled retrieval of reusable workflows.



Figure 1: t-SNE projections showing superior archetype clusterability; Hit@1 and MAP@5 validate retrieval performance improvements.
OptSkills Framework and Skill Distillation Pipeline
OptSkills is articulated in three phases:
- Phase I: Skill Discovery via Cluster-Based Distillation Problems are embedded as archetype representations and clustered using DBSCAN. Solution trajectories from solver portfolio rollouts (multiple modeling paradigms and solver configurations) are differentiated into positive/negative solutions. A skill analyst distills standard operating procedures and pitfall summaries for each trajectory. Cluster-level aggregation yields reusable skills comprising metadata, workflow steps, and error patterns. This process mitigates redundancy and forms structural skills less dependent on instance artifacts.
- Phase II: Incremental Skill Learning On new problems, an LLM-based selector routes to skill refinement or skill expansion—either updating existing skills using trajectory evidence, or adding new skills for uncovered archetypes contingent on successful solutions.
- Phase III: Test-Time Skill Application
At inference, the agent retrieves archetype-relevant skills to guide modeling and code generation, with no further updates permitted during evaluation.
Figure 2: Overview of the OptSkills pipeline: archetype extraction, clustering, trajectory-based distillation, and adaptive skill library expansion.
Datasets and Experimental Protocol
OptSkills is trained and evaluated on multiple benchmarks encompassing varied optimization types and real-world scenarios, including OptiBench, OptMATH-Bench, Mamo.C, IndustryOR, ComplexOR, and high-dimensional MIPLIB-NL. For out-of-distribution adaptation, the system learns new skills on Nano-CO—a synthetic dataset with combinatorial variation and thematic rewriting—and is then evaluated on NLCO, a challenging combinatorial OOD benchmark.
Figure 3: Taxonomy of synthetic combinatorial optimization tasks in Nano-CO supporting broad archetype coverage.
Figure 4: NLCO task-category coverage by Nano-CO, demonstrating substantial but incomplete overlap.
Numerical Results and Ablation Analysis
OptSkills achieves a micro-averaged Pass@1 accuracy of 68.27%, outperforming the strongest baseline Trace2Skill by 4.81%. On MIPLIB-NL, a large-scale benchmark, OptSkills reaches 26.91% accuracy—improving over DeepSeek-V3.2-Thinking by 4.53%. Skill learning on Nano-CO allows OptSkills to attain 72.79% accuracy on NLCO Set-L, indicating robust OOD transfer.
Ablation shows cluster-based skill distillation significantly enhances library quality, reducing unused skills and facilitating archetype-level generalization. Growth dynamics of the skill library exhibit a scaling law, with accuracy non-monotonically increasing as skills are added. Excessive fragmentation or merging in clustering impacts retrieval and applicability boundaries, motivating further research into adaptive cluster pruning.

Figure 5: Skill coverage by family reveals comprehensive archetype representation in OptMATH-Train and expansion post Nano-CO learning.
Figure 6: Scaling law for solving accuracy on OptiBench correlating with skill library size.
Skill Utilization Patterns and Adaptivity
Analysis on NLCO demonstrates successful samples leverage newly learned skills at much higher rates compared to failed instances, confirming the relevance and necessity of library expansion for OOD scenarios. Pie charts stratifying skill usage between successful and unsuccessful samples illustrate the practical impact of skill adaptivity.

Figure 7: Skill utilization in successful NLCO samples biased toward newly acquired skills.
Practical and Theoretical Implications
OptSkills reframes the skill acquisition and reuse problem through the lens of structural archetype clustering, enabling robust generalization across diverse surface narratives and adaptation to unseen optimization types. By leveraging trajectory-informed distillation and incremental learning, the agent system achieves reliable performance on both textbook and industrial-scale benchmarks—including cases with up to 87,482 decision variables. These results suggest that archetype-centric frameworks can scale to heterogeneous, real-world optimization demands and enhance the reliability of autonomous modeling agents.
Theoretical implications center on bridging narrative variability and structural invariance in automated optimization, with cluster-based distillation serving as a practical method for abstraction and reuse. Practically, OptSkills holds promise for deployment in domains where rapid adaptation to emergent optimization problems is required, reducing dependence on handcrafted instance-level workflows.
Future Directions
Key unresolved challenges include robust verification of extracted archetype representations—errors in ingredient extraction or problem editing may propagate through the system. Cluster granularity must be balanced to avoid over-fragmented or ambiguous skill libraries; adaptive clustering and skill pruning mechanisms are a critical avenue for subsequent research. Improved symbolic consistency checks and systematic cross-domain adaptation protocols may further stabilize skill reuse.
Conclusion
OptSkills establishes an archetype-centric paradigm for experience distillation and skill acquisition in LLM-based optimization modeling and solving. Through clustering, incremental learning, and structurally invariant skill workflows, the system substantially improves generalization and adaptability over case-level and trajectory-level baselines. The framework opens the path toward scalable, reliable autonomous optimization agents equipped for both in-distribution and out-of-distribution challenges.