Language Agents as Optimizable Graphs
Mingchen Zhuge, Wenyi Wang, Louis Kirsch, Francesco Faccio, Dmitrii, Khizbullin, J\"urgen Schmidhuber

TL;DR
This paper introduces a unified framework representing LLM-based agents as computational graphs, enabling automatic optimization of prompts and agent interactions to enhance problem-solving capabilities.
Contribution
It proposes a novel graph-based representation of LLM agents and introduces automatic optimizers for prompt and connectivity improvements.
Findings
Graph-based representation unifies diverse prompt engineering techniques.
Automatic optimizers improve agent performance and collaboration.
Framework enables efficient development and integration of LLM agents.
Abstract
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…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsNatural Language Processing Techniques
