
RAGInsights: Extracting Insights from RDF-Based Knowledge Graphs with GraphRAG
Research Project | 01.11.2024
The increasing adoption of Knowledge Graphs (KGs) has enhanced data integration and retrieval across various domains. Yet, the complexity of the graph databases and query languages makes it challenging for scholars to study the graphs thoroughly and limits them to functionalities the web applications provide in representing and analyzing data. This project utilizes Graph Retrieval-Augmented Generation (GraphRAG) to generate contextualized narratives from scholarly KGs in natural language. GraphRAG enhances large language models (LLMs) by incorporating KG data as factual context, mitigating hallucination issues while enabling dynamic narrative generation. This project implements two workflows for this purpose for generating a natural language text that
- explains key concepts of a project's KG. While manually crafted narratives offer insights, they are time-consuming to produce, and users often require complex querying tools for deeper exploration. This workflow allows project teams to provide SPARQL queries that retrieve graph data representing key aspects of a project and use them as input for LLM to create narrations.
- answers a user's natural language query (NLQ) based on the KG. This workflow uses LLMs and the KG's ontology to translate an NLQ to SPARQL for retrieving data from the KG that answers the user's query. This graph data is then fed to LLM as input for formulating a narration.
Both workflows return generated narratives together with the graph data used to construct them. This allows users to verify the LLM results and conduct a detailed study of the graph to study further related material. By integrating these approaches, we bridge the gap between structured scholarly data and human-readable narratives, facilitating accessibility, interpretability, and citation as well as verification of underlying graph components.