BYOKG-RAG: Multi-Strategy Graph Retrieval for Knowledge Graph Question Answering

Costas Mavromatis, Soji Adeshina, Vassilis N. Ioannidis, Zhen Han, Qi Zhu +4 more
7/5/2025
cs.CL

Official code: awslabs/graphrag-toolkit (445 stars, Apache-2.0, last commit 2026-04-28).

Abstract

Knowledge graph question answering (KGQA) presents significant challenges due to the structural and semantic variations across input graphs. Existing works rely on Large Language Model (LLM) agents for graph traversal and retrieval; an approach that is sensitive to traversal initialization, as it is prone to entity linking errors and may not generalize well to custom ("bring-your-own") KGs. We introduce BYOKG-RAG, a framework that enhances KGQA by synergistically combining LLMs with specialized graph retrieval tools. In BYOKG-RAG, LLMs generate critical graph artifacts (question entities, candidate answers, reasoning paths, and OpenCypher queries), and graph tools link these artifacts to the KG and retrieve relevant graph context. The retrieved context enables the LLM to iteratively refine its graph linking and retrieval, before final answer generation. By retrieving context from different graph tools, BYOKG-RAG offers a more general and robust solution for QA over custom KGs. Through experiments on five benchmarks spanning diverse KG types, we demonstrate that BYOKG-RAG outperforms the second-best graph retrieval method by 4.5% points while showing better generalization to custom KGs. BYOKG-RAG framework is open-sourced at https://github.com/awslabs/graphrag-toolkit.

View on arXivView PDF

Code Implementations(1)

Apache-2.0

Python toolkit for building graph-enhanced GenAI applications

445106CSS, MDXNov 15, 20245 months agoApache-2.0
amazon-neptuneamazon-opensearch-serverlessgraph-databasegraphragllama-index+2 more

Similar Papers

Cite this paper

@article{mavromatis2025byokgrag,
  title  = {BYOKG-RAG: Multi-Strategy Graph Retrieval for Knowledge Graph Question Answering},
  author = {Costas Mavromatis and Soji Adeshina and Vassilis N. Ioannidis and Zhen Han and Qi Zhu and Ian Robinson and Bryan Thompson and Huzefa Rangwala and George Karypis},
  year   = {2025},
  eprint = {2507.04127},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2507.04127v1}
}

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/2507.04127.svg)](https://codeofpaper.com/paper/2507.04127)

Discussion