arXiv(opens in a new tab)cs.AISep 2026Cited by 3 papers on PaperVantage

Manuscript Offprint

arXiv:2609.15779

EvoOntology: A Self-Evolving Ontology Layer for Data Agents

Meiduo Chong, Shaolei Zhang, Ju Fan, Xiaoyong Du

Abstract

Data agents aim to fulfill natural-language instructions over heterogeneous data, including tables, files, and databases. However, data agents face a challenging agent–data gap: heterogeneous data resides outside the agent, while the agent can access it (e.g., column names and file paths) only through generic tools. Existing approaches either let agents directly explore raw data sources or inject manually constructed semantic layers into prompts. However, neither scales well to large heterogeneous data sources nor adapts to different agent behaviors. In this paper, we introduce EvoOntology, a self-evolving ontology layer for data agents. EvoOntology encapsulates the ontology as an MCP server comprising a schema layer, a content layer, and a tool layer, enabling agents to actively query and interact with the ontology at runtime. To this end, we introduce a builder agent for autonomous ontology construction and a self-evolution loop that continuously refines the ontology through attribution-guided typed edits that are accepted only after a backbone-conditional paired evaluation. Experiments on three well-adopted data-agent benchmarks with four LLM backbones demonstrate that EvoOntology consistently outperforms strong baselines and existing semantic-layer approaches, effectively bridging the agent–data gap and enabling more effective interaction with heterogeneous data.

Code — https://github.com/ruc-datalab/EvoOntology

Introduction

Data agents over heterogeneous data (Liu et al. 2026; Sahu et al. 2025; Li et al. 2023; Hong et al. 2025; Zhang et al. 2023a) aim to solve natural-language tasks over both structured data (e.g., tables and databases) and unstructured data (e.g., documents and files). To accomplish such tasks, an agent must continuously interact with heterogeneous data sources to gather the information required for producing the final answer. Recent advances in tool use for large language models (LLMs) (Yao et al. 2022; Schick et al. 2023; Qin et al. 2023; Patil et al. 2024) have enabled agents to directly access and manipulate external data sources, providing the foundation for such data interactions.

However, direct interaction with heterogeneous data raises a fundamental question: Can a data agent effectively understand heterogeneous data? In real-world deployments, data resides outside the agent in the form of relational databases, semi-structured filings, and unstructured documents, while

Figure

(a) Data Agent w/o Ontology Layer

(b) Data Agent with Self-Evolving Ontology Layer

Figure 1: A self-evolving ontology layer helps data agents understand heterogeneous data.

the agent can access the data only through generic tools such as SQL interfaces and file readers. A fundamental challenge is that neither the structure nor the content of these heterogeneous data sources is known a priori. As a result, the agent has to blindly explore the underlying data by repeatedly issuing probing queries, guessing where the requested concepts are located, and inspecting potentially irrelevant content. This mismatch creates a persistent agent–data gap. Bridging this gap requires an intermediate ontology layer that explicitly represents domain concepts, grounds the concepts in the underlying data, and enables agents to interact with data at the semantic level rather than the physical level.

Existing approaches to agent–data interaction can be broadly divided into raw querying and semantic-layer-based interaction. Raw-querying methods (Pourreza and Rafiei 2023; Wang et al. 2025; Talaei et al. 2024) allow agents to directly inspect schemas and issue exploratory queries over the underlying data. While effective for small and relatively simple data sources, they scale poorly to wide and heterogeneous data, where agents can easily become trapped in repetitive and inefficient exploration. Semantic-layer approaches (Hitzler 2021; dbt Labs 2023; Feng et al. 2024; Chang and Fosler-Lussier 2023), in contrast, provide metadata, including schemas, entities, metrics, and other domain semantics, to guide the agent. However, incorporating the entire semantic layer into the agent context is impractical for large data sources due to context-length limitations. Moreover, existing semantic layers are typically predefined and maintained manually, making them costly to construct and

∗^{*}Corresponding author: Shaolei Zhang.

difficult to adapt to new data sources, tasks, and agents. These limitations highlight the need for an effective and scalable ontology intermediate layer to bridge the agent–data gap.

In this paper, we advance the intermediate layer between agents and data from static semantic descriptions to an interactive ontology layer that agents can flexibly access through tools. Autonomously constructing such an ontology is inherently challenging because both data sources and agent behaviors are diverse and dynamic, requiring the ontology to adapt to both. To address this challenge, we introduce EvoOntology, a self-evolving ontology layer that continuously adapts to the underlying data and the agents that use it. As illustrated in Figure 1, the ontology consists of three components: a schema layer, which defines object types and reference rules; a content layer, which stores domain knowledge and data mappings; and a tool layer, which exposes executable interfaces for agents to access and manipulate the ontology. These components are encapsulated as a Model Context Protocol (MCP) server, enabling agents to actively query and interact with the ontology rather than passively consuming it as contextual metadata.

Specifically, EvoOntology first employs a builder agent to construct an initial ontology by issuing probe queries over the underlying data sources and grounding each ontology entry in the observed data. EvoOntology then continuously refines the ontology based on agent interaction trajectories. Specifically, it performs attribution analysis to identify deficiencies in the current ontology, proposes targeted refinements to its schema, content, or tools, and accepts each refinement only after it passes a paired evaluation on a held-out validation set. Through this iterative self-evolution process, the ontology continuously adapts to both heterogeneous data and agent behaviors, progressively bridging the agent–data gap.

In summary, our main contributions are as follows:

• Interactive Ontology Layer. We propose the first autonomous interactive ontology layer for data agents and encapsulate it as an MCP server, enabling agents to query and interact with heterogeneous data through tools.

• Self-Evolving Ontology. We introduce a builder agent for autonomous ontology construction and a self-evolving framework that refines the ontology through attribution analysis, targeted refinement, and paired evaluation.

• Strong Performance. Extensive experiments on three well-adopted data-agent benchmarks with four LLM backbones demonstrate that EvoOntology consistently and substantially outperforms strong baselines and existing semantic-layer approaches.

References (39)