Integrating I4.0 Knowledge Graphs with Large Language Models Beyond SPARQL Endpoints

Abdul Wahid, Muhammad Yahya, Farooq Zaman, Baifan Zhou, John G. Breslin, Muhammad Intizar Ali, Evgeny KharlamovSOFLIM2KG-SemIIM@ISWC 2024

Introduction

In the era of Industry 4.0 (I4.0), manufacturing plants generate massive volumes of data, often organized into Knowledge Graphs (KGs) to create digital twins of machines and processes. While these graphs provide a powerful structured representation of industrial environments, they are notoriously difficult for non-experts to query. Currently, accessing this data requires proficiency in both the specific data schema and SPARQL (the standard query language for graph data).

For the average mechanical engineer, supervisor, or floor operator, this technical barrier makes critical operational data effectively invisible. This paper presents a framework that bridges this gap by integrating I4.0 Knowledge Graphs with Large Language Models (LLMs), allowing users to interact with industrial data using plain natural language.

Methodology

The proposed architecture utilizes a Retrieval-Augmented Generation (RAG) style approach to connect structured graph data with an LLM without the need for computationally expensive fine-tuning.

The proposed architecture for integrating I4.0 Knowledge Graphs with Large Language Models via an embedding and adapter layer.

1. Knowledge Graph Construction and Vectorization

Data from the production line is mapped to the Reference Generic Ontology Model (RGOM) using the Jena API, creating a store of RDF triples (Subject-Predicate-Object). To make this graph searchable by an LLM, the system uses Sentence Transformers to convert these triples into vector embeddings.

2. Efficient Retrieval and Interpretation

These embeddings are stored in FAISS (Facebook AI Similarity Search), a library optimized for high-speed similarity searches. When a user submits a natural language query, the system identifies the most mathematically similar triples in the vector space. These retrieved triples are then fed into a C++ optimized version of LLaMA2 as context. Through prompt engineering, the LLM is instructed to interpret these raw triples and explain them in clear, contextual natural language.

Implementation and Dataset

The framework was evaluated using a specialized Football Production Line Dataset. This dataset covers a production line with nine machines involved in material preparation, stitching, and quality control. Each production cycle generates approximately 1,730 triples. At a rate of 36 footballs per hour, the system processes over 22,000 triples hourly from nearly 3,000 distinct entities, including sensors, tools, and parts.

Key Results and Insights

The core innovation of this approach is the shift from rigid syntactic querying to semantic interpretation. Traditional SPARQL queries are brittle; a single character error can cause a total failure. In contrast, the LLM-based approach focuses on the meaning of the user's request, making the system resilient to human error and accessible to non-technical staff.

A demonstration of the natural language query interface and the resulting LLM-generated explanation of retrieved triples.

As shown in the interface demonstration, the system successfully handles complex queries regarding machine states and sensor data. Qualitative analysis suggests that this integration significantly improves operational efficiency by allowing operators to detect faults and receive status updates in seconds, rather than waiting for a data expert to draft a specialized query.

Limitations and Future Work

A significant current limitation is temporal precision. The system often requires exact timestamp matches; if a user asks for data within a range that does not perfectly align with sensor log intervals, retrieval performance can suffer.

Future research will focus on developing a time-range estimation mechanism to allow for "fuzzy matching" of natural language time descriptions. Additionally, the authors plan to explore broader integration across diverse manufacturing environments and cross-domain ontology mapping to enhance the framework's versatility.

Summary updated

BibTeX
@inproceedings{wahid2024integrating,
  author = {Abdul Wahid and Muhammad Yahya and Farooq Zaman and Baifan Zhou and John G. Breslin and Muhammad Intizar Ali and Evgeny Kharlamov},
  title = {{Integrating I4.0 Knowledge Graphs with Large Language Models Beyond SPARQL Endpoints}},
  booktitle = {SOFLIM2KG-SemIIM@ISWC},
  year = {2024},
}
Figure