NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

AGILE: A Novel Reinforcement Learning Framework of LLM Agents

Peiyuan Feng, Yichen He, Guanhua Huang, Yuan Lin, Hanchong Zhang, Yuchen Zhang, Hang Li

TL;DR

AGILE (AGent that Interacts and Learns from Environments) is a new reinforcement learning framework that treats a Large Language Model (LLM) as a policy model capable of using tools, managing memory, and proactively seeking human advice. By training 7B and 13B models using a two-stage process of imitation learning and Proximal Policy Optimization (PPO), researchers developed agents that can outperform GPT-4 on complex, domain-specific question-answering tasks.

What Problem Does This Paper Address?

While LLMs are powerful, turning them into autonomous "agents" usually involves a patchwork of techniques: prompting for planning, separate modules for memory, and hard-coded tool-use logic. This fragmented approach makes it difficult to optimize the entire system end-to-end.

Furthermore, even the best LLMs suffer from hallucinations and a lack of "long-tail" knowledge (niche facts not well-represented in training data). Most current agents are closed systems that try to solve everything themselves. The authors argue that a truly intelligent agent should know its own limitations. It should proactively ask a human expert for help when its confidence is low, and then learn from that interaction to handle similar problems independently in the future.

Methods

The authors formulate the LLM agent as a token-level Markov Decision Process (MDP). The LLM acts as the policy, the "state" consists of the current conversation context and memory, and "actions" are simply tokens in the LLM's vocabulary—including special function tokens like [RetrieveMemory] or [SearchProduct].

The framework consists of four core modules:

  1. LLM: The brain that predicts actions and processes information.
  2. Memory: A repository for historical interactions and distilled knowledge.
  3. Tools: External capabilities, such as a MySQL engine for product searches.
  4. Executor: The controller that interprets LLM instructions, triggers the modules, and feeds the results back into the LLM's context.

The Training Secret Sauce: AGILE uses a two-stage training pipeline:

  • Stage 1: Imitation Learning (SFT). The model is fine-tuned on high-quality trajectories of experts solving problems using the AGILE framework.
  • Stage 2: Reinforcement Learning (PPO). The model is further optimized using PPO. Crucially, the reward function balances the benefit of a correct answer against the "cost" of bothering a human expert. This teaches the agent to be proactively helpful without being overly dependent.

Datasets

The researchers evaluated AGILE on three challenging benchmarks:

  • ProductQA (New): A dataset introduced in this paper containing over 88,000 QA pairs across 26 Amazon product categories. It requires complex reasoning, SQL tool usage, and handling of technical specifications.
  • MedMCQA: A large-scale dataset of medical entrance exam questions, testing domain-specific expertise.
  • HotPotQA: A benchmark for multi-hop reasoning and Wikipedia-based search.

Key Insights and Ideas

  • Proactive Advice-Seeking: This is the standout feature. Instead of just guessing, the agent can call a [SeekAdvice] function. It learns to estimate its own uncertainty and decides if the cost of human intervention is worth the guaranteed accuracy.
  • Reflection as Knowledge Distillation: When an expert provides an answer, the agent doesn't just pass it to the user. It performs a "reflection" step to extract the underlying general principle and stores it in memory. This allows the agent to grow its knowledge base over time.
  • End-to-End RL is Essential: The authors found that PPO training was vital for the agent to learn the long-term value of its actions—such as realizing that storing a specific fact in memory now will save it from needing to ask for help ten sessions later.

Key Results

The results suggest that smaller, specialized models can punch way above their weight class when framed correctly:

  • Outperforming GPT-4: On the ProductQA benchmark, the AGILE-Vicuna-13B model (trained with PPO) achieved a higher total score and accuracy than a GPT-4-based agent, while maintaining a lower advice rate over time.
  • Medical Mastery: On MedMCQA, AGILE improved a base model's accuracy from 53.4% to a staggering 85.2% by strategically seeking advice on roughly 31% of questions. This outperformed the state-of-the-art "GPT4-MedPrompt" approach.
  • Ablation Success: Removing any single component—tools, memory, or the ability to seek advice—led to significant performance drops (e.g., a 10.7% decrease in accuracy when advice-seeking was disabled).

Limitations and Future Work

The authors acknowledge several areas for growth:

  • Model Scaling: Due to resource constraints, they primarily tested 7B and 13B parameter models. They expect even better results when applying the AGILE framework to larger frontier models.
  • Expert Simulation: In these experiments, the "human expert" was simulated using ground-truth data. Real-world human feedback is often noisier and more expensive, which might change the RL dynamics.
  • Safety and Ethics: As agents become more capable of using tools and interacting with humans, the risks of misuse or harmful actions increase, necessitating more robust safety research.

Summary updated

BibTeX
@inproceedings{feng2024agile,
  author = {Peiyuan Feng and Yichen He and Guanhua Huang and Yuan Lin and Hanchong Zhang and Yuchen Zhang and Hang Li},
  title = {{AGILE: A Novel Reinforcement Learning Framework of LLM Agents}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=Ul3lDYo3XQ},
}
Figure