GraphTeam: Facilitating Large Language Model-based Graph Analysis via Multi-Agent Collaboration

Xin Li,Qizhi Chu,Yubin Chen,Yang Liu,Yaoqi Liu,Zekai Yu,Weize Chen,Chen Qian,Chuan Shi,Cheng Yang
2024-10-24
Abstract:Graphs are widely used for modeling relational data in real-world scenarios, such as social networks and urban computing. Existing LLM-based graph analysis approaches either integrate graph neural networks (GNNs) for specific machine learning tasks, limiting their transferability, or rely solely on LLMs' internal reasoning ability, resulting in suboptimal performance. To address these limitations, we take advantage of recent advances in LLM-based agents, which have shown capabilities of utilizing external knowledge or tools for problem solving. By simulating human problem-solving strategies such as analogy and collaboration, we propose a multi-agent system based on LLMs named GraphTeam, for graph analysis. GraphTeam consists of five LLM-based agents from three modules, and the agents with different specialities can collaborate with each other to address complex problems. Specifically, (1) input-output normalization module: the question agent extracts and refines four key arguments from the original question, facilitating the problem understanding, and the answer agent organizes the results to meet the output requirement; (2) external knowledge retrieval module: we first build a knowledge base consisting of relevant documentation and experience information, and then the search agent retrieves the most relevant entries for each question. (3) problem-solving module: given the retrieved information from search agent, the coding agent uses established algorithms via programming to generate solutions, and in case the coding agent does not work, the reasoning agent will directly compute the results without programming. Extensive experiments on six graph analysis benchmarks demonstrate that GraphTeam achieves state-of-the-art performance with an average 25.85% improvement over the best baseline in terms of accuracy. The code and data are available at <a class="link-external link-https" href="https://github.com/BUPT-GAMMA/GraphTeam" rel="external noopener nofollow">this https URL</a>.
Artificial Intelligence,Computation and Language,Multiagent Systems
What problem does this paper attempt to address?
### What problems does this paper attempt to solve? The paper "GraphTeam: Facilitating Large Language Model - based Graph Analysis via Multi - Agent Collaboration" aims to solve two main problems in the existing graph analysis methods based on large language models (LLMs): 1. **Limitations**: - **Limitations of specific tasks**: The existing graph analysis methods based on LLMs either combine graph neural networks (GNNs) with LLMs for specific machine learning tasks (such as node classification), which limits their transferability in general graph analysis problems. - **Limitations of internal reasoning ability**: Some other methods rely entirely on the internal reasoning ability of LLMs, resulting in poor performance because these methods do not utilize external knowledge or tools. 2. **Solutions**: - **Multi - agent system**: To overcome the above limitations, the authors propose a multi - agent system based on LLMs - GraphTeam. This system solves complex graph analysis problems by using multiple agents with different specialties through simulating human problem - solving strategies (such as analogy and collaboration). - **Core modules**: - **Input - output normalization module**: It includes a Question Agent and an Answer Agent. The Question Agent extracts and refines key parameters (such as graph type and output format) from the original question to help the system better understand the question; the Answer Agent organizes the results into a format that meets the requirements. - **External knowledge retrieval module**: It includes a Search Agent, which retrieves relevant information from the constructed knowledge base to enhance the problem - solving process. - **Problem - solving module**: It includes a Coding Agent and a Reasoning Agent. The Coding Agent attempts to write Python code to solve the problem. If the code cannot be executed normally, it will fix the error through a retry mechanism; if multiple retries fail, the Reasoning Agent will directly perform reasoning without programming. Through these designs, GraphTeam can achieve state - of - the - art performance in multiple graph analysis benchmark tests, with an average accuracy improvement of 25.85%.