ReflectPO: Reflection-Guided Policy Optimization for Long-Horizon LLM Agents
Abstract
With external tools, large language models (LLMs) can tackle complex tasks through sustained environmental interaction. LLM-based agents are therefore increasingly used to tackle complex long-horizon tasks in real-world environments. However, these tasks involve sequential, interdependent decisions and changes in environmental states. Early execution errors affect subsequent interaction histories and environmental states, and their effects accumulate along the decision chain. To address this challenge, we propose Reflection-Guided Policy Optimization (ReflectPO), a reinforcement learning framework for autonomous error recovery in long-horizon tasks. ReflectPO comprises two core components. The first is Reflection-Guided Sampling. We use branch differences and repeated visits in interaction trajectories to construct hints for error recovery. The second is Tree-Structured Credit Assignment. We organize sampled trajectories into trees and assign action-level credit using parent--child reward differences and recovery gains. Experiments over two long-horizon tool-use benchmarks show that ReflectPO outperforms multiple existing baselines in most domains. It also achieves the best overall performance on average. Further analyses show that ReflectPO effectively improves agents' ability to recognize their own deviations, recover from erroneous states, and continue making progress toward task completion.
Create a lesson
Related papers
Uni-Mem: Learning a Long-Horizon Agentic Memory Manager with Unified Online Policy Optimization
Shared title terminologycs.CLZhiqian Xia, Jielong Tang, Ling-An Zeng et al.
MERIT: Experience-Guided Memory for Long-Horizon Persona-Specific Persuasive Dialogue
Shared title terminologycs.CLRohan Kirti, Akash Ghosh, Pratik Amrit et al.
SOPO: Socratic Guided Policy Optimization for Span-Level Hallucination Detection
Shared title terminologycs.CLJiawei Dong, Zilong Bai, Pengtian zhu et al.
When LLMs Forget What They Believe: Characterizing State Integrity Collapse in Long-Horizon Dialogues
Shared title terminologycs.CLYancheng Zhu, Yifan Yuan
ContextFact: Remembering Facts in Context for Long-Term Conversational Agents
Shared title terminologycs.CLJiayu Huang, Yichao Cai, Xinyu Li et al.
J-Comm: Jacobian-Guided Latent Communication between LLM Agents
Shared title terminologycs.CLXiangwei Wang, Wei Wang, Sachith Seneviratne et al.