atlas

Research map / Graph learning / Graph algorithms and clustering

GPTSwarm: Language Agents as Optimizable Graphs

ICML 2024 · Graph learning › Graph algorithms and clustering · approach: Neural combinatorial optimization on graphs

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Represents LLM agents and multi-agent swarms as optimizable computational graphs, optimizing node prompts (history-based prompt rewriting) and edge connectivity (REINFORCE over a distribution of DAGs).

Problem

Prompt-engineering and multi-agent LLM systems are built as disparate, hand-designed code bases with fixed prompts and workflows, with no unified representation or automatic optimization of node prompts and inter-agent orchestration.

Approach

Model language agents as DAG computational graphs (nodes = operations such as LLM queries or tool use; edges = information flow) and compose agents into swarm graphs; optimize node prompts iteratively from execution history using an LLM-based prompt optimizer, and optimize edges by parameterizing a distribution over DAGs and training it with REINFORCE.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Optimize edge connections among TOT, Reflexion, and COT agentsGPTSwarm · Mini Crosswordsbest state word accuracy: 0.465(±0.0509) -> 0.575(±0.0275)Helped
Optimize prompts through node-level online updatesReAct-style agent · HumanEvalaccuracy: 0.76 -> 0.88(±0.007)Helped
Use an optimized edge distribution instead of the 0.125 parameter-valued distributionGPTSwarm · Mini Crosswordsaccuracy: 0.510(±0.0552) -> 0.575(±0.0275)Helped
Use optimized edges rather than the initial edge distributionGPTSwarm swarm with adversarial agents · MMLU validationscoreHelped
Use seven role-differentiated IO agents with optimized edges instead of the single-agent baselineGPTSwarm · MMLUscore: 2.1% ± 1.1%Helped
Use the optimized edge distribution with GPT-4-Turbo rather than Tree of Thought with GPT-4GPTSwarm · Mini Crosswordsaccuracy: 0.675 -> 0.800(±0.0616)Helped
Increase the swarm from one TOT agent to three TOT agents with Choose BestGPTSwarm · GAIA Level 1 validationaccuracy: 25.66±3.50 -> 30.18±4.30Helped
Increase the swarm from three to seven TOT agents using self-consistencyGPTSwarm · GAIA Level 1 validationaccuracy: 28.30±3.38 -> 30.56±3.25Helped
Replace Choose Best with self-consistency for three IO agents (ablation)GPTSwarm · GAIA Level 1 validationaccuracy: 15.85±0.92 -> 18.11±3.07Helped
Replace Choose Best with self-consistency for three COT agents (ablation)GPTSwarm · GAIA Level 1 validationaccuracy: 27.17±3.29 -> 27.17±4.06No clear effect
Replace Choose Best with self-consistency for three TOT agents (ablation)GPTSwarm · GAIA Level 1 validationaccuracy: 30.18±4.30 -> 28.30±3.38Hurt
Use COTFA rather than COTweb (ablation)GAIA single-agent system · GAIA Level 1 validationaccuracy: 18.87±2.67 -> 25.28±3.50Helped

Surprising findings

Limitations

Experimental setup

Datasets: MMLU Mini Crosswords HumanEval GAIA

Benchmarks: MMLU Mini Crosswords HumanEval GAIA

Metrics: accuracy average score duration (s)

Baselines: Tree of Thought (GPT-4) Chain of Thought AutoGPT GPT-4 with plugins Reflexion Direct answer baseline OPRO-style prompt optimization

Builds on: Tree of Thought Reflexion OPRO DSPy REINFORCE

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy