GraphICL: Unlocking Graph Learning Potential in LLMs through Structured Prompt Design
Abstract
The growing importance of textual and relational systems has driven interest in enhancing large language models (LLMs) for graph-structured data, particularly Text-Attributed Graphs (TAGs), where samples are represented by textual descriptions interconnected by edges. While research has largely focused on developing specialized graph LLMs through task-specific instruction tuning, a comprehensive benchmark for evaluating LLMs solely through prompt design remains surprisingly absent. Without such a carefully crafted evaluation benchmark, most if not all, tailored graph LLMs are compared against general LLMs using simplistic queries (e.g., zero-shot reasoning with LLaMA), which can potentially camouflage many advantages as well as unexpected predicaments of them. To achieve more general evaluations and unveil the true potential of LLMs for graph tasks, we introduce Graph In-context Learning (GraphICL) Benchmark, a comprehensive benchmark comprising novel prompt templates designed to capture graph structure and handle limited label knowledge. Our systematic evaluation shows that general-purpose LLMs equipped with our GraphICL outperform state-of-the-art specialized graph LLMs and graph neural network models in resource-constrained settings and out-of-domain tasks. These findings highlight the significant potential of prompt engineering to enhance LLM performance on graph learning tasks without training and offer a strong baseline for advancing research in graph LLMs.
Benchmark Results
Tested on 3 datasets 5 baseline values reported too low
Tables show presented results in global context (best 3 papers + GCN + MLP).
Classic
| # | Model | Accuracy ↑ | Paper |
|---|---|---|---|
| 1 | GraphTARIF | 0.9703
±0.0019 | |
| 2 | GAT | 0.9669
±0.0014 | |
| 3 | GAT+T | 0.9660
±0.0007 | |
| 7 | SAGE | 0.9643
±0.0027 | |
| 390 | MLP | 0.9128
±0.0063 | |
| 508 | SAGE (GIA) | 0.8512 | This paper |
| 515 | RevGAT (GIA) | 0.8438 | This paper |
| 516 | GCN (GIA) | 0.8427 | This paper |
| 517 | MLP (GIA) | 0.8413 | This paper |
| 527 | GraphICL-LLaMA3-S1 | 0.8089 | This paper |
| 533 | GraphICL-LLaMA3-S2 | 0.7918 | This paper |
| # | Model | Accuracy ↑ | Paper |
|---|---|---|---|
| 1 | GraphTARIF | 0.9461
±0.0017 | |
| 2 | GCN | 0.9412
±0.0008 best reported | best at pub: Diss-l-ECT: Dissecting Graph Data with local Euler Characteristic Transforms (ICML 2024) |
| 3 | GAT | 0.9398
±0.0022 | |
| 8 | SAGE | 0.9351
±0.0006 best reported | best at pub: Automatic Graph Topology-Aware Transformer (2024) |
| 46 | GraphSAGE | 0.9120
±0.0029 | |
| 241 | GraphICL-LLaMA3-S1 | 0.8737 | This paper |
| 242 | GraphICL-LLaMA3-S2 | 0.8737 | This paper |
| 254 | GraphICL-LLaMA2-S1 | 0.8706 | This paper |
| 255 | LLAGA-ND | 0.8699 | This paper |
| 309 | GraphICL-LLaMA2-S2 | 0.8511 | This paper |
| 320 | MLP | 0.8463 | |
| 436 | LLAGA-HO | 0.7878 | This paper |
| 439 | GraphPrompter | 0.7838 | This paper |
| 462 | RevGAT | 0.7316 | This paper |
| 482 | MLP+LLM_features | 0.6174 | This paper |
| 485 | LLaMA3-70b-Instruct | 0.5742 | This paper |
| 490 | LLaMA2-13b-Chat | 0.4748 | This paper |
| 495 | GraphTranslator | 0.3895 | This paper |
OGB
| # | Model | Accuracy ↑ | Paper |
|---|---|---|---|
| 1 | Jacobi | 0.8968 | |
| 2 | GPR | 0.8953 | |
| 3 | LEMP4HG | 0.8939 | |
| 4 | SAGE | 0.8933 best reported | best at pub: Node Identifiers: Compact, Discrete Representations for Efficient Graph Learning (ICLR 2024) |
| 6 | GCN | 0.8868 best reported | best at pub: Towards Graph Foundation Models: Learning Generalities Across Graphs via Task-Trees (ICML 2024) |
| 8 | RevGAT | 0.8859 best reported | |
| 27 | MLP+LLM_features | 0.8634 best reported | |
| 49 | LLAGA-HO | 0.8467 best reported | best today: Clustering as Reasoning: A $k$-Means Interpretation of Chain-of-Thought Graph Learning (ICML 2026) |
| 50 | LLAGA-ND | 0.8460 best reported | best today: Clustering as Reasoning: A $k$-Means Interpretation of Chain-of-Thought Graph Learning (ICML 2026) |
| 83 | GraphSAGE | 0.8287 | |
| 109 | GraphICL-LLaMA3-S1 | 0.8148 | This paper |
| 126 | GraphICL-LLaMA3-S2 | 0.8104 | This paper |
| 160 | GraphPrompter | 0.7954 best reported | best at pub: How to Make LMs Strong Node Classifiers? (2024) |
| 196 | GraphICL-LLaMA2-S1 | 0.7884 | This paper |
| 217 | GraphICL-LLaMA2-S2 | 0.7827 | This paper |
| 351 | MLP | 0.6605
±0.0020 | |
| 377 | LLaMA3-70b-Instruct | 0.5762 | This paper |
| 378 | LLaMA2-13b-Chat | 0.5734 | This paper |
| 388 | GraphTranslator | 0.4132 | This paper |
