TL;DR
This paper introduces a novel iterative training framework for LLM-based agents that bypasses the need for expert demonstrations or definitive environmental feedback. By using a "critic LLM" to provide weak supervision, agents can learn to perform complex tasks more effectively, achieving performance comparable to GPT-4 with significantly smaller open-source models.
What Problem Does This Paper Address?
Creating AI agents that can perform a wide range of tasks in complex environments, similar to humans, has been a long-standing goal. Current approaches often fall into two categories: either requiring agents to mimic expert-provided examples (which is expensive and hard to scale) or relying on clear, definitive feedback from the environment (like winning a game or code compiling correctly). This latter approach is limited to tasks with unambiguous outcomes, excluding many real-world scenarios with nuanced or multi-faceted feedback. The paper aims to bridge this gap by enabling agents to learn and improve through less precise, "weak" supervision, making them more versatile and applicable to a broader set of problems.
Methods
The core of the proposed method is an iterative self-evolutionary training pipeline.
- Trajectory Sampling: An "actor" LLM agent interacts with an environment (simulated via APIs) based on a set of instructions, generating multiple "trajectories" (sequences of actions and observations).
- Critic Module: A separate "critic" LLM evaluates these generated trajectories. Instead of providing definitive success/failure signals, it offers a more nuanced, weak supervision signal (e.g., a score indicating how good a trajectory is). This critic LLM is prompted to evaluate trajectories comprehensively.
- Supervised Fine-Tuning (Trainer): The trajectories that receive high scores from the critic are selected. These "successful" trajectories are then used to fine-tune the actor LLM. To prevent overfitting and encourage broader learning, this fine-tuning also incorporates general chat data from a large language model.
This process is repeated iteratively, allowing the agent to progressively refine its performance and learn from its own generated experiences, guided by the critic's weak feedback.
Datasets
The primary dataset used for evaluation is API-Bank (Li et al., 2023). This dataset is described as comprehensive, covering over 1,000 domains and 2,000 APIs across various applications like web search, health, and calculations. The authors used 315 questions from the original dataset with implemented APIs. Of these, 220 were used for the agent's evolution training, and the remaining 95 were reserved for performance evaluation.
Key Insights and Ideas
- Weak Supervision is Sufficient: The paper demonstrates that LLMs can effectively learn complex tasks using "weak" supervisory signals from another LLM, rather than requiring costly expert demonstrations or unambiguous environmental rewards. This significantly broadens the applicability of LLM-based agents.
- Self-Evolutionary Learning: The iterative nature of the training, where agents generate data, get feedback, and then improve, is a powerful mechanism for progressive learning. This allows agents to adapt and refine their strategies over time without external human intervention for each step.
- Critic LLM as a Scalable Evaluator: Using an LLM as a critic is a clever way to automate the evaluation of complex, multi-turn interactions. The ability of LLMs to understand context and nuance makes them suitable for providing the necessary weak supervision.
- Smaller Models Can Compete: A striking finding is that their trained agents, even when built on significantly smaller open-source LLMs (like Yi-6B and Llama2-13B), can outperform larger, more established open-source models (like Yi-34B) and approach the performance of commercial giants like GPT-4.
Key Results
- The critic module achieved a precision of 70.0% and a recall of 97.2% in identifying beneficial trajectories, indicating its effectiveness in filtering good samples.
- The agents showed steady improvement in accuracy over training iterations, as visualized in Figure 2, for both Yi-6B and Llama2-13B models.
- On the API-Bank benchmark, their proposed method achieved an accuracy of 47.5% (using Ours-Yi-6B) and 49.5% (using Ours-Llama2-13B). This is notably higher than other open-source methods like ReAct-6B (18.9%), API-Bank-7B (11.6%), Yi-6B (10.5%), and Yi-34B (43.2%).
- Their performance is comparable to GPT-4 (51.6%), demonstrating the efficacy of their weak supervision and iterative learning approach.
Limitations and Future Work
Limitations: * Computational Demand: The iterative training process requires multiple trials for environmental exploration, which can be computationally intensive. * Critic Precision: While effective, the critic module's precision in evaluating trajectories is not perfect, which might limit applications requiring exceptionally high accuracy.
Future Work: The paper doesn't explicitly detail future work, but the success of this approach suggests potential avenues:
- Exploring more sophisticated critic prompting or architectures to further improve feedback quality.
- Investigating methods to reduce the computational cost of the iterative training.
- Applying this framework to an even wider range of complex, real-world tasks beyond API interaction.
Summary updated