Large language models (LLMs) have demonstrated remarkable zero-shot generalization abilities: state-of-the-art chatbots can provide plausible answers to many common questions that arise in daily life. However, so far, LLMs cannot reliably solve long-horizon planning problems. By contrast, classical planners, once a problem is given in a formatted way, can use efficient search algorithms to quickly identify correct, or even optimal, plans. In an effort to get the best of both worlds, this paper introduces LLM+P, the first framework that incorporates the strengths of classical planners into LLMs. LLM+P takes in a natural language description of a planning problem, then returns a correct (or optimal) plan for solving that problem in natural language. LLM+P does so by first converting the language description into a file written in the planning domain definition language (PDDL), then leveraging classical planners to quickly find a solution, and then translating the found solution back into natural language. Along with LLM+P, we define a diverse set of different benchmark problems taken from common planning scenarios. Via a comprehensive set of experiments on these benchmark problems, we find that LLM+P is able to provide optimal solutions for most problems, while LLMs fail to provide even feasible plans for most problems.\footnote{The code and results are publicly available at https://github.com/Cranial-XIX/llm-pddl.git.
翻译:大型语言模型已展现出卓越的零样本泛化能力:最先进的聊天机器人能够对日常生活中常见的许多问题给出合理的答案。然而,目前大型语言模型尚无法可靠地解决长时域规划问题。相比之下,经典规划器一旦以格式化形式给出问题,便能利用高效搜索算法快速识别正确甚至最优的规划方案。为了融合两者优势,本文提出LLM+P——首个将经典规划器优势融入大型语言模型的框架。LLM+P接收自然语言描述的规划问题,然后返回解决该问题的正确(或最优)自然语言规划方案。该框架首先将自然语言描述转化为以规划领域定义语言(PDDL)编写的文件,接着利用经典规划器快速求解,最后将求解结果回译为自然语言。与LLM+P一同提出的,还有一组取自常见规划场景的多样化基准问题。通过在基准问题上的系列全面实验,我们发现LLM+P能够为大多数问题提供最优解,而大型语言模型甚至无法为大多数问题给出可行的规划方案。\footnote{代码与结果于https://github.com/Cranial-XIX/llm-pddl.git公开。}