Share your thoughts, 1 month free Claude Pro on usSee more
WorkDL logo mark

Language Agents as Optimizable Graphs

About

Various human-designed prompt engineering techniques have been proposed to improve problem solvers based on Large Language Models (LLMs), yielding many disparate code bases. We unify these approaches by describing LLM-based agents as computational graphs. The nodes implement functions to process multimodal data or query LLMs, and the edges describe the information flow between operations. Graphs can be recursively combined into larger composite graphs representing hierarchies of inter-agent collaboration (where edges connect operations of different agents). Our novel automatic graph optimizers (1) refine node-level LLM prompts (node optimization) and (2) improve agent orchestration by changing graph connectivity (edge optimization). Experiments demonstrate that our framework can be used to efficiently develop, integrate, and automatically improve various LLM agents. The code can be found at https://github.com/metauto-ai/gptswarm.

Mingchen Zhuge, Wenyi Wang, Louis Kirsch, Francesco Faccio, Dmitrii Khizbullin, J\"urgen Schmidhuber• 2024

Related benchmarks

TaskDatasetResultRank
Mathematical ReasoningGSM8K (test)
Accuracy89.1
954
Code GenerationHumanEval (test)--
612
Multi-task Language UnderstandingMMLU
MMLU Accuracy63.5
442
Code GenerationMBPP (test)--
405
Multi-hop Question AnsweringHotpotQA (test)
F173.2
311
Multitask Language UnderstandingMMLU--
263
ReasoningMMLU-Pro
Accuracy82.86
241
Code GenerationHumanEval
Accuracy93.7
217
Mathematical ReasoningGSM8K--
204
MathematicsAIME25
Accuracy36.67
103
Showing 10 of 18 rows

Other info

Follow for update