Integrating Knowledge Graphs and Large Language Models for Querying in an Industrial Environment

Domen Hočevar and Klemen Kenda

Abstract
Knowledge graphs have traditionally required the use of specific
query languages, such as SPARQL, to retrieve relevant data. In
this paper, we present a system capable of performing natural
language queries on knowledge graphs by leveraging retrieval-
augmented generation (RAG) and large language models (LLMs).
Our system can ingest large knowledge graphs and answer queries
using two approaches: first, by utilizing LLMs to extract informa-
tion directly from subgraphs; and second, by generating SPARQL
queries with LLMs and using the results to inform further infer-
ence, such as counting the number of items.