Skip to main content
QUICK REVIEW

[Paper Review] LLM-assisted Knowledge Graph Engineering: Experiments with ChatGPT

Lars‐Peter Meyer, Claus Stadler|arXiv (Cornell University)|Jul 13, 2023
Semantic Web and OntologiesComputer Science5 references7 citations
TL;DR

This paper investigates the use of ChatGPT to assist in Knowledge Graph Engineering (KGE), demonstrating its ability to generate SPARQL queries from natural language, create RDF knowledge graph diagrams, and support ontology development. Key results show that while ChatGPT produces syntactically correct and semantically plausible outputs, it frequently hallucinates, requiring validation and highlighting the need for reproducible, open-source alternatives for scientific rigor.

ABSTRACT

Knowledge Graphs (KG) provide us with a structured, flexible, transparent, cross-system, and collaborative way of organizing our knowledge and data across various domains in society and industrial as well as scientific disciplines. KGs surpass any other form of representation in terms of effectiveness. However, Knowledge Graph Engineering (KGE) requires in-depth experiences of graph structures, web technologies, existing models and vocabularies, rule sets, logic, as well as best practices. It also demands a significant amount of work. Considering the advancements in large language models (LLMs) and their interfaces and applications in recent years, we have conducted comprehensive experiments with ChatGPT to explore its potential in supporting KGE. In this paper, we present a selection of these experiments and their results to demonstrate how ChatGPT can assist us in the development and management of KGs.

Motivation & Objective

  • To evaluate the potential of large language models (LLMs), specifically ChatGPT, in supporting knowledge graph engineering tasks.
  • To address the high workload and expertise dependency in KGE by exploring automation via LLMs.
  • To identify practical use cases where LLMs can reduce manual effort in knowledge graph construction and querying.
  • To assess the reliability and accuracy of LLM-generated outputs in structured knowledge representation tasks.
  • To highlight challenges such as hallucination and lack of reproducibility due to closed-source models.

Proposed method

  • Conducted experiments using ChatGPT-3.5 to generate SPARQL queries from natural language questions.
  • Used prompt engineering to generate RDF knowledge graph diagrams in Mermaid and Turtle syntax.
  • Evaluated outputs based on syntactic correctness, semantic consistency, and adherence to RDF/OWL standards.
  • Applied iterative prompting to refine results, including adding prefixes and correcting errors.
  • Validated generated SPARQL queries against known knowledge graphs like DBpedia.
  • Assessed diagram quality by measuring node and edge count, label consistency, and use of standard relations like rdfs:subClassOf and rdfs:subPropertyOf.

Experimental results

Research questions

  • RQ1Can ChatGPT generate semantically correct and syntactically valid SPARQL queries from natural language questions?
  • RQ2To what extent can ChatGPT generate accurate and standardized RDF knowledge graph diagrams from textual descriptions?
  • RQ3How reliable are LLM-generated outputs in knowledge graph schema design, and what types of errors (e.g., hallucinations) commonly occur?
  • RQ4Can iterative prompting improve the quality and correctness of LLM-generated knowledge graph artifacts?
  • RQ5What are the limitations of using closed-source LLMs like ChatGPT for scientific research in knowledge graph engineering?

Key findings

  • ChatGPT successfully generated SPARQL queries that were syntactically correct and semantically aligned with the target knowledge graph, as validated through query execution.
  • The model produced a hierarchical RDF diagram of DBpedia classes using rdfs:subClassOf, with 10 nodes and 12 edges, correctly labeled with prefixes and adhering to OWL/Schema conventions.
  • In a second prompt iteration, ChatGPT generated a 13-node, 17-edge Mermaid diagram with fully unique edges and consistent labeling, though one concept (dbo:Occupation) was non-existent.
  • The model demonstrated the ability to convert competency questions into SPARQL queries and to summarize knowledge graph structures effectively.
  • Despite strong performance, the model exhibited hallucination, such as inventing non-existent concepts or misrepresenting relations, necessitating manual validation.
  • The closed-source nature of ChatGPT limits reproducibility and scientific scrutiny, underscoring the need for open-weight and open-data LLMs in future research.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.