AAAI 2026 β’ Poster
This is the official repository for the paper "Beyond ReAct: A Planner-Centric Framework for Complex Tool-Augmented LLM Reasoning". Our paper was accepted at the AAAI 2026.
βββ ComplexTool-Plan/ # Large-scale benchmark and training data
β βββ train_data/ # Data
β βββ generation/ # Scripts for generating complex DAG workflows
β βββ evaluate/ # Graded evaluation sets (Easy & Hard splits)
βββ RL_Hierarchical_Rewards/ # GRPO Reinforcement Learning logic
β βββ reward_function.py # Multi-level reward (Syntax, Cycle, Connectivity, Fidelity)
βββ StableToolBench/ # End-to-end execution evaluation environment
β βββ toolbench/ # Core execution engine
β βββ solvable_queries/ # Standardized test cases for SOTA comparison
βββ Scripts/ # Utility scripts for training and inference
βββ Features/ # Documentation and technical illustrations
Unlike the reactive "step-by-step" approach of ReAct, our framework decouples planning from execution. The dedicated Planner model generates a Directed Acyclic Graph (DAG) in a single forward pass, enabling:
ComplexTool-Plan/generation for the DAG generation logic.We introduce a large-scale, high-fidelity dataset featuring 4,500+ real-world APIs. It serves as both a training ground and a rigorous evaluation standard:
ComplexTool-Plan/train_data and ComplexTool-Plan/evaluate.We elicit advanced reasoning capabilities through a systematic two-stage training methodology:
RL_Hierarchical_Rewards.Beyond ReAct establishes a new performance frontier in tool-augmented reasoning:
StableToolBench.Our framework demonstrates a clear scaling law in planning robustness. As task complexity grows (from Easy to Hard), the DAG-optimized Planner exhibits a much more graceful performance decline compared to sequential models, proving its resilience in handling intricate, multi-tool workflows.
We recommend using separate environments or a unified container for SFT and RL tasks.
# Install core dependencies
pip install torch==2.5.1 torchvision==0.20.1 torchaudio==2.5.1 vllm==0.6.5
# Setup LLaMA-Factory
git clone --depth 1 https://github.com/hiyouga/LLaMA-Factory.git
cd LLaMA-Factory
pip install -e ".[metrics,vllm]"
cd ..
# Setup verl for GRPO
git clone https://github.com/volcengine/verl.git
cd verl
pip install -e .
# Install execution backends (vLLM & Flash-Attention)
# Use USE_MEGATRON=0 for FSDP (Recommended for SLMs)
USE_MEGATRON=0 bash scripts/install_vllm_sglang_mcore.sh
cd ..
The dataset generation follows a strict three-stage reverse-engineering pipeline located in ./ComplexTool-Plan/generation/.
| Stage | Description | Command |
|---|---|---|
| Step 1 | Workflow Generation: Author DAG plans from tool library. | python generation/01_workflow.py --difficulty hard --workers 20 |
| Step 2 | Query Reverse-Engineering: Generate intents from DAGs. | python generation/02_reverse.py --difficulty hard --workers 20 |
| Step 3 | Validation: Re-plan to filter high-fidelity pairs. | python generation/03_replan.py --difficulty hard --workers 20 |
We perform full-parameter SFT on Qwen3 models to establish basic DAG syntax capabilities.
train.json to ./LLaMA-Factory/data/../LLaMA-Factory/data/dataset_info.json:
"complextool_sft": { "file_name": "train.json" }
llamafactory-cli train examples/train_full/qwen3_8b_full_sft.yaml
We use the GRPO algorithm to refine the Planner's global awareness. The core innovation is our Hierarchical Reward Function, which terminates early on structural failures.
Reward Logic: Located in ./RL_Hierarchical_Rewards/reward_function.py.
Hierarchical Levels:
Run GRPO:
# Ensure your SFT checkpoint is ready as the actor's initial weights
python -m verl.trainer.main_ppo \
algorithm.type=grpo \
model.partial_pretrain=path/to/sft_checkpoint \
reward_model.reward_algo=hierarchical \
trainer.n_gpus=8 \
... \
Run batch inference and calculate node/edge-level metrics on the ComplexTool-Plan evaluation set.
cd ./ComplexTool-Plan/evaluate
# 1. Batch Inference with vLLM
python inference.py --model_path ../../models/qwen3_8b_rl --query_path ./hard/evaluate.json
# 2. Results Merging & Cleaning
python data_process.py --output_path ./results/raw_output.json --evaluate_path ./hard/evaluate.json
# 3. Calculate Precision/Recall/F1/EM
python accuracy.py --input_file ./results/merged_final.json
We evaluate the integrated system on StableToolBench to measure real-world performance. This phase involves deploying a virtual API server, running the parallel execution pipeline, and conducting a multi-dimensional analysis (Success, Preference, and Efficiency).
To ensure reproducibility and handle API instability, we use a virtual server that intercepts requests.
Response Logic:
gpt-4-turbo-preview generates a logically consistent response.Server Setup:
toolenv and tool_response_cache from the ToolBench Data Release.StableToolBench/server/config.yml:
api_key: "YOUR_OPENAI_KEY"
model: ""
toolbench_url: ""
is_save: True # Save new simulations to ./tool_response_new_cache
port:
cd StableToolBench/server
python main.py
Our framework decouples the Planner (Qwen-RL) from the Executor (GPT-4o/ToolLLaMA).
Ensure your data is organized as follows for the evaluation scripts to recognize:
data/
βββ toolenv/ # API definitions
output/
βββ answer/ # Raw model outputs
βββ model_predictions/ # Converted format for GPT evaluation
βββ pass_rate_results/ # Final metric files
We provide a unified script run_qa_pipeline_multithread.sh with the following key arguments:
backbone_model: chatgpt_function (Proprietary) or toolllama_net (Open-source/Ours).method:
CoT@1: Standard ReAct baseline.DFS_woFilter_w2: DFSDT tree-search baseline.DAG_Plan: Our Beyond ReAct (Planner-centric DAG).test_set: Covers 6 subsets (e.g., G1_instruction for I1-Inst, G3_instruction for I3-Inst).model_url: The endpoint for your trained Planner/Executor.Run Inference Example:
# Evaluate Beyond ReAct (DTA-Llama) on I3-Inst subset
sh run_qa_pipeline_multithread.sh \
toolllama_net \
DAG_Plan \
G3_instruction \
http://YOUR_SERVER_IP:PORT/llama_parse_parallel
Beyond simple success rates, we conduct a granular analysis of the agent's behavior.
We use the StableToolEval protocol (GPT-4 as a judge) to ensure objective assessment:
sh run_convert_answer.sh ./output/answer/DAG_Plan_G3
sh run_pass_rate.sh ./output/model_predictions/DAG_Plan_G3 G3_instruction
sh run_preference.sh ./output/model_predictions/DAG_Plan_G3 G3_instruction
If you find the project helpful, please cite:
@article{wei2025beyond,
title={Beyond ReAct: A Planner-Centric Framework for Complex Tool-Augmented LLM Reasoning},
author={Wei, Xiaolong and Dong, Yuehu and Wang, Xingliang and Zhang, Xingyu and Zhao, Zhejun and Shen, Dongdong and Xia, Long and Yin, Dawei},
journal={arXiv preprint arXiv:2511.10037},
year={2025}
}
1 commits
Python
99.5%
AAAI 2026 β’ Poster
This is the official repository for the paper "Beyond ReAct: A Planner-Centric Framework for Complex Tool-Augmented LLM Reasoning". Our paper was accepted at the AAAI 2026.
βββ ComplexTool-Plan/ # Large-scale benchmark and training data
β βββ train_data/ # Data
β βββ generation/ # Scripts for generating complex DAG workflows
β βββ evaluate/ # Graded evaluation sets (Easy & Hard splits)
βββ RL_Hierarchical_Rewards/ # GRPO Reinforcement Learning logic
β βββ reward_function.py # Multi-level reward (Syntax, Cycle, Connectivity, Fidelity)
βββ StableToolBench/ # End-to-end execution evaluation environment
β βββ toolbench/ # Core execution engine
β βββ solvable_queries/ # Standardized test cases for SOTA comparison
βββ Scripts/ # Utility scripts for training and inference
βββ Features/ # Documentation and technical illustrations
Unlike the reactive "step-by-step" approach of ReAct, our framework decouples planning from execution. The dedicated Planner model generates a Directed Acyclic Graph (DAG) in a single forward pass, enabling:
ComplexTool-Plan/generation for the DAG generation logic.We introduce a large-scale, high-fidelity dataset featuring 4,500+ real-world APIs. It serves as both a training ground and a rigorous evaluation standard:
ComplexTool-Plan/train_data and ComplexTool-Plan/evaluate.We elicit advanced reasoning capabilities through a systematic two-stage training methodology:
RL_Hierarchical_Rewards.Beyond ReAct establishes a new performance frontier in tool-augmented reasoning:
StableToolBench.Our framework demonstrates a clear scaling law in planning robustness. As task complexity grows (from Easy to Hard), the DAG-optimized Planner exhibits a much more graceful performance decline compared to sequential models, proving its resilience in handling intricate, multi-tool workflows.
We recommend using separate environments or a unified container for SFT and RL tasks.
# Install core dependencies
pip install torch==2.5.1 torchvision==0.20.1 torchaudio==2.5.1 vllm==0.6.5
# Setup LLaMA-Factory
git clone --depth 1 https://github.com/hiyouga/LLaMA-Factory.git
cd LLaMA-Factory
pip install -e ".[metrics,vllm]"
cd ..
# Setup verl for GRPO
git clone https://github.com/volcengine/verl.git
cd verl
pip install -e .
# Install execution backends (vLLM & Flash-Attention)
# Use USE_MEGATRON=0 for FSDP (Recommended for SLMs)
USE_MEGATRON=0 bash scripts/install_vllm_sglang_mcore.sh
cd ..
The dataset generation follows a strict three-stage reverse-engineering pipeline located in ./ComplexTool-Plan/generation/.
| Stage | Description | Command |
|---|---|---|
| Step 1 | Workflow Generation: Author DAG plans from tool library. | python generation/01_workflow.py --difficulty hard --workers 20 |
| Step 2 | Query Reverse-Engineering: Generate intents from DAGs. | python generation/02_reverse.py --difficulty hard --workers 20 |
| Step 3 | Validation: Re-plan to filter high-fidelity pairs. | python generation/03_replan.py --difficulty hard --workers 20 |
We perform full-parameter SFT on Qwen3 models to establish basic DAG syntax capabilities.
train.json to ./LLaMA-Factory/data/../LLaMA-Factory/data/dataset_info.json:
"complextool_sft": { "file_name": "train.json" }
llamafactory-cli train examples/train_full/qwen3_8b_full_sft.yaml
We use the GRPO algorithm to refine the Planner's global awareness. The core innovation is our Hierarchical Reward Function, which terminates early on structural failures.
Reward Logic: Located in ./RL_Hierarchical_Rewards/reward_function.py.
Hierarchical Levels:
Run GRPO:
# Ensure your SFT checkpoint is ready as the actor's initial weights
python -m verl.trainer.main_ppo \
algorithm.type=grpo \
model.partial_pretrain=path/to/sft_checkpoint \
reward_model.reward_algo=hierarchical \
trainer.n_gpus=8 \
... \
Run batch inference and calculate node/edge-level metrics on the ComplexTool-Plan evaluation set.
cd ./ComplexTool-Plan/evaluate
# 1. Batch Inference with vLLM
python inference.py --model_path ../../models/qwen3_8b_rl --query_path ./hard/evaluate.json
# 2. Results Merging & Cleaning
python data_process.py --output_path ./results/raw_output.json --evaluate_path ./hard/evaluate.json
# 3. Calculate Precision/Recall/F1/EM
python accuracy.py --input_file ./results/merged_final.json
We evaluate the integrated system on StableToolBench to measure real-world performance. This phase involves deploying a virtual API server, running the parallel execution pipeline, and conducting a multi-dimensional analysis (Success, Preference, and Efficiency).
To ensure reproducibility and handle API instability, we use a virtual server that intercepts requests.
Response Logic:
gpt-4-turbo-preview generates a logically consistent response.Server Setup:
toolenv and tool_response_cache from the ToolBench Data Release.StableToolBench/server/config.yml:
api_key: "YOUR_OPENAI_KEY"
model: ""
toolbench_url: ""
is_save: True # Save new simulations to ./tool_response_new_cache
port:
cd StableToolBench/server
python main.py
Our framework decouples the Planner (Qwen-RL) from the Executor (GPT-4o/ToolLLaMA).
Ensure your data is organized as follows for the evaluation scripts to recognize:
data/
βββ toolenv/ # API definitions
output/
βββ answer/ # Raw model outputs
βββ model_predictions/ # Converted format for GPT evaluation
βββ pass_rate_results/ # Final metric files
We provide a unified script run_qa_pipeline_multithread.sh with the following key arguments:
backbone_model: chatgpt_function (Proprietary) or toolllama_net (Open-source/Ours).method:
CoT@1: Standard ReAct baseline.DFS_woFilter_w2: DFSDT tree-search baseline.DAG_Plan: Our Beyond ReAct (Planner-centric DAG).test_set: Covers 6 subsets (e.g., G1_instruction for I1-Inst, G3_instruction for I3-Inst).model_url: The endpoint for your trained Planner/Executor.Run Inference Example:
# Evaluate Beyond ReAct (DTA-Llama) on I3-Inst subset
sh run_qa_pipeline_multithread.sh \
toolllama_net \
DAG_Plan \
G3_instruction \
http://YOUR_SERVER_IP:PORT/llama_parse_parallel
Beyond simple success rates, we conduct a granular analysis of the agent's behavior.
We use the StableToolEval protocol (GPT-4 as a judge) to ensure objective assessment:
sh run_convert_answer.sh ./output/answer/DAG_Plan_G3
sh run_pass_rate.sh ./output/model_predictions/DAG_Plan_G3 G3_instruction
sh run_preference.sh ./output/model_predictions/DAG_Plan_G3 G3_instruction
If you find the project helpful, please cite:
@article{wei2025beyond,
title={Beyond ReAct: A Planner-Centric Framework for Complex Tool-Augmented LLM Reasoning},
author={Wei, Xiaolong and Dong, Yuehu and Wang, Xingliang and Zhang, Xingyu and Zhao, Zhejun and Shen, Dongdong and Xia, Long and Yin, Dawei},
journal={arXiv preprint arXiv:2511.10037},
year={2025}
}
1 commits
Python
99.5%