Enterprise data analysis requires agents to connect analytical requests with knowledge distributed across databases, business documents, and existing example tasks. Without an explicit representation of this knowledge, an agent may produce incorrect analytical results and cannot reliably incorporate feedback. We present AgentOnto, an ontology-guided LLM agent for enterprise data analytics. AgentOnto organizes heterogeneous enterprise knowledge into an ontology that directly guides analysis and incorporates confirmed feedback. Iterative Ontology Preparation further improves the ontology through self-generated analysis tasks. We evaluate AgentOnto on two public data sources. AgentOnto substantially outperforms representative methods, while module-level evaluations confirm the effectiveness of ontology construction, analysis, and updating. A real-world deployment further demonstrates its practical value in enterprise analytics. These results demonstrate that explicitly constructing, using, and updating enterprise knowledge supports reliable and adaptable data analysis.
Figures & tables
Figure 1. Analytical operations and business concepts in two public workloads. (a) Share of tasks requiring different analytical operations across the retail and insurance workloads. (b) Distribution of business concepts required by the retail workload but not captured by its database schema.
Figure 2. Overview of AgentOnto. Ontology Construction integrates enterprise resources into an enterprise analytics ontology. Ontology-Guided Analysis uses the ontology throughout request processing, while Ontology Updating incorporates confirmed feedback through targeted changes and behavioral checks. Iterative Ontology Preparation repeatedly generates and analyzes tasks to examine and refine the ontology before actual requests.
Method
WDI ( N=282 )
AQS ( N=324 )
Domain Average (%)
Correct
Accuracy (%)
Correct
Accuracy (%)
DIN-SQL
125
44.3
213
65.7
55.0
ReFoRCE-v8
122
43.3
205
63.3
53.3
MAC-SQL
125
44.3
142
43.8
44.1
Vanna
131
46.5
131
40.4
43.4
AgentOnto
223
79.1
311
96.0
87.5
Table 1. Analysis accuracy on WDI and AQS and the domain average. Bold and underlined values denote the best and second-best results.
Capability
Method
WDI
AQS
Ontology F1 (%)
Database connection (%)
Analysis accuracy (%)
Ontology F1 (%)
Database connection (%)
Analysis accuracy (%)
Ontology content + mappings
AgentOnto Construction
93.6
84.3
70.2
76.7
69.0
67.0
Ontology content + mappings
Single-Prompt LLM
83.0
43.1
68.1
59.1
47.6
65.1
Ontology content only
OntoEKG
2.9
-
22.0
5.3
-
16.4
Ontology content only
Memoryless CQ-by-CQ
6.5
-
20.6
25.7
-
16.7
Database mappings only
Ontop bootstrap
-
51.0
15.6
-
88.1
14.5
Table 2. Ontology construction results on WDI and AQS, grouped by method capability. A - denotes an unsupported capability. Bold and underlined values denote the best and second-best results in each column.
Method
WDI
AQS
Domain Average
Analysis accuracy ↑
Silent error ↓
Answer coverage
Analysis accuracy ↑
Silent error ↓
Answer coverage
Analysis accuracy ↑
Silent error ↓
Answer coverage
Direct Schema
37.9
63.0
74.8
8.6
97.3
78.7
23.3
80.1
76.8
Direct Documents
45.4
60.2
83.7
34.9
74.4
84.3
40.1
67.3
84.0
Direct Ontology
43.6
60.2
78.4
59.3
41.6
84.6
51.4
50.9
81.5
DIN-SQL
44.3
55.2
98.9
65.7
32.8
97.8
55.0
44.0
98.4
ReFoRCE-v8
43.3
56.7
100.0
63.3
36.3
99.4
53.3
46.5
99.7
Table 3. Analysis results on WDI and AQS (%) and their domain average. Higher analysis accuracy and lower silent error indicate better performance. Answer coverage provides additional context because not every request should be executed. Bold and underlined values denote the best and second-best results for analysis accuracy and silent error.
Method
Update
Correction
Behavior Preservation
Generalization
Static
22.7
3.4
75.9
17.2
Context-Only
–
89.7
89.3
89.7
Memory/Reflection
–
89.7
86.2
89.7
AgentOnto Updating
100.0
100.0
100.0
100.0
Table 4. Ontology updating results on 22 AQS feedback events and 29 requests per behavioral category (%). Higher values indicate better performance. A dash indicates that a method does not produce an updated ontology.
Figure 3. Enterprise deployment in consumer manufacturing. (a) Deployed interface presenting an analysis of order volume, order value, and consumption patterns. (b) Controlled task results with task expansion and ontology updating.