用分步价值模型提升大模型智能体的多步决策能力
Enhancing Decision-Making for LLM Agents via Step-Level Q-Value Models
- 通过蒙特卡洛树搜索收集带分步价值标注的决策轨迹
- 在WebShop和HotPotQA上性能分别提升103%和75%
- 可通用适配不同大模型,且无需修改原有提示策略
智能体通过感知环境、做出决策并执行动作,显著增强了独立大语言模型(LLM)的能力。然而,在需要多步决策的任务中,LLM智能体仍面临挑战。当中间动作未获得适当奖励或惩罚时,估计特定任务中动作的价值十分困难。本文提出利用任务相关的分步价值模型来指导动作选择。具体而言,我们首先通过蒙特卡洛树搜索(MCTS)收集带有分步价值标注的决策轨迹,并构建偏好数据。随后,使用另一个LLM通过分步直接策略优化(DPO)拟合这些偏好,形成价值模型。推理时,智能体在每个决策步骤中选择具有最高价值的动作后再与环境交互。我们在多种开源及基于API的大模型智能体上应用该方法,结果表明价值模型显著提升了性能。值得注意的是,采用Phi-3-mini-4k-instruct构建的智能体在WebShop上性能提升103%,在HotPotQA上提升75%,甚至超过GPT-4o-mini。此外,该模型具备良好的泛化能力,可无缝集成至现有提示策略中。
原文摘要 · Abstract (English)
Agents significantly enhance the capabilities of standalone Large Language Models (LLMs) by perceiving environments, making decisions, and executing actions. However, LLM agents still face challenges in tasks that require multiple decision-making steps. Estimating the value of actions in specific tasks is difficult when intermediate actions are neither appropriately rewarded nor penalized. In this paper, we propose leveraging a task-relevant Q-value model to guide action selection. Specifically, we first collect decision-making trajectories annotated with step-level Q values via Monte Carlo Tree Search (MCTS) and construct preference data. We then use another LLM to fit these preferences through step-level Direct Policy Optimization (DPO), which serves as the Q-value model. During inference, at each decision-making step, LLM agents select the action with the highest Q value before interacting with the environment. We apply our method to various open-source and API-based LLM agents, demonstrating that Q-value models significantly improve their performance. Notably, the performance of the agent built with Phi-3-mini-4k-instruct improved by 103% on WebShop and 75% on HotPotQA when enhanced with Q-value models, even surpassing GPT-4o-mini. Additionally, Q-value models offer several advantages, such as generalization to different LLM agents and seamless integration with existing prompting strategies.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。