Fan Nie, Lan Feng, Haotian Ye, Weixin Liang, Pan Lu, Huaxiu Yao, Alexandre Alahi, James Zou
Our W4S framework operates as an iterative process of workflow generation, execution, and refinement:
- Workflow Generation: The weak meta-agent design a new workflow to leverage the given strong model, represented as executable Python code.
- Execution and Feedback.: The generated workflow is executed by a strong model on validation samples, producing performance feedback.
- Refinement: The meta-agent uses feedback to iteratively improve the workflow.
Store your API keys in key.env
:
OPENAI_API_KEY=""
ANTHROPIC_API_KEY=""
conda create -n w4s python=3.11
conda activate w4s
pip install .
conda create -n w4s python=3.11
conda activate w4s
pip install .[vllm]
If you find this work useful, please cite our paper:
@misc{nie2025weakforstrong,
title={Weak-for-Strong: Training Weak Meta-Agent to Harness Strong Executors},
author={Fan Nie and Lan Feng and Haotian Ye and Weixin Liang and Pan Lu and Huaxiu Yao and Alexandre Alahi and James Zou},
year={2025},
eprint={2504.04785},
archivePrefix={arXiv},
primaryClass={cs.AI},
url={https://arxiv.org/abs/2504.04785},
}
We thank ADAS and AFlow for their codebase and prompts.