利用大语言模型求解通用自然语言描述的优化问题
Solving General Natural-Language-Description Optimization Problems with Large Language Models
AI总结:
针对优化问题建模求解门槛高的问题,提出融合外部求解器的OptLLM框架,支持自然语言输入与多轮交互优化,经实验验证适配多种大模型且微调后准确率提升,部分功能已开放试用。
摘要:
优化问题旨在在一组约束下找到目标函数的最优解,已在实际应用中得到广泛研究。在特定领域中建模和求解优化问题通常需要结合领域知识、数学技能和编程能力,这对普通用户甚至领域专业人士来说都颇具难度。本文提出了一种名为OptLLM的新型框架,它为大语言模型(LLM)配备了外部求解器。具体而言,OptLLM接收用户的自然语言查询,将其转换为数学公式和编程代码,并调用求解器计算结果以用于决策。此外,OptLLM支持多轮对话,可逐步完善优化问题的建模与求解。为验证OptLLM的有效性,我们针对三种典型优化应用提供了教程,并使用一个大规模自研优化数据集,在基于提示的GPT模型和经过微调的Qwen模型上开展了实验。实验结果表明,OptLLM可适配多种LLM,且微调模型相较于基于提示的模型实现了准确率提升。OptLLM框架的部分功能自2023年6月起已开放试用(https://opt.alibabacloud.com/chat 或 https://opt.aliyun.com/chat)。
英文摘要:
Optimization problems seek to find the best solution to an objective under a set of constraints, and have been widely investigated in real-world applications. Modeling and solving optimization problems in a specific domain typically require a combination of domain knowledge, mathematical skills, and programming ability, making it difficult for general users and even domain professionals. In this paper, we propose a novel framework called OptLLM that augments LLMs with external solvers. Specifically, OptLLM accepts user queries in natural language, convert them into mathematical formulations and programming codes, and calls the solvers to calculate the results for decision-making. In addition, OptLLM supports multi-round dialogues to gradually refine the modeling and solving of optimization problems. To illustrate the effectiveness of OptLLM, we provide tutorials on three typical optimization applications and conduct experiments on both prompt-based GPT models and a fine-tuned Qwen model using a large-scale selfdeveloped optimization dataset. Experimental results show that OptLLM works with various LLMs, and the fine-tuned model achieves an accuracy boost compared to the promptbased models. Some features of OptLLM framework have been available for trial since June 2023 (https://opt.alibabacloud.com/chat or https://opt.aliyun.com/chat).
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。