Lune

KDD2026Top-tier venue

GraphSkill: Documentation-Guided Agentic Hierarchical Retrieval-Augmented Coding for Complex Graph Reasoning

Fali Wang, Chenglin Weng, Xianren Zhang, Siyuan Hong, Hui Liu, Suhang Wang

Abstract

The growing demand for automated graph algorithm reasoning has attracted increasing attention in the large language model (LLM) community. Recent LLM-based graph reasoning methods typically decouple task descriptions from graph data, generate executable code augmented by retrieval from technical documentation, and refine the code through debugging. However, we identify two key limitations in existing approaches: (i) they treat technical documentation as flat text collections and ignore its hierarchical structure, leading to noisy retrieval that degrades code generation quality; and (ii) their debugging mechanisms focus primarily on runtime errors, yet ignore more critical logical errors. To address them, we propose GraphSkill, an agentic hierarchical retrieval-augmented coding framework that exploits the document hierarchy through top-down traversal and early pruning, together with a self-debugging coding agent that iteratively refines code using automatically generated small-scale test cases. To enable comprehensive evaluation of complex graph reasoning, we introduce a new dataset, ComplexGraph, covering small-scale, large-scale, and composite graph reasoning tasks. Extensive experiments show that our method achieves higher task accuracy and lower inference cost compared to baselines.

Ask Lune

Know where this paper stands in minutes, not an afternoon.

Lune can read the top-tier papers that cite it and the ones closest to it, and tells you what it claims, what came after and where it falls short, each point cited to the paper it comes from. No skimming, no AI slop.

Questions to start from

Lune can draw on

its abstract · related work

Get the answer

Free to start. No credit card required.

Related papers

  1. Zero-shot Graph Reasoning via Retrieval Augmented Framework with LLMsHanqing Li, Sharika Mahadevan, Kiran Sheena Jyothi, Henry Liang et al.EMNLP Findings 2025
  2. GraphScout: Empowering Large Language Models with Intrinsic Exploration Ability for Agentic Graph ReasoningYuchen Ying, Weiqi Jiang, Tongya Zheng, Yu Wang et al.KDD 2026 · 2 citations
  3. KG-Agent: An Efficient Autonomous Agent Framework for Complex Reasoning over Knowledge GraphJinhao Jiang, Kun Zhou, Xin Zhao, Yang Song et al.ACL 2025
  4. GRASP: Graph Reasoning via Agentic Solving and Probing of LLMsXiaojun Guo, Mingxue Tian, Chenheng Zhang, Xiaohan Wang et al.ICML 2026
  5. You Don't Need Pre-Built Graphs for RAG: Retrieval Augmented Generation with Adaptive Reasoning StructuresShengyuan Chen, Chuang Zhou, Zheng Yuan, Qinggang Zhang et al.AAAI 2026 · 14 citations
Dusk over the sea between two cliffs drawn in fine vertical lines