GPTSwarm: Language Agents as Optimizable Graphs

GPTSwarm: Language Agents as Optimizable Graphs

22 Aug 2024 | Mingchen Zhuge, Wenyi Wang, Louis Kirsch, Francesco Faccio, Dmitrii Khizbullin, Jürgen Schmidhuber
GPTSwarm is a framework that represents language agents as computational graphs, unifying various prompt engineering techniques for Large Language Models (LLMs). The nodes in these graphs implement functions to process multimodal data or query LLMs, while the edges describe the information flow between operations. The framework allows for the recursive combination of graphs into larger composite graphs, representing hierarchies of inter-agent collaboration. GPTSwarm introduces automatic graph optimizers to refine node-level LLM prompts and improve agent orchestration by changing graph connectivity. Experiments demonstrate the framework's effectiveness in developing, integrating, and automatically improving various LLM agents across multiple benchmarks, including MMLU, Mini CrossWords, HumanEval, and GAIA. The code for GPTSwarm is available at [https://gptswarm.org](https://gptswarm.org).GPTSwarm is a framework that represents language agents as computational graphs, unifying various prompt engineering techniques for Large Language Models (LLMs). The nodes in these graphs implement functions to process multimodal data or query LLMs, while the edges describe the information flow between operations. The framework allows for the recursive combination of graphs into larger composite graphs, representing hierarchies of inter-agent collaboration. GPTSwarm introduces automatic graph optimizers to refine node-level LLM prompts and improve agent orchestration by changing graph connectivity. Experiments demonstrate the framework's effectiveness in developing, integrating, and automatically improving various LLM agents across multiple benchmarks, including MMLU, Mini CrossWords, HumanEval, and GAIA. The code for GPTSwarm is available at [https://gptswarm.org](https://gptswarm.org).
Reach us at info@study.space
[slides and audio] Language Agents as Optimizable Graphs