[Paper Review] From human experts to machines: An LLM supported approach to ontology and knowledge graph construction
The paper presents a semi-automatic pipeline using open-source LLMs to generate competency questions, build an ontology, and construct knowledge graphs, with human-in-the-loop evaluation and a judge LLM for scoring.
The conventional process of building Ontologies and Knowledge Graphs (KGs) heavily relies on human domain experts to define entities and relationship types, establish hierarchies, maintain relevance to the domain, fill the ABox (or populate with instances), and ensure data quality (including amongst others accuracy and completeness). On the other hand, Large Language Models (LLMs) have recently gained popularity for their ability to understand and generate human-like natural language, offering promising ways to automate aspects of this process. This work explores the (semi-)automatic construction of KGs facilitated by open-source LLMs. Our pipeline involves formulating competency questions (CQs), developing an ontology (TBox) based on these CQs, constructing KGs using the developed ontology, and evaluating the resultant KG with minimal to no involvement of human experts. We showcase the feasibility of our semi-automated pipeline by creating a KG on deep learning methodologies by exploiting scholarly publications. To evaluate the answers generated via Retrieval-Augmented-Generation (RAG) as well as the KG concepts automatically extracted using LLMs, we design a judge LLM, which rates the generated content based on ground truth. Our findings suggest that employing LLMs could potentially reduce the human effort involved in the construction of KGs, although a human-in-the-loop approach is recommended to evaluate automatically generated KGs.
Motivation & Objective
- Motivate reducing human effort in ontology and KG construction while maintaining quality.
- Demonstrate a semi-automatic pipeline that starts from competency questions to KG creation.
- Reuse existing ontologies (e.g., PROV-O) and evaluate LLM-generated content against ground truth.
- Showcase feasibility by building a DL methodology KG from biodiversity scholarly publications.
Proposed method
- six-component pipeline: Data Collection, Competency Question (CQ) generation, Ontology creation, CQ answering, KG construction, Evaluation.
- Use open-source LLMs (Mixtral 8x7B chosen after comparison) in a zero-shot setting with RAG for CQ answers.
- Construct ontology from CQs and Q/A, reuse PROV-O as foundational ontology, and map CQ answers to KG concepts.
- Employ Retrieval-Augmented Generation to answer CQs from five biodiversity publications.
- Evaluate CQ answers and KG concepts using a judge LLM against ground truth; five articles annotated.
- Provide public code and data via GitHub for reproducibility.

Experimental results
Research questions
- RQ1Can open-source LLMs semi-automate CQ generation, ontology creation, and KG construction with human-in-the-loop validation?
- RQ2What is the quality of LLM-generated CQ answers and the resulting KG when evaluated against ground truth?
- RQ3How does prompt design and RAG configuration affect the resultant ontology and KG?
- RQ4Is PROV-O suitable as a foundational ontology for DL pipeline provenance in this semi-automatic workflow?
- RQ5What is the trade-off between automation and human effort in producing usable KGs for biodiversity DL methods?
Key findings
- 40 competency questions were generated to cover the DL pipeline stages.
- The DLProv ontology was created with 45 classes, 41 relationships, and 365 axioms, reusing PROV-O.
- There were 42 disagreements between human annotator and the LLM Judge out of 200 evaluated CQ answers.
- Best KG performance (percentage of KG individuals aligned with CQ answers) varied by prompt/CQ answer combination across five publications.
- Across five publications, some prompt/CQ combinations produced meaningful KGs while others yielded no meaningful KG (denoted by x).
- A single pipeline achieved up to 91.53% alignment for one combination, with other combinations achieving 81.48%, 82.76%, 77.55%, 68.06%, and 66.67% in different cases.

Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.