Agent-Pro: Learning to Evolve via Policy-Level Reflection and Optimization

Wenqi Zhang, Ke Tang, Hai Wu, Mengna Wang, Yongliang Shen +5 more
2/27/2024
cs.AIcs.CL

No official code found. Best implementation: zwq2018/Agent-Pro (135 stars, last commit 2024-09-02).

Abstract

Large Language Models (LLMs) exhibit robust problem-solving capabilities for diverse tasks. However, most LLM-based agents are designed as specific task solvers with sophisticated prompt engineering, rather than agents capable of learning and evolving through interactions. These task solvers necessitate manually crafted prompts to inform task rules and regulate LLM behaviors, inherently incapacitating to address complex dynamic scenarios e.g., large interactive games. In light of this, we propose Agent-Pro: an LLM-based Agent with Policy-level Reflection and Optimization that can learn a wealth of expertise from interactive experiences and progressively elevate its behavioral policy. Specifically, it involves a dynamic belief generation and reflection process for policy evolution. Rather than action-level reflection, Agent-Pro iteratively reflects on past trajectories and beliefs, fine-tuning its irrational beliefs for a better policy. Moreover, a depth-first search is employed for policy optimization, ensuring continual enhancement in policy payoffs. Agent-Pro is evaluated across two games: Blackjack and Texas Hold'em, outperforming vanilla LLM and specialized models. Our results show Agent-Pro can learn and evolve in complex and dynamic scenes, which also benefits numerous LLM-based applications.

View on arXivView PDF

Code Implementations(1)

zwq2018/Agent-ProCommunity100%

The Code Repo for Agent-Pro: Learning to Evolve via Policy-Level Reflection and Optimization

13510PythonFeb 27, 20242 years ago

Similar Papers

Cite this paper

@article{zhang2024agentpro,
  title  = {Agent-Pro: Learning to Evolve via Policy-Level Reflection and Optimization},
  author = {Wenqi Zhang and Ke Tang and Hai Wu and Mengna Wang and Yongliang Shen and Guiyang Hou and Zeqi Tan and Peng Li and Yueting Zhuang and Weiming Lu},
  year   = {2024},
  eprint = {2402.17574},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2402.17574v3}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2402.17574.svg)](https://codeofpaper.com/paper/2402.17574)

Discussion