Multi-scale Swarm of Large Language Models for Python Code Generation
摘要
Learning to program effectively and efficiently is one of long-term challenges in artificial intelligence. In this paper, we propose a multi-scale swarm intelligence framework for Python code generation. This multi-scale swarm (MSS) framework is mainly built upon two relatively independent yet interacting modules: LLM-Level Role Collaboration and Prompt-Level Diversity Evolution. In large-scale experiments on a total of 1,138 Python code generation tasks, our multi-scale framework reaches 86.6% success rate in the HumanEval dataset and 80.6% success rate in the MBPP dataset, respectively. In our opinion, this is one of the first engineering applications of the recently proposed multi-scale swarm intelligence framework on complex artificial intelligence tasks.