Skip to content

SynWorld: Virtual Scenario Synthesis for Agentic Action Knowledge Refinement

License

Notifications You must be signed in to change notification settings

zjunlp/SynWorld

Folders and files

NameName
Last commit message
Last commit date

Latest commit

447e727 · Apr 14, 2025

History

5 Commits
Apr 14, 2025
Dec 18, 2024
Apr 14, 2025

Repository files navigation

SynWorld

Virtual Scenario Synthesis for Agentic Action Knowledge Refinement

📄arXiv🤗HFPaper

License: MIT

Table of Contents


🌻Acknowledgement

Our code of training module is referenced and adapted from StableToolbench, Aflow, Draft. And the Dataset is collected from ToolBench, HotpotQA. Our end-to-end evaluation module is based on Stable ToolBench, HotpotQA. Thanks for their great contributions!

🌟Overview

In the interaction between agents and their environments, agents expand their capabilities by planning and executing actions. However, LLM-based agents face substantial challenges when deployed in novel environments or required to navigate unconventional action spaces. To empower agents to autonomously explore environments, optimize workflows, and enhance their understanding of actions, we propose SynWorld, a framework that allows agents to synthesize possible scenarios with multi-step action invocation within the action space and perform Monte Carlo Tree Search (MCTS) exploration to effectively refine their action knowledge in the current environment. Our experiments demonstrate that SynWorld is an effective and general approach to learning action knowledge in new environments

🔧Installation

git clone https://github.com/zjunlp/SynWorld
cd SynWorld
pip install -r requirements.txt

✏️ToolBench-API-Deploy

git clone https://github.com/THUNLP-MT/StableToolBench.git
cd StableToolBench
pip install requirements.txt
cd server
python main.py

📝MCTS—refine

Generate workflow with local llm api

cd SynWrold/src
python PlanAlign.py \
    --model qwen-max \
    --max_rounds 15 \
    --dataset Toolbench \
    --validate_nums 100 \
    --max_workers 16 \
    --mode dev \
    --overwrite
  

🤔ActionKnowledge-Evaluation

Evaluation the workflow of node n

cd SynWrold/src
python PlanAlign.py \
    --model qwen-max \
    --dataset Toolbench \
    --validate_nums 100 \
    --max_workers 16 \
    --mode test \
    --test_round the_round_num_you_select(eg. 100 in our experiment) \
    --overwrite
  

🚩Citation

If this work is helpful, please kindly cite as:

@article{fang2025synworld,
  title={SynWorld: Virtual Scenario Synthesis for Agentic Action Knowledge Refinement},
  author={Fang, Runnan and Wang, Xiaobin and Liang, Yuan and Qiao, Shuofei and Wu, Jialong and Xi, Zekun and Zhang, Ningyu and Jiang, Yong and Xie, Pengjun and Huang, Fei and others},
  journal={arXiv preprint arXiv:2504.03561},
  year={2025}
}