Graph Reasoning with Large Language Models via Pseudo-code Prompting

Konstantinos Skianis, Giannis Nikolentzos, Michalis Vazirgiannis
9/26/2024
cs.LG

No confident code implementation found for this paper. 2 possible matches can be shown below.

Abstract

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.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 2 weaker matches are hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{skianis2024graph,
  title  = {Graph Reasoning with Large Language Models via Pseudo-code Prompting},
  author = {Konstantinos Skianis and Giannis Nikolentzos and Michalis Vazirgiannis},
  year   = {2024},
  eprint = {2409.17906},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2409.17906v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2409.17906.svg)](https://codeofpaper.com/paper/2409.17906)

Discussion