Preprint
Large Language Models

Self-Challenging Language Model Agents

Yifei Zhou, Sergey Levine, J. Weston, Xian Li, Sainbayar Sukhbaatar
June 2, 2025Neural Information Processing Systems42 citations

42

Citations

2

Influential Citations

Neural Information Processing Systems

Venue

2025

Year

Abstract

Large language models are quickly becoming the foundation for intelligent agents that are capable of using tools. However, training such agents is challenging because it requires human creation and annotation of a diverse set of tasks, tools, and evaluation criteria. In this paper, we propose the Self-Challenging framework for training an agent on high-quality tasks that are generated by itself. The agent first plays the role of challenger and generates a task after interacting with the given tools. The tasks take the form of a novel general class of problems termed Code-as-Task, which are defined by an instruction, a verification function and solution and failure cases which serve as tests, allowing to filter only for high-quality tasks. The agent then takes an executor role and trains on those tasks with reinforcement learning using the evaluation feedback as a reward. Evaluation on two existing multi-turn tool-use agent benchmarks, M3ToolEval and TauBench, shows the Self-Challenging framework achieves over a two-fold improvement in Llama-3.1-8B-Instruct, despite using only self-generated training data.

Analysis

Why This Paper Matters

This paper addresses a critical bottleneck in training language model agents for tool use: the scarcity and cost of human-annotated training data. By proposing a self-challenging framework, the authors enable agents to generate their own high-quality tasks, dramatically reducing the need for human supervision. This is particularly significant as LLMs are increasingly deployed as autonomous agents that must interact with diverse tools and environments.

The introduction of Code-as-Task as a general task representation is a key innovation. It provides a structured way to define tasks with built-in verification, allowing automatic quality control. This framework could generalize beyond tool use to other agentic settings, making it a foundational contribution for self-improving AI systems.

Technical Contributions

  • Self-Challenging Framework: A two-phase cycle where the agent first acts as a challenger to generate tasks, then as an executor to learn from them via reinforcement learning. This mirrors adversarial training but with self-generated data.
  • Code-as-Task Representation: Tasks are defined by an instruction, a verification function (code that checks correctness), and solution/failure cases. This enables automatic filtering of low-quality or unsolvable tasks.
  • Reinforcement Learning from Self-Generated Feedback: The executor uses evaluation feedback from the verification function as a reward signal, enabling policy improvement without external labels.
  • Quality Filtering: Only tasks that pass the verification function and have diverse solution/failure cases are retained, ensuring high-quality training data.

Results

The paper reports over two-fold improvement on two multi-turn tool-use benchmarks: M3ToolEval and TauBench. Specifically, Llama-3.1-8B-Instruct, when trained with Self-Challenging, achieves performance gains of more than 2x compared to the base model. This is notable because the training data is entirely self-generated, with no human annotation. The results demonstrate that self-generated tasks can be as effective as human-curated ones, and potentially more scalable.

Significance

This work has broad implications for the development of autonomous AI agents. By removing the human annotation bottleneck, it opens the door to agents that can continuously improve through self-play in open-ended environments. The Code-as-Task formalism provides a principled way to define and verify tasks, which could be adopted by other self-supervised learning approaches. However, the paper does not explore failure modes where self-generated tasks might be biased or incomplete, nor does it test on domains beyond the two benchmarks. Future work should investigate generalization to more complex, real-world tool-use scenarios and the potential for reward hacking in the self-generated feedback loop. Overall, this is a significant step toward scalable, self-improving language agents.