arXiv:2504.16918cs.CLcs.AI2025-04被引 28

用大模型代理自动把自然语言优化问题转成数学公式并求解

OptimAI: Optimization from Natural Language Using LLM-Powered AI Agents

  • 分三角色协作:翻译、规划、编码与纠错,实现端到端求解
  • 在两个数据集上准确率分别达88.1%和82.3%,错误率降低超50%
  • 适合无优化背景的科研人员快速建模,提升自动化水平

优化在科研与实际应用中至关重要,但将自然语言描述的问题转化为数学形式并选择合适求解器需深厚领域知识。我们提出OptimAI,一个基于大模型驱动的智能体框架,可直接处理自然语言优化问题,并在性能上超越现有最佳方法。该框架包含三个核心角色:(1) 形式化代理,将自然语言问题精准转换为数学表达;(2) 规划代理,在执行前构建高层求解策略;(3) 编码与代码评判代理,能与环境交互并根据结果反思以优化后续行为。消融实验表明,移除规划或代码评判代理分别导致生产力下降5.8倍和3.1倍。此外,引入基于UCB的调试调度机制,动态切换备选方案,带来额外3.3倍生产力提升。多智能体协同设计显著提升性能,实验显示在NLP4LP数据集上准确率达88.1%,在Optibench上达82.3%,相比之前最佳结果错误率分别降低58%和52%。

原文摘要 · Abstract (English)

Optimization plays a vital role in scientific research and practical applications. However, formulating a concrete optimization problem described in natural language into a mathematical form and selecting a suitable solver to solve the problem requires substantial domain expertise. We introduce OptimAI, a framework for solving Optimization problems described in natural language by leveraging LLM-powered AI agents, and achieve superior performance over current state-of-the-art methods. Our framework is built upon the following key roles: (1) a formulator that translates natural language problem descriptions into precise mathematical formulations; (2) a planner that constructs a high-level solution strategy prior to execution; and (3) a coder and a code critic capable of interacting with the environment and reflecting on outcomes to refine future actions. Ablation studies confirm that all roles are essential; removing the planner or code critic results in $5.8\times$ and $3.1\times$ drops in productivity, respectively. Furthermore, we introduce UCB-based debug scheduling to dynamically switch between alternative plans, yielding an additional $3.3\times$ productivity gain. Our design emphasizes multi-agent collaboration, and our experiments confirm that combining diverse models leads to performance gains. Our approach attains 88.1% accuracy on the NLP4LP dataset and 82.3% on the Optibench dataset, reducing error rates by 58% and 52%, respectively, over prior best results.

自然语言优化多智能体大模型应用

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