ChatPaper.aiChatPaper

BYOKG-RAG: Recupero Grafico Multi-Strategia per il Question Answering su Grafi di Conoscenza

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

July 5, 2025
Autori: Costas Mavromatis, Soji Adeshina, Vassilis N. Ioannidis, Zhen Han, Qi Zhu, Ian Robinson, Bryan Thompson, Huzefa Rangwala, George Karypis
cs.AI

Abstract

Il question answering su knowledge graph (KGQA) presenta sfide significative a causa delle variazioni strutturali e semantiche tra i grafi di input. I lavori esistenti si basano su agenti basati su Large Language Model (LLM) per l'attraversamento e il recupero del grafo; un approccio sensibile all'inizializzazione dell'attraversamento, poiché è soggetto a errori di collegamento delle entità e potrebbe non generalizzare bene a KG personalizzati ("bring-your-own"). Introduciamo BYOKG-RAG, un framework che migliora il KGQA combinando sinergicamente gli LLM con strumenti specializzati per il recupero di grafi. In BYOKG-RAG, gli LLM generano artefatti critici del grafo (entità della domanda, risposte candidate, percorsi di ragionamento e query OpenCypher), e gli strumenti per grafi collegano questi artefatti al KG e recuperano il contesto rilevante del grafo. Il contesto recuperato consente all'LLM di affinare iterativamente il collegamento e il recupero del grafo, prima della generazione della risposta finale. Recuperando contesto da diversi strumenti per grafi, BYOKG-RAG offre una soluzione più generale e robusta per il QA su KG personalizzati. Attraverso esperimenti su cinque benchmark che coprono diversi tipi di KG, dimostriamo che BYOKG-RAG supera il secondo miglior metodo di recupero di grafi di 4,5 punti percentuali, mostrando una migliore generalizzazione ai KG personalizzati. Il framework BYOKG-RAG è open-source all'indirizzo https://github.com/awslabs/graphrag-toolkit.
English
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.
PDF61July 16, 2025