LGSep 26, 2024

Graph Reasoning with Large Language Models via Pseudo-code Prompting

arXiv:2409.17906v18 citationsh-index: 57
Originality Incremental advance
AI Analysis

This work addresses the challenge of enhancing LLMs' graph reasoning abilities for researchers and practitioners in AI and NLP, though it is incremental as it builds on existing prompting methods.

The paper tackles the problem of improving large language models' (LLMs) performance on graph reasoning tasks, such as counting connected components or computing shortest paths, by using pseudo-code prompting, and the result shows that this approach generally enhances the performance of all tested LLMs.

Large language models (LLMs) have recently achieved remarkable success in various reasoning tasks in the field of natural language processing. This success of LLMs has also motivated their use in graph-related tasks. Among others, recent work has explored whether LLMs can solve graph problems such as counting the number of connected components of a graph or computing the shortest path distance between two nodes. Although LLMs possess preliminary graph reasoning abilities, they might still struggle to solve some seemingly simple problems. In this paper, we investigate whether prompting via pseudo-code instructions can improve the performance of LLMs in solving graph problems. Our experiments demonstrate that using pseudo-code instructions generally improves the performance of all considered LLMs. The graphs, pseudo-code prompts, and evaluation code are publicly available.

Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes