Abstract
While Large Language Model (LLM) agents demonstrate significant capabilities in autonomous task solving, they often encounter an "intelligence ceiling" in complex, high-stakes environments. This paper introduces ReHAC (Reinforcement Learning-based Human-Agent Collaboration), a framework that dynamically allocates tasks between an LLM agent and a human collaborator. By framing the collaboration as a Markov Decision Process and optimizing for a balance between task performance and human intervention cost, ReHAC achieves substantial performance gains—up to 25.8%—while minimizing human workload.
Introduction
Current LLM-based agents, despite their reasoning abilities, frequently struggle with hallucinations, repetitive loops, or nuanced requirements in domains like legal analysis or complex coding. Existing solutions typically oscillate between full human manual labor or full agent autonomy. Previous attempts at conditional automation relied on rigid heuristics or simple self-querying prompts, which often fail because agents lack the "self-awareness" to accurately judge their own limitations. ReHAC addresses this by introducing a learnable Allocator that identifies the optimal moments for human intervention.
Methodology
ReHAC treats human-agent collaboration as a reinforcement learning problem. The system consists of an LLM Agent, a Human collaborator, and a dedicated Allocator policy (e.g., Llama2-7B/13B).
The Allocator observes the task state and decides whether to delegate the next step to the agent or the human. This decision is guided by a reward function designed to penalize human effort:
$$R = Task\_Reward - \lambda \cdot Human\_Intervention\_Cost$$
The parameter $\lambda$ allows for fine-tuning the trade-off between performance and human workload. To avoid the high cost of real-time human training, the authors utilized offline RL (Proximal Policy Optimization) on trajectories where GPT-4 simulated human intuition, later validated with real human data.
Experimental Setup
The framework was evaluated on three benchmarks:
- HotpotQA: Multi-hop document reasoning.
- StrategyQA: Implicit reasoning tasks.
- InterCode (SQL): Interactive data manipulation.
A custom dataset of 2,000 trajectories was collected using a GUI where 14 human annotators collaborated with ChatGPT to provide high-quality training signals.
Key Results
ReHAC consistently outperformed all baselines, including "Agent-only" and "Prompt-based" methods. On the HotpotQA dataset, it achieved a 25.8% relative improvement in total reward.
As shown in the results, the $\lambda$ coefficient effectively controls the system's behavior. At higher $\lambda$ values (e.g., 0.1), the Allocator becomes more selective, achieving higher rewards than prompt-based methods while requiring 20% fewer human interventions. This demonstrates that a dedicated model is far superior to an agent simply "asking for help" via prompts.
Discussion and Insights
The study highlights that agents and humans possess complementary strengths. While agents are efficient at broad information retrieval, humans are essential for "bold speculation" in ambiguous scenarios where agents might otherwise fail. Furthermore, the ReHAC policy shows strong cross-framework generalization; a policy trained on a simple ReAct framework remains effective when applied to more complex architectures like Reflexion.
Limitations and Future Work
The current framework assumes human performance is superior to the agent's, which may not hold in highly specialized technical fields. Future research will explore scaling the Allocator to smaller, more efficient models and addressing the real-time latency challenges inherent in human-in-the-loop systems. As agents approach superintelligence, the role of collaboration may shift from task assistance to safety supervision and alignment.
Summary updated