Abstract
Training Large Language Model (LLM) agents for complex, multi-turn tool use is hindered by the scarcity and cost of high-quality human-annotated trajectories. We present the Self-Challenging Agent (SCA) framework, an autonomous pipeline that enables LLMs to generate their own training data by interacting with environment tools. By formalizing discoveries into a novel Code-as-Task (CaT) format, agents can synthesize verifiable tasks that significantly improve performance. Our experiments show that SCA can double an agent's success rate on complex benchmarks using only self-generated data, effectively bootstrapping its own capabilities.
Introduction
While LLMs excel at many tasks, their application as autonomous agents—capable of navigating databases, browsing the web, or using specialized APIs—requires fine-tuning on diverse, high-quality trajectories. Traditional synthetic data generation often relies on prompting models with static API documentation, which frequently results in tasks that are either impossible to solve, ambiguous, or trivial.
To overcome this, researchers from UC Berkeley and Meta's FAIR have introduced the SCA framework. The core insight is that interaction is superior to reading: an agent that "plays around" in an environment first can better understand what is achievable before attempting to formalize a task for training.
The SCA Framework
The SCA framework decouples the agentic process into two distinct roles to ensure data quality and verifiability:
- The Challenger: This component explores the environment by calling tools and observing outcomes. Based on these interactions, it constructs a task in the Code-as-Task (CaT) format. This format includes a natural language instruction, a programmatic verification function, an example solution to prove feasibility, and failure cases to test the verifier's robustness.
- The Executor: This is the model undergoing training. It attempts to solve the tasks generated by the Challenger using the available tools.
Training typically employs Rejection Fine-Tuning, where the model is optimized only on trajectories that pass the programmatic verification. The framework also supports Distillation, where a larger, more capable model (e.g., Llama-3.1-70B) generates solutions for a smaller student model (e.g., Llama-3.1-8B).
Code-as-Task (CaT) Synthesis
The "secret sauce" of SCA is the CaT format. By expressing tasks as executable Python code, the system can automatically filter out low-quality data. If the example solution fails the verification function, or if a known failure case passes it, the task is discarded. This ensures that the training set consists only of feasible, non-trivial, and correctly verifiable tasks.
Experimental Results
The framework was evaluated across four environments in the M3ToolEval and TauBench benchmarks, covering domains from DNA sequencing to airline customer service.
- Performance Gains: In self-improvement scenarios, SCA training doubled the success rate of Llama-3.1-8B-Instruct from 12.0% to 23.5% on average.
- Distillation Success: When a 70B model provided trajectories for an 8B model, SCA achieved a 20.2% absolute improvement in average success rate.
- Generalization: Scaling analysis revealed that increasing the diversity of unique tasks is more critical for out-of-distribution generalization than simply increasing the volume of trajectories for a limited set of tasks.
Discussion and Future Work
SCA demonstrates that LLMs can "pull themselves up by their bootstraps" by challenging themselves with verifiable tasks. However, limitations remain. Some tasks still suffer from semantic ambiguity where instructions are too vague for the agent to solve despite being technically feasible. Furthermore, while simple Rejection Fine-Tuning proved stable, more advanced Reinforcement Learning methods like PPO or GRPO showed higher potential but were significantly more sensitive to hyperparameters.
Future research will focus on enhancing the transferability of these learned skills across different toolsets and refining the semantic clarity of the generated instructions.
Summary updated