Graph Reasoning with Large Language Models via Pseudo-code Prompting
On the map: LLM reasoning → Knowledge- and tool-augmented reasoning
Abstract (arXiv)
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.
Key facts. Cited by 5 papers in the map (data through 7 Oct 2026). Placed in Knowledge- and tool-augmented reasoning, one of 17 directions in LLM reasoning. Builds on 7 of its 34 references that are in the map. First posted on arXiv 26 Sep 2024.
Builds on
7 of 34 references.
Closest ancestors · 1
Same direction, newest first
Other references · 6
- 2023Sparks of Artificial General Intelligence: Early experiments with GPT-4cited by 2,579
- 2023GPT4Graph: Can Large Language Models Understand Graph Structured Data ? An Empirical Evaluation and Benchmarkingcited by 209
- 2024Let Your Graph Do the Talking: Encoding Structured Data for LLMscited by 112
- 2023SimTeG: A Frustratingly Simple Approach Improves Textual Graph Learningcited by 73
- 2024GraphEdit: Large Language Models for Graph Structure Learningcited by 33
- 2023Large Language Models as Topological Structure Enhancers for Text-Attributed Graphscited by 27
Built on by
Citing papers per year: 2024: 2; 2025: 3.
5 papers.
- 2025GraphThought: Graph Combinatorial Optimization with Thought Generationcited by 9
- 2025Graph Counselor: Adaptive Graph Exploration via Multi-Agent Synergy to Enhance LLM Reasoningcited by 6
- 2024Graph Linearization Methods for Reasoning on Graphs with Large Language Modelscited by 5
- 2024MultiLingPoT: Enhancing Mathematical Reasoning with Multilingual Program Fine-tuningcited by 1
- 2025Zero-shot Graph Reasoning via Retrieval Augmented Framework with LLMscited by 1
- 2025Zero-shot Graph Reasoning via Retrieval Augmented Framework with LLMs16 Sep 2025
- 2025Graph Counselor: Adaptive Graph Exploration via Multi-Agent Synergy to Enhance LLM Reasoning4 Jun 2025
- 2025GraphThought: Graph Combinatorial Optimization with Thought Generation17 Feb 2025
- 2024MultiLingPoT: Enhancing Mathematical Reasoning with Multilingual Program Fine-tuning17 Dec 2024
- 2024Graph Linearization Methods for Reasoning on Graphs with Large Language Models25 Oct 2024
Similar, not cited
Close in wording, no citation either way
- 2025Rethinking and Benchmarking Large Language Models for Graph Reasoning
- 2026Are Large Language Models Suitable for Graph Computation? Progress and Prospects
- 2024Can LLMs perform structured graph reasoning?
- 2024Revisiting the Graph Reasoning Ability of Large Language Models: Case Studies in Translation, Connectivity and Shortest Path
- 2024CodeGraph: Enhancing Graph Reasoning of LLMs with Code
- 2023Can Language Models Solve Graph Problems in Natural Language?
- 2023GraphReason: Enhancing Reasoning Capabilities of Large Language Models through A Graph-Based Verification Approach
- 2025Exploring Graph Learning Tasks with Pure LLMs: A Comprehensive Benchmark and Investigation