基于大语言模型的交互式与表达性代码增强规划
Interactive and Expressive Code-Augmented Planning with Large Language Models
AI总结:
本文提出 REPL-Plan,一种让大语言模型通过 Read-Eval-Print Loop 交互式执行和评估代码的规划方法,兼具代码表达性与动态纠错能力,在多个规划领域优于先前方法。
摘要:
大语言模型(LLMs)在常识推理和交互式决策方面展现出强大能力,但在复杂的长期规划任务中往往表现不佳。近期技术尝试利用控制流及其他代码相关技术来结构化大语言模型的输出,以提升规划性能。这些技术包括使用变量(用于跟踪重要信息)和函数(用于将复杂任务分解为更小的可复用子任务)。然而,纯代码方法容易出错,且不足以处理模糊或非结构化数据。为应对这些挑战,我们提出 REPL-Plan,这是一种大语言模型规划方法,既具备完全的代码表达性(能够利用代码的全部优势),又具有动态性(能够灵活地从错误中调整,并在模糊情境下借助大语言模型)。在 REPL-Plan 中,大语言模型通过与 Read-Eval-Print Loop(REPL)交互来求解任务,REPL 会迭代执行和评估代码,类似于语言 shell 或交互式代码笔记本,使模型能够灵活纠正错误并动态处理任务。我们证明,与先前方法相比,REPL-Plan 在多个规划领域均取得了优异结果。
英文摘要:
Large Language Models (LLMs) demonstrate strong abilities in common-sense reasoning and interactive decision-making, but often struggle with complex, long-horizon planning tasks. Recent techniques have sought to structure LLM outputs using control flow and other code-adjacent techniques to improve planning performance. These techniques include using variables (to track important information) and functions (to divide complex tasks into smaller re-usable sub-tasks). However, purely code-based approaches can be error-prone and insufficient for handling ambiguous or unstructured data. To address these challenges, we propose REPL-Plan, an LLM planning approach that is fully code-expressive (it can utilize all the benefits of code) while also being dynamic (it can flexibly adapt from errors and use the LLM for fuzzy situations). In REPL-Plan, an LLM solves tasks by interacting with a Read-Eval-Print Loop (REPL), which iteratively executes and evaluates code, similar to language shells or interactive code notebooks, allowing the model to flexibly correct errors and handle tasks dynamically. We demonstrate that REPL-Plan achieves strong results across various planning domains compared to previous methods.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。