arXiv:2611.01276cs.AIOct 2026

Manuscript Offprint

arXiv:2611.01276

OntoDoc: Automatically Generating Ontology Resource Descriptions

Juan Guajardo Gutierrez, Mike Tran, Nasim Shirvani Mahdavi, Chengkai Li

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Juan Guajardo Gutierrez, Mike Tran, Nasim Shirvani Mahdavi, Chengkai Li

University of Texas at Arlington, Arlington TX 76013, US

Abstract. Knowledge graphs and ontologies form the backbone of structured, machine-readable knowledge representation, yet ontology terms often lack natural language descriptions, limiting their accessibility and reuse. Existing ontology verbalization approaches tend to rely on rule-based or template-driven techniques that operate on strict, formal schema axioms, resulting in rigid verbalizations that fail to convey richer contextual semantics. We present OntoDoc, a multi-agent framework for automatically generating natural language descriptions for any Internationalized Resource Identifier (IRI) within a SPARQL endpoint or RDF file. OntoDoc operates through a four-stage pipeline: (1) a Database Context agent that adaptively explores the knowledge graph via SPARQL to collect semantically informative triples about the target IRI; (2) a Web Context agent that retrieves and re-ranks encyclopedic background knowledge from Wikipedia and the open web; (3) an Assumption Generation agent that synthesizes both contexts into a structured, evidence-grounded list of intermediate assumptions; and (4) a Description Generation agent that produces the final natural language description from the grounded assumptions. We evaluate OntoDoc on three knowledge graphs spanning biomedical, agricultural, and cross-domain settings, using both automatic scoring via Large Language Models (LLMs) and human evaluation with 11 annotators. OntoDoc consistently matches or exceeds a naive LLM baseline and a template-based ontology verbalizer in accuracy. Furthermore, it vastly outperforms both baselines in the completeness of the generated descriptions, delivering an average 12% improvement in completeness over the naive baseline across all domains, and improving completeness scores by as much as 2.8 points on a 5-point scale relative to the ontology verbalizer.

Keywords: Ontology verbalization · Knowledge graph documentation · Large language models · LLM agentic framework.

1 Introduction

Knowledge graphs have become a foundational framework for representing structured information in scientific, business and governmental applications [9,10], as evidenced by initiatives such as the Proto-OKN program of the U.S. National Science Foundation [16]. Yet the practical utility of such semantic richness is contingent upon users' ability to comprehend and reuse the data. The semantics of a knowledge graph are largely defined by its ontology, which specifies the classes, properties, and relationships used to model the domain. In a typical knowledge graph, the ontology provides the intensional vocabulary, while instance data populates that vocabulary. Because the ontology defines the meaning of every term that appears in the data, it is the primary bottleneck for data comprehension. Users therefore tend to rely on ontology annotations such as rdfs:comment [3] to understand what each term means and how it should be used.

However, in practice, a large fraction of ontology terms carry no human-readable documentation, a problem visible across many publicly available SPARQL endpoints, where rdfs:comment or equivalent annotations are frequently missing. This leaves users and downstream applications without any guidance about the intended meaning or usage of key graph concepts. The standard remedy, where a knowledge graph maintainer or domain expert inspects the graph, examines representative data, and writes a short description for each term, is not scalable. Large knowledge graphs can contain hundreds of distinct classes and properties [25,13], and the expertise required to describe them accurately is often concentrated in a small group of contributors, making systematic manual annotation infeasible. As a result, many knowledge graphs are deployed with incomplete documentation, hindering discovery, integration, and reuse.

Automatically generating ontology descriptions is therefore an important and practical problem. Existing approaches, however, remain limited. Traditional ontology verbalization systems primarily rely on schema-level axioms and hand-crafted linguistic templates to produce descriptions from formal ontology constructs [11,22,23,5,18,1]. While effective for highly structured ontologies with rich logical axiomatization, these methods often generate rigid or overly generic descriptions and struggle when applied to knowledge graphs whose semantics are expressed implicitly through instance data rather than explicit ontology axioms. More recent approaches integrate Large Language Models (LLMs) to improve textual fluency [27]; however, they largely act as semantic translators of existing structure and remain strictly bounded by explicit schema axioms. Conversely, a natural first instinct is to directly prompt an LLM with raw graph triples and ask it to explain the target term. In practice, however, such naive prompting often yields incomplete descriptions because the semantics of ontology terms are rarely recoverable from a single local graph neighborhood.

To address these challenges, we present OntoDoc, an agentic multi-stage system for automatic ontology description generation. OntoDoc combines adaptive SPARQL-based graph exploration with external web retrieval and an intermediate reasoning stage that synthesizes evidence into structured assumptions before description generation. Rather than relying solely on schema axioms or fixed graph queries, OntoDoc actively explores the knowledge graph to gather semantically informative evidence, supplements sparse graph context with external encyclopedic knowledge, and grounds the final description in explicitly reasoned assumptions derived from both sources.

We evaluate OntoDoc on three diverse knowledge graphs spanning biomedical, agricultural, and open-domain data. Our evaluation includes both LLM-based and human assessment using four quality dimensions: accuracy, clarity, completeness, and cruciality. Experimental results show that OntoDoc consistently produces more complete and robust descriptions, improving completeness scores by up to 0.6 points on a 5-point Likert scale over the closest baseline while maintaining competitive accuracy and clarity across all domains.

The main contributions of this work are as follows:

  • We formalize the ontology description generation task for heterogeneous knowledge graphs and define a multi-dimensional evaluation framework grounded in rdfs:comment quality criteria.

  • We propose OntoDoc, an agentic multi-stage pipeline that combines adaptive graph exploration, external web retrieval, structured assumption generation, and LLM-based description synthesis.

  • We introduce an intermediate assumption generation stage that improves factual grounding and reduces noise before final description generation.

  • We evaluate OntoDoc across three real-world knowledge graphs and show improvements over existing baselines.

  • All code used to produce this work is available in our anonymous GitHub repository at https://anonymous.4open.science/r/ontodoc/.

References (36)