Integrating Knowledge Graphs and Large Language Models for Querying in an Industrial Environment
Hočevar, Domen · 2024
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 retrievalaugmented 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 information directly from subgraphs; and second, by generating SPARQL queries with LLMs and using the results to inform further inference, such as counting the number of items.