Pseudocode-Injection Magic: Enabling LLMs to Tackle Graph Computational Tasks
Chang Gong, Wanrui Bian, Zhijie Zhang, Weiguo Zheng

TL;DR
This paper introduces PIE, a framework that enables large language models to better understand and solve graph computational tasks by injecting pseudocode into prompts, reducing inference costs and improving accuracy.
Contribution
The paper presents a novel pseudocode-injection framework that enhances LLM reasoning for graph tasks, significantly lowering inference costs and boosting performance.
Findings
PIE outperforms existing methods in accuracy.
PIE reduces inference costs by reusing generated code.
PIE demonstrates improved efficiency and effectiveness in graph tasks.
Abstract
Graph computational tasks are inherently challenging and often demand the development of advanced algorithms for effective solutions. With the emergence of large language models (LLMs), researchers have begun investigating their potential to address these tasks. However, existing approaches are constrained by LLMs' limited capability to comprehend complex graph structures and their high inference costs, rendering them impractical for handling large-scale graphs. Inspired by human approaches to graph problems, we introduce a novel framework, PIE (Pseudocode-Injection-Enhanced LLM Reasoning for Graph Computational Tasks), which consists of three key steps: problem understanding, prompt design, and code generation. In this framework, LLMs are tasked with understanding the problem and extracting relevant information to generate correct code. The responsibility for analyzing the graph…
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.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSemantic Web and Ontologies · Topic Modeling
