[KongchangAI]
· 2 min read· 1,102 words

OntoDoc: A Multi-Agent Framework for Automatically Generating Ontology Resource Descriptions

OntoDoc: A Multi-Agent Framework for Automatically Generating Ontology Resource Descriptions

OntoDoc is a multi-agent framework that automatically generates evidence-driven natural language descriptions of ontology resources for any IRI.

OntoDoc is a multi-agent framework for automatically generating natural language descriptions of any Internationalized Resource Identifier (IRI) in a knowledge graph, addressing the lack of readable documentation for ontology terms. To overcome the inflexibility of rule- or template-based methods, OntoDoc uses a four-stage pipeline: a database context agent adaptively explores the graph via SPARQL, a web context agent retrieves and reranks encyclopedic knowledge, a hypothesis generation agent synthesizes grounded hypotheses, and a description generation agent produces the final description. Evaluations across biomedical, agricultural, and cross-domain graphs show OntoDoc matches or exceeds naive LLM and template baselines in accuracy, with completeness improving by an average of 12% over the naive baseline and up to 2.8 points (5-point scale) over template methods.

OntoDoc: A Multi-Agent Framework for Automatically Generating Ontology Resource Descriptions

Knowledge graphs and ontologies are fundamental to structured, machine-readable knowledge representation, but terms in ontologies often lack natural language descriptions, which limits their accessibility and reusability. Existing ontology verbalization methods mostly rely on rule-based or template-based techniques that can only handle strictly formalized pattern axioms, producing rigid descriptions that struggle to convey richer contextual semantics. To address this, researchers proposed OntoDoc—a multi-agent framework that can automatically generate natural language descriptions for any Internationalized Resource Identifier (IRI) in a SPARQL endpoint or RDF file.

OntoDoc paper title screenshot

Limitations of Existing Methods and OntoDoc's Breakthrough

Traditional ontology verbalization typically uses rule- or template-driven approaches to generate text directly from formal axioms. While controllable, this approach is inflexible and cannot leverage knowledge beyond the ontology to enrich descriptions. OntoDoc, by contrast, introduces multi-agent collaboration to combine structured information within the knowledge graph with encyclopedic knowledge from the open web, thereby generating more comprehensive and semantically deeper natural language descriptions.

Ontology verbalization is a subtask of natural language generation that aims to convert formal axioms in an ontology (such as class inclusions, property constraints, and instance assertions) into readable natural language text. Early systems mostly adopted template-based methods, for example mapping SubClassOf(A, B) directly to "A is a subclass of B." Such methods are highly controllable and produce deterministic outputs, but they rely heavily on manually written template libraries, making it difficult to cover complex or unconventional axiom patterns in ontologies, and they cannot introduce external knowledge to supplement context. Another category of rule-based methods combines phrases through grammatical rules, but is likewise limited by rule coverage. These limitations have prompted researchers to explore data-driven or hybrid approaches that leverage large language models and external knowledge sources to generate more flexible and richer descriptions.

Four-Stage Pipeline: From Exploration to Generation

OntoDoc's workflow is divided into four stages, each handled by a dedicated agent:

1. Database Context Agent

This agent adaptively explores the knowledge graph via SPARQL to collect triples semantically relevant to the target IRI. Rather than being limited to predefined query templates, it dynamically adjusts its query strategy based on the graph structure to obtain as rich contextual information as possible.

SPARQL is the W3C-recommended RDF query language that supports pattern matching and path queries over knowledge graphs. In OntoDoc, the database context agent does not execute fixed query templates but dynamically constructs SPARQL queries based on the type of the target IRI (class, property, or instance)—for example, retrieving the IRI's labels, annotations, domain/range, superclass/subclass relations, and associated instances. This adaptive exploration strategy can collect triples semantically relevant to the target IRI as comprehensively as possible without prior knowledge of the graph schema, providing structured evidence for subsequent hypothesis generation.

2. Web Context Agent

This agent retrieves encyclopedic background knowledge from Wikipedia and the open web and reranks the results to supplement common-sense or domain background that may be missing from the knowledge graph.

An Internationalized Resource Identifier (IRI) is the standard way in RDF to uniquely identify resources; it can be seen as an extension of URI that supports Unicode characters. An IRI usually consists of a namespace and a local name, for example http://example.org/ontology#Heart. In real-world knowledge graphs, many IRIs contain only abbreviations or codes and lack human-readable labels and annotations. OntoDoc's web context agent targets exactly this pain point: using the IRI's local name or labels extracted from the graph as query terms, it retrieves encyclopedic background knowledge from Wikipedia and the open web and reranks the retrieval results to supplement common-sense or domain background missing from the knowledge graph, thereby helping generate more complete natural language descriptions.

3. Hypothesis Generation Agent

This agent synthesizes the two contexts above into a structured list of evidence-supported intermediate hypotheses. These hypotheses serve as the basis for subsequent description generation, ensuring that the description content is well-grounded.

4. Description Generation Agent

This agent generates the final natural language description based on the grounded hypotheses. Since the hypotheses have already been evidence-verified, the generated descriptions are guaranteed in both accuracy and completeness.

Experimental Evaluation: Cross-Domain Validation and Human Scoring

The researchers evaluated OntoDoc on three knowledge graphs covering biomedical, agricultural, and cross-domain scenarios. The evaluation used two approaches: automatic scoring based on large language models (LLMs) and human evaluation by 11 annotators.

The results show that OntoDoc consistently matches or exceeds the naive LLM baseline and the template-based ontology verbalizer in accuracy. In terms of completeness, OntoDoc substantially outperforms both baselines: across all domains, its completeness improves by an average of 12% over the naive baseline; relative to the ontology verbalizer, completeness scores improve by up to 2.8 points on a 5-point scale.

Significance and Outlook

OntoDoc's significance lies in moving ontology description generation from "rule-driven" to "evidence-driven," integrating internal and external knowledge through multi-agent collaboration to significantly improve description completeness and contextual richness. For knowledge graph builders, maintainers, and developers who rely on ontologies for downstream applications (such as question answering systems and semantic search), this automated description generation capability is expected to reduce the cost of manually writing documentation and promote ontology reuse.

However, the method still depends on the quality of external web knowledge sources, and the evaluation scale is limited. Future directions worth attention include ensuring the reliability of generated descriptions, handling multilingual scenarios, and extending the framework to more complex ontology structures.

One-line Summary

OntoDoc is a multi-agent framework that automatically generates evidence-driven natural language ontology descriptions for any IRI.

Paragraph Summary

OntoDoc is a multi-agent framework designed to automatically generate natural language descriptions for any Internationalized Resource Identifier (IRI) in a knowledge graph, addressing the lack of readable documentation for ontology terms. To overcome the inflexibility of traditional rule- or template-based methods and their inability to leverage external knowledge, OntoDoc designs a four-stage pipeline: a database context agent adaptively explores the knowledge graph via SPARQL to collect triples, a web context agent retrieves and reranks encyclopedic knowledge from Wikipedia and the open web, a hypothesis generation agent synthesizes the two contexts into evidence-supported intermediate hypotheses, and a description generation agent produces the final description based on the hypotheses. Evaluations on biomedical, agricultural, and cross-domain knowledge graphs show that OntoDoc matches or exceeds the naive LLM baseline and template verbalizer in accuracy, improves completeness by an average of 12% over the naive baseline, and improves by up to 2.8 points (on a 5-point scale) relative to the template method. The method moves ontology description generation from rule-driven to evidence-driven, promising to reduce manual documentation costs and promote ontology reuse.

#OntoDoc#multi-agent framework#ontology verbalization#knowledge graph#IRI description generation#SPARQL#natural language generation
Share:

Related articles