Large language models (LLMs) demonstrate impressive performance on a wide variety of tasks, but they often struggle with tasks that require multi-step reasoning or goal-directed planning. To address this, we take inspiration from the human brain, in which planning is accomplished via the recurrent interaction of specialized modules in the prefrontal cortex (PFC). These modules perform functions such as conflict monitoring, state prediction, state evaluation, task decomposition, and task coordination. We find that LLMs are sometimes capable of carrying out these functions in isolation, but struggle to autonomously coordinate them in the service of a goal. Therefore, we propose a black box architecture with multiple LLM-based (GPT-4) modules. The architecture improves planning through the interaction of specialized PFC-inspired modules that break down a larger problem into multiple brief automated calls to the LLM. We evaluate the combined architecture on two challenging planning tasks -- graph traversal and Tower of Hanoi -- finding that it yields significant improvements over standard LLM methods (e.g., zero-shot prompting or in-context learning). These results demonstrate the benefit of utilizing knowledge from cognitive neuroscience to improve planning in LLMs.
翻译:大语言模型(LLMs)在各种任务上展现出令人瞩目的性能,但在需要多步推理或目标导向规划的任务中往往表现不佳。为解决这一问题,我们借鉴了人脑的机制——前额叶皮层(PFC)中专化模块的循环交互实现了规划功能。这些模块执行冲突监控、状态预测、状态评估、任务分解和任务协调等功能。我们发现,大语言模型有时能独立执行这些功能,但难以自主协调它们以实现目标。因此,我们提出了一种基于多个LLM(GPT-4)模块的黑盒架构。该架构通过受前额叶皮层启发的专化模块的交互来改进规划能力,这些模块将大问题分解为多次对LLM的短暂自动调用。我们在两项具有挑战性的规划任务——图遍历和汉诺塔——上评估了该组合架构,发现其相比标准LLM方法(如零样本提示或上下文学习)带来了显著改进。这些结果表明,利用认知神经科学的知识来增强大语言模型的规划能力具有实用价值。