HyperAIHyperAI

Command Palette

Search for a command to run...

FAIR GraphRAG: A Retrieval-Augmented Generation Approach for Semantic Data Analysis

Marlena Fluh Soo-Yon Kim Carolin Victoria Schneider Sandra Geisler

Abstract

Retrieval-Augmented Generation (RAG) addresses the limitations of Large Language Models (LLMs) when providing responses to domain-specific questions. Graph-based RAG approaches, such as GraphRAG, enhance retrieval by capturing semantic relationships within knowledge graphs (KGs). While the FAIR principles (Findability, Accessibility, Interoperability, and Reusability) are becoming prevalent for scientific data management, especially in complex domains such as medicine, existing RAG approaches lack a structured FAIRification of the underlying knowledge resources. This lack limits their potential for FAIR information retrieval in these domains. To address this gap, we introduce FAIR GraphRAG, a novel framework that integrates FAIR Digital Objects (FDOs) as the fundamental units of a graph-based retrieval system. Each graph node represents an FDO that incorporates core data, metadata, persistent identifiers, and semantic links. We leverage LLMs to support schema construction and automated extraction of content and metadata from data sources. The framework was co-designed by physicians and computer scientists to ensure technical and clinical relevance. We apply FAIR GraphRAG to a biomedical dataset in gastroenterology, demonstrating its applicability to RNA-sequencing data. Beyond ensuring adherence to the FAIR principles, FAIR GraphRAG significantly improves question answering accuracy, coverage, and explainability, particularly for complex queries involving metadata and ontology links. This work shows the feasibility of combining FAIR data practices with graph-based retrieval techniques. We see potential for applying our approach to other specialized fields such as education and business.

One-sentence Summary

Researchers at RWTH Aachen University and University Hospital RWTH Aachen propose FAIR GraphRAG, a framework that integrates FAIR Digital Objects as graph nodes in retrieval-augmented generation and leverages LLMs for schema construction and metadata extraction to enhance question-answering accuracy, coverage, and explainability on biomedical data such as RNA-sequencing in gastroenterology.

Key Contributions

  • FAIR GraphRAG is a graph-based retrieval framework that uses FAIR Digital Objects as nodes, embedding core data, metadata, persistent identifiers, and semantic links to enforce FAIR principles throughout the knowledge graph.
  • The framework leverages large language models for automated schema construction and extraction of content and metadata, enabling scalable FAIRification of domain-specific knowledge resources.
  • Experiments on a gastroenterology RNA-sequencing dataset show that FAIR GraphRAG improves question answering accuracy, coverage, and explainability over baselines, particularly for complex queries involving metadata and ontology links, while achieving higher FAIR compliance.

Introduction

In clinical settings, AI systems must connect patient records to standardized ontologies such as SNOMED CT to answer medication dosing queries correctly, but mismatches between custom diagnosis terms and formal vocabularies lead to incomplete or erroneous results. Large language models (LLMs) can extract information from diverse sources, yet they hallucinate when domain-specific knowledge is absent from their training data. Retrieval-augmented generation (RAG) addresses this by supplying external knowledge, and graph-based RAG (GraphRAG) further leverages knowledge graphs to capture semantic relationships. However, existing methods do not systematically apply FAIR (Findable, Accessible, Interoperable, Reusable) principles to the knowledge that underpins RAG systems, limiting automated discovery, linking, and reuse of heterogeneous data. The authors introduce FAIR GraphRAG, a framework that models each knowledge graph node as a FAIR Digital Object with persistent identifiers, metadata, and core data, and employs LLMs to automate schema design and entity extraction. This approach unifies FAIRification with graph-based retrieval, improving interoperability and answer quality, as demonstrated on a biomedical dataset.

Dataset

The authors describe a flexible pipeline that turns a user-supplied dataset into a FAIR knowledge graph. The dataset itself is not a fixed benchmark; it is any collection of structured or unstructured documents that the user provides, along with a short description of the entities of interest (e.g., patient, disease). The pipeline processes this input as follows:

  • Schema construction – An LLM uses few‑shot prompting on the input dataset to extract relevant features for each user‑defined entity (e.g., name, sex for “patient”), producing a JSON schema that acts as a blueprint for extraction.
  • Information extraction – For structured data, a rule‑based approach maps fields directly to the schema. For unstructured data, the LLM is one‑shot prompted with the schema and one document at a time, filling the schema with entity instances.
  • FAIR Digital Object (FDO) creation – Each filled schema becomes a dataset FDO, and every entity instance becomes a separate entity FDO. This step adds:
  • Persistent identifiers (PIDs) for findability.
  • Metadata extracted by an LLM from provided metadata files, aligned to domain‑specific standards.
  • Ontology term mappings via repository APIs (e.g., Bio‑Portal) to enhance interoperability.
  • Relation enrichment – Semantic relations between FDOs are identified based on metadata or core‑data similarities (both within and across datasets) and added to the schema.
  • Knowledge graph integration – FDOs become nodes, relations become edges, and the resulting property graph is stored in a graph database, queryable with standard languages (Cypher/SPARQL).

The pipeline does not split the data into training/test sets; it processes the entire user‑provided collection document by document to produce a structured, FAIR‑compliant knowledge graph.

Method

The authors propose a novel FAIR GraphRAG framework designed for analyzing domain-specific datasets. Unlike traditional Retrieval-Augmented Generation (RAG) approaches that often overlook interconnected structures, this method constructs a Knowledge Graph (KG) where each node represents a FAIR Digital Object (FDO). This ensures that every component of the graph is inherently findable, accessible, interoperable, and reusable.

The framework leverages Large Language Models (LLMs) for both the construction of the KG from raw datasets and for user interaction via natural language queries.

The underlying structure adopts a property graph model, chosen for its alignment with LLM outputs like JSON structures. The authors define the FAIR property graph formally as a tuple: G=(F,E,ρ,λ,σ,ϕ)G = (F, E, \rho, \lambda, \sigma, \phi)G=(F,E,ρ,λ,σ,ϕ) Here, FFF represents a finite set of FDOs (nodes), and EEE represents edges. The function ρ\rhoρ associates edges with pairs of FDOs, while λ\lambdaλ and σ\sigmaσ assign labels and properties (metadata) to nodes and edges. The function ϕ\phiϕ assigns node types, such as 'dataset' or 'entity' (e.g., patient, disease).

As illustrated in the figure above, the graph contains a central dataset node providing an overview, surrounded by user-defined entity nodes. Relationships indicate interrelations between core data or metadata, such as a matching disease label.

The construction of the FAIR KG follows a multi-stage pipeline that integrates FAIR principles.

The process begins with Schema Definition, where users specify entity types and an LLM extracts relevant features to create a JSON blueprint. Next, in the Information Extraction phase, the system populates this schema. For structured data, rule-based mapping is used, while unstructured data is processed by an LLM using one-shot prompting. The extracted information is then transformed into FAIR Digital Objects (FDOs). This involves generating Persistent Identifiers (PIDs) for findability, extracting metadata, and mapping schema entries to domain-specific ontology terms to ensure interoperability. Subsequently, Relations are established between FDOs based on metadata or core data similarities, allowing for both inner-dataset and cross-dataset linking. Finally, these FDOs and their relations are integrated into a property graph database to form the FAIR Knowledge Graph.

The retrieval mechanism moves beyond simple embedding-based similarity searches to a query-based approach for higher flexibility.

When a user poses a question, the system prepares a prompt incorporating the graph schema as context. This prompt is fed to an LLM within the Graph Retrieval Engine, which generates a graph database query (e.g., in Cypher or SPARQL). The query is executed against the graph database, and the resulting FDOs are retrieved. Finally, the engine interprets these results and translates them into a natural language answer for the user, while also displaying the original query and the retrieved FDO metadata for transparency.

Experiment

This study evaluates a FAIR GraphRAG approach on a biomedical RNA sequencing dataset, comparing it to a Non-FAIR baseline that omits persistent identifiers, metadata, and ontology terms. The FAIR system meets all FAIR criteria except licensing and achieves markedly higher accuracy and full explainability, particularly for metadata and ontology questions, while the baseline fails on those types. The results confirm that enriching a knowledge graph with FAIR principles substantially improves both compliance and the semantic richness of question answering, providing stronger provenance and traceability.

The FAIR-aware GraphRAG approach satisfies all evaluated FAIR indicators except licensing, whereas the baseline fails on findability, interoperability, and reusability due to missing persistent identifiers, rich metadata, and ontology mappings. Both systems support open, standardized access protocols and authentication, but only the FAIR-aware system provides globally unique identifiers, rich metadata, and clear data-metadata links. The FAIR-aware approach meets all criteria from F1 to A1.2, with the sole exception of licensing (R1.1), while the baseline lacks identifiers and metadata (F1–F3: No) and is only partially indexed (F4: Partial). Both implementations are accessible via open, free, and universally implementable protocols (A1, A1.1) and support authentication and authorization (A1.2).

The FAIR-aware system with gpt-4o-mini achieved the highest overall accuracy (92.86%), with strong performance across general, metadata, and ontology questions, while the baseline system failed completely on metadata and ontology questions. Coverage matched accuracy for gpt-4o-mini, and explainability was perfect in the FAIR setting, demonstrating that a FAIR-aligned knowledge graph substantially improves answer quality. Llama-3.3-70B showed some improvement with FAIR but still lagged behind, often producing invalid queries. Overall accuracy for gpt-4o-mini more than doubled from 42.86% in the baseline to 92.86% in the FAIR setting. Metadata and ontology accuracy were 0% for both models in the baseline, but rose to 90% for gpt-4o-mini and 20% for Llama-3.3-70B with the FAIR system.

The first experiment assesses FAIR compliance, showing that the FAIR-aware GraphRAG satisfies all evaluated indicators except licensing, while the baseline fails on findability, interoperability, and reusability due to missing persistent identifiers and metadata. The second experiment evaluates question-answering performance, revealing that the FAIR-aligned knowledge graph dramatically boosts accuracy, particularly for metadata and ontology questions, with gpt-4o-mini reaching 92.86% overall accuracy and perfect explainability, compared to the baseline's complete failure on those question types. These results demonstrate that embedding FAIR principles into the knowledge graph is essential for reliable and interpretable retrieval-augmented generation.


Build AI with AI

From idea to launch — accelerate your AI development with free AI co-coding, out-of-the-box environment and best price of GPUs.

AI Co-coding
Ready-to-use GPUs
Best Pricing

HyperAI Newsletters

Subscribe to our latest updates
We will deliver the latest updates of the week to your inbox at nine o'clock every Monday morning
Powered by MailChimp