NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

OntoDoc: Automatically Generating Ontology Resource Descriptions

Juan Guajardo Gutierrez, Mike Tran, Nasim Shirvani Mahdavi, Chengkai LiarXiv 2026

This paper introduces OntoDoc, a multi-agent framework designed to solve a persistent headache in the world of Semantic Web and data engineering: the "silent" knowledge graph. While knowledge graphs (KGs) are excellent for machine readability, they often lack the natural language descriptions (rdfs:comment) that human users need to understand what a specific term actually means.

TL;DR

OntoDoc is a multi-agent LLM framework that automatically generates natural language descriptions for ontology terms by combining adaptive knowledge graph exploration with external web retrieval. By synthesizing graph data and web context into structured intermediate assumptions, it produces documentation that is significantly more complete and human-readable than traditional rule-based or naive LLM approaches.

What Problem Does This Paper Address?

Knowledge graphs are the backbone of modern structured data, but their utility is often throttled by a lack of documentation. In many public SPARQL endpoints, ontology terms (classes and properties) are missing human-readable descriptions.

Existing solutions fall into two camps, both with flaws:

  1. Template-based verbalizers: These are rigid and only translate formal logic (e.g., "Class A is a subclass of Class B"). They fail to capture the "real-world" meaning of a concept.
  2. Naive LLM prompting: Simply asking a model to describe a term based on its immediate neighbors in a graph often results in incomplete or hallucinated descriptions because the necessary context is scattered across the graph or missing entirely.

OntoDoc aims to bridge this gap by creating a system that "thinks" like a human researcher—exploring the database, checking the web, and reasoning over the evidence before writing a definition.

Methods

OntoDoc uses a four-stage agentic pipeline where specialized LLM agents communicate through a shared session state:

  1. Database Context Agent: Instead of using a fixed query, this agent acts as an autonomous SPARQL explorer. It uses a specific toolset (see Figure 2) to adaptively crawl the graph. Crucially, if it encounters a class, it doesn't just look at the schema; it inspects actual instances of that class to see how they are used in practice.
  2. Web Context Agent: This agent extracts the term's label and searches Wikipedia or the open web (via Tavily) to find encyclopedic background knowledge, providing context that might not exist within the KG itself.
  3. Assumption Generation Agent: Inspired by Chain-of-Thought prompting, this agent synthesizes the DB and Web contexts into a structured list of evidence-grounded "assumptions." This acts as a factual bottleneck, forcing the system to justify its claims before the final writing stage.
  4. Description Generation Agent: Acting as a professional lexicographer, this agent takes the grounded assumptions and produces a concise, 1–3 sentence natural language description.
Fig. 1: OntoDoc System Overview

Datasets

The authors evaluated OntoDoc on 151 ontology terms across three diverse knowledge graphs:

  • BioBricks-MeSH: A biomedical graph derived from Medical Subject Headings.
  • SOCKG: A highly specialized agricultural knowledge graph focused on soil science.
  • DBpedia: A large-scale, open-domain graph extracted from Wikipedia.

Evaluation was conducted using both a state-of-the-art LLM judge (Kimi K2.5) and human evaluation by 11 annotators, including domain experts for the agricultural data.

Key Insights and Ideas

  • The Power of Instances: A key "aha moment" is that the semantics of a class are often hidden in its instances rather than its schema axioms. By inspecting how data is actually populated, OntoDoc recovers meanings that rule-based systems miss.
  • Reasoning as a Filter: The intermediate "Assumption" stage (illustrated in Figure 3) is critical. It prevents the model from conflating different sources of evidence and ensures that every part of the final description is traceable back to specific triples or web search results.
  • Domain Sensitivity: The system is most effective in specialized scientific domains. In general domains like DBpedia, LLMs already have significant internal knowledge, but in niche fields like soil science, the adaptive graph exploration provides a massive boost in accuracy and completeness.
Example of Extracted Assumptions

Key Results

OntoDoc was compared against a "Naive" LLM baseline (single-hop retrieval) and a traditional template-based "Ontology Verbalizer." * Completeness: This was the biggest win. OntoDoc delivered a 12% average improvement in completeness over the naive baseline. Compared to the ontology verbalizer, it improved completeness scores by as much as 2.8 points on a 5-point scale. * Accuracy and Clarity: OntoDoc consistently matched or exceeded baselines, maintaining high scores (averaging >4.0/5.0) even while providing much more detailed information. * Human Alignment: Human experts confirmed the LLM-based evaluation trends, particularly noting that OntoDoc produced high-quality descriptions even for highly technical agricultural terms.

Limitations and Future Work

  • Semantic Bottlenecks: The authors acknowledge a risk of "information loss" during the assumption generation stage. If the agent fails to include a crucial detail in the assumptions, the final description agent has no way to recover it.
  • Cruciality vs. Completeness: Because OntoDoc gathers so much evidence, it occasionally includes secondary details that are informative but not "strictly essential," which can slightly lower scores in "cruciality" (conciseness) compared to ultra-brief, generic baselines.
  • Future Directions: The authors suggest exploring how this framework could be used to proactively suggest updates to existing ontologies or to help human experts bootstrap documentation for massive, new knowledge graphs.

Summary updated

BibTeX
@misc{gutierrez2026ontodoc,
  author = {Juan Guajardo Gutierrez and Mike Tran and Nasim Shirvani Mahdavi and Chengkai Li},
  title = {{OntoDoc: Automatically Generating Ontology Resource Descriptions}},
  year = {2026},
  eprint = {2611.01276},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.01276},
}
Figure