arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2403.14589cs.AIcs.CLcs.LG
收藏

ReAct 遇见 ActRe:当语言智能体享有训练数据自主性

ReAct Meets ActRe: When Language Agents Enjoy Training Data Autonomy

Tsinghua University(清华大学);Institute for AI Industry Research (AIR), Tsinghua University(清华大学人工智能产业研究院(AIR));Institute of Intelligent Computing, Alibaba Group(阿里巴巴集团智能计算研究所)

Zonghan Yang, Peng Li, Ming Yan, Ji Zhang, Fei Huang, Yang Liu

AI总结:

本文提出 A$^3$T 框架,通过 ActRe 提示智能体为 ReAct 风格智能体自主标注动作理由并合成轨迹,结合对比式自训练实现多轮自我改进,在 AlfWorld 和 WebShop 上显著超越 GPT-4 提示及完全微调 LLM 等现有方法。

摘要:

语言智能体通过基于基础模型的推理展现了自主决策能力。近期,已有工作尝试训练语言智能体以提升性能,并以多步推理和动作轨迹作为训练数据。然而,收集此类轨迹仍需要大量人工投入,无论是通过人工标注还是实现多样化的提示框架。在本工作中,我们提出 A$^3$T,一个能够以 ReAct 风格实现智能体轨迹自主标注的框架。其核心角色是一个 ActRe 提示智能体,它负责解释任意动作的原因。当随机采样一个外部动作时,ReAct 风格智能体可以向 ActRe 智能体查询该动作,以获得其文本理由。随后,通过将 ActRe 生成的后验推理前置到所采样的动作之前,合成新的轨迹。通过这种方式,ReAct 风格智能体为失败任务执行多条轨迹,并选择成功的轨迹来补充其失败轨迹,用于对比式自训练。借助二值化奖励的策略梯度方法实现,基于累积轨迹的对比式自训练促成了多轮语言智能体自我改进的闭环。我们使用开源模型 Mistral-7B-Instruct-v0.2 进行 QLoRA 微调实验。在 AlfWorld 中,使用 A$^3$T 训练的智能体获得了 96% 的单次成功率,并在 4 轮迭代后达到 100% 成功率。在 WebShop 中,A$^3$T 智能体的单次性能与人类平均水平相当,且 4 轮迭代优化使其性能接近人类专家。A$^3$T 智能体显著优于现有技术,包括使用 GPT-4 的提示方法、先进的智能体框架以及完全微调的大语言模型。

英文摘要:

Language agents have demonstrated autonomous decision-making abilities by reasoning with foundation models. Recently, efforts have been made to train language agents for performance improvement, with multi-step reasoning and action trajectories as the training data. However, collecting such trajectories still requires considerable human effort, by either artificial annotation or implementations of diverse prompting frameworks. In this work, we propose A$^3$T, a framework that enables the Autonomous Annotation of Agent Trajectories in the style of ReAct. The central role is an ActRe prompting agent, which explains the reason for an arbitrary action. When randomly sampling an external action, the ReAct-style agent could query the ActRe agent with the action to obtain its textual rationales. Novel trajectories are then synthesized by prepending the posterior reasoning from ActRe to the sampled action. In this way, the ReAct-style agent executes multiple trajectories for the failed tasks, and selects the successful ones to supplement its failed trajectory for contrastive self-training. Realized by policy gradient methods with binarized rewards, the contrastive self-training with accumulated trajectories facilitates a closed loop for multiple rounds of language agent self-improvement. We conduct experiments using QLoRA fine-tuning with the open-sourced Mistral-7B-Instruct-v0.2. In AlfWorld, the agent trained with A$^3$T obtains a 1-shot success rate of 96%, and 100% success with 4 iterative rounds. In WebShop, the 1-shot performance of the A$^3$T agent matches human average, and 4 rounds of iterative refinement lead to the performance approaching human experts. A$^3$T agents significantly outperform existing techniques, including prompting with GPT-4, advanced agent frameworks, and fully fine-tuned LLMs.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑