arXiv:2601.00874cs.LGcs.AI2026-01

用自然语言让大模型做优化,轻松处理复杂约束问题。

LLMize: A Framework for Large Language Model-Based Numerical Optimization

  • 通过迭代提示和上下文学习,将优化问题转化为自然语言生成与反馈循环。
  • 在旅行商问题和核燃料格栅优化中表现良好,优于传统方法在复杂场景下的适应性。
  • 无需数学编程知识,直接用自然语言描述规则和约束,适合领域专家使用。

大语言模型(LLMs)近期展现出超越传统语言任务的推理能力,推动其在数值优化中的应用。本文提出 LLMize,一个开源的 Python 框架,通过迭代提示和上下文学习实现基于 LLM 的优化。该框架将优化视为黑箱过程:候选解以自然语言生成,由外部目标函数评估,并通过解-得分反馈迭代优化。支持多种策略,包括基于提示的优化(OPRO)及受进化算法和模拟退火启发的混合方法。核心优势在于可直接通过自然语言注入约束、规则和领域知识,使从业者无需掌握数学规划或元启发式设计即可定义复杂优化问题。在凸优化、线性规划、旅行商问题、神经网络超参数调优及核燃料格栅优化中进行评估。结果表明,尽管在简单问题上不如经典求解器,但在约束难以形式化的复杂领域任务中提供了实用且易用的解决方案。

原文摘要 · Abstract (English)

Large language models (LLMs) have recently shown strong reasoning capabilities beyond traditional language tasks, motivating their use for numerical optimization. This paper presents LLMize, an open-source Python framework that enables LLM-driven optimization through iterative prompting and in-context learning. LLMize formulates optimization as a black-box process in which candidate solutions are generated in natural language, evaluated by an external objective function, and refined over successive iterations using solution-score feedback. The framework supports multiple optimization strategies, including Optimization by Prompting (OPRO) and hybrid LLM-based methods inspired by evolutionary algorithms and simulated annealing. A key advantage of LLMize is the ability to inject constraints, rules, and domain knowledge directly through natural language descriptions, allowing practitioners to define complex optimization problems without requiring expertise in mathematical programming or metaheuristic design. LLMize is evaluated on convex optimization, linear programming, the Traveling Salesman Problem, neural network hyperparameter tuning, and nuclear fuel lattice optimization. Results show that while LLM-based optimization is not competitive with classical solvers for simple problems, it provides a practical and accessible approach for complex, domain-specific tasks where constraints and heuristics are difficult to formalize.

大模型优化自然语言约束求解智能优化

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。