SwiftSage: A Generative Agent with Fast and Slow Thinking for Complex Interactive Tasks
Bill Yuchen Lin 11{}^{1}start_FLOATSUPERSCRIPT 1 end_FLOATSUPERSCRIPT Yicheng Fu 44{}^{4}start_FLOATSUPERSCRIPT 4 end_FLOATSUPERSCRIPT Karina Yang 22{}^{2}start_FLOATSUPERSCRIPT 2 end_FLOATSUPERSCRIPT Faeze Brahman 11{}^{1}start_FLOATSUPERSCRIPT 1 end_FLOATSUPERSCRIPT33{}^{3}start_FLOATSUPERSCRIPT 3 end_FLOATSUPERSCRIPT Shiyu Huang 55{}^{5}start_FLOATSUPERSCRIPT 5 end_FLOATSUPERSCRIPT Chandra Bhagavatula 11{}^{1}start_FLOATSUPERSCRIPT 1 end_FLOATSUPERSCRIPT Prithviraj Ammanabrolu 66{}^{6}start_FLOATSUPERSCRIPT 6 end_FLOATSUPERSCRIPT77{}^{7}start_FLOATSUPERSCRIPT 7 end_FLOATSUPERSCRIPT Yejin Choi 33{}^{3}start_FLOATSUPERSCRIPT 3 end_FLOATSUPERSCRIPT11{}^{1}start_FLOATSUPERSCRIPT 1 end_FLOATSUPERSCRIPT Xiang Ren 22{}^{2}start_FLOATSUPERSCRIPT 2 end_FLOATSUPERSCRIPT11{}^{1}start_FLOATSUPERSCRIPT 1 end_FLOATSUPERSCRIPT 11{}^{1}start_FLOATSUPERSCRIPT 1 end_FLOATSUPERSCRIPTAllen Institute for Artificial Intelligence 22{}^{2}start_FLOATSUPERSCRIPT 2 end_FLOATSUPERSCRIPTUniversity of Southern California 33{}^{3}start_FLOATSUPERSCRIPT 3 end_FLOATSUPERSCRIPTUniversity of Washington 44{}^{4}start_FLOATSUPERSCRIPT 4 end_FLOATSUPERSCRIPTTsinghua University 55{}^{5}start_FLOATSUPERSCRIPT 5 end_FLOATSUPERSCRIPT4Paradigm Inc. 66{}^{6}start_FLOATSUPERSCRIPT 6 end_FLOATSUPERSCRIPTUniversity of California, San Diego 77{}^{7}start_FLOATSUPERSCRIPT 7 end_FLOATSUPERSCRIPTMosaicML https://swiftsage.github.io
Abstract
We introduce SwiftSage, a novel agent framework inspired by the dual-process theory of human cognition, designed to excel in action planning for complex interactive reasoning tasks. SwiftSage integrates the strengths of behavior cloning and prompting large language models (LLMs) to enhance task completion performance. The framework comprises two primary modules: the Swift module, representing fast and intuitive thinking, and the Sage module, emulating deliberate thought processes. The Swift module is a small encoder-decoder LM fine-tuned on the oracle agent’s action trajectories, while the Sage module employs LLMs such as GPT-4 for subgoal planning and grounding. We develop a heuristic method to harmoniously integrate the two modules, resulting in a more efficient and robust problem-solving process. In 30 tasks from the ScienceWorld benchmark, SwiftSage significantly outperforms other methods such as SayCan, ReAct, and Reflexion, demonstrating its effectiveness in solving complex interactive tasks.111Contact: yuchenl@allenai.org
中文速览
智能体在复杂交互式推理任务中往往面临两难困境:小模型行动快但缺乏长远规划能力,大语言模型(LLM)规划能力强但每步都要调用推理、成本极高。SwiftSage 受人类"快思慢想"双过程认知理论启发,将一个经过行为克隆微调的轻量级 T5 编解码器(Swift 模块,对应直觉系统)与 GPT-4 驱动的子目标规划器(Sage 模块,对应分析系统)结合起来,通过启发式算法动态决定何时激活慢思考模块、何时让快思考模块接管,并用动作缓冲区衔接两者输出。在涵盖 30 种任务类型的 ScienceWorld 基准上,SwiftSage 以平均得分 84.7 大幅领先 SayCan(33.8)、ReAct(36.4)和 Reflexion(45.3),同时每步所需的 LLM 调用 token 数也远少于对比方法。这项工作表明,将小模型的高效执行与大模型的深度规划有机结合,是构建能应对真实世界复杂任务的智能体的一条极具潜力的路径。
原文 arXiv:2305.17390;中英对照 + 大白话阅读 https://aha.fim.ai/paper/2305.17390v2