arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2306.03604cs.AI
收藏

实现智能体与LLM之间的智能交互:一种强化学习方法

Enabling Intelligent Interactions between an Agent and an LLM: A Reinforcement Learning Approach

Zhejiang Lab(之江实验室);Harbin Institute of Technology (Shenzhen)(哈尔滨工业大学(深圳));AI Innovation and Incubation Institute, Fudan University(复旦大学AI创新与孵化研究院)

Bin Hu, Chenyang Zhao, Pu Zhang, Zihao Zhou, Yuanhang Yang, Zenglin Xu, Bin Liu

AI总结:

本文提出基于强化学习的方法When2Ask,通过MDP建模学习何时向LLM查询高级指令,以减少冗余交互并降低成本,同时使智能体能够动态调整计划,在MiniGrid和Habitat环境中显著降低了交互成本。

摘要:

大型语言模型(LLMs)编码了从海量文本数据集中获取的丰富世界知识。最近的研究表明,LLMs可以通过提供高级指令来辅助具身智能体解决复杂的序列决策任务。然而,与LLMs的交互可能非常耗时。在许多实际场景中,它需要大量的存储空间,只能部署在远程云服务器上。此外,使用商业LLMs可能成本高昂,因为它们可能会根据使用频率收费。在本文中,我们探讨了如何实现下游任务导向智能体与LLM之间智能且高性价比的交互。我们发现这个问题可以自然地用马尔可夫决策过程(MDP)来表述,并提出了When2Ask,这是一种基于强化学习的方法,学习何时有必要向LLMs查询高级指令以完成目标任务。一方面,When2Ask阻止了不必要的冗余交互,另一方面,它使智能体能够识别并遵循来自LLM的有用指令。这使得智能体能够中止正在进行的计划,并根据新的环境观察转向更合适的计划。在需要规划子目标的MiniGrid和Habitat环境上的实验表明,When2Ask学会了通过与LLM仅进行少数必要的交互来解决目标任务,与基线方法相比,在测试环境中显著降低了交互成本。我们的代码可在以下地址获取:https://github.com/ZJLAB-AMMI/LLM4RL。

英文摘要:

Large language models (LLMs) encode a vast amount of world knowledge acquired from massive text datasets. Recent studies have demonstrated that LLMs can assist an embodied agent in solving complex sequential decision making tasks by providing high-level instructions. However, interactions with LLMs can be time-consuming. In many practical scenarios, it requires a significant amount of storage space that can only be deployed on remote cloud servers. Additionally, using commercial LLMs can be costly since they may charge based on usage frequency. In this paper, we explore how to enable intelligent cost-effective interactions between a down stream task oriented agent and an LLM. We find that this problem can be naturally formulated by a Markov decision process (MDP), and propose When2Ask, a reinforcement learning based approach that learns when it is necessary to query LLMs for high-level instructions to accomplish a target task. On one side, When2Ask discourages unnecessary redundant interactions, while on the other side, it enables the agent to identify and follow useful instructions from the LLM. This enables the agent to halt an ongoing plan and transition to a more suitable one based on new environmental observations. Experiments on MiniGrid and Habitat environments that entail planning sub-goals demonstrate that When2Ask learns to solve target tasks with only a few necessary interactions with the LLM, significantly reducing interaction costs in testing environments compared with baseline methods. Our code is available at: https://github.com/ZJLAB-AMMI/LLM4RL.

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

↑