What to check before a query runs
Confirm that the tables and columns exist, the joins and aggregations mean what the business expects, and the requester has access.
ONDO AI ONTOLOGY connects documents, data structures, and business terms in a knowledge graph. It helps conversational AI answer questions using enterprise knowledge.
Connect internal knowledge · validate queries before execution · apply knowledge changes after human approval
AI-generated SQL can refer to tables or columns that do not exist. Connect internal data structures with business terms and check the query before it runs.
The graph supplies relevant structures and business terms for SQL generation. A separate validation step checks the result against registered structures and rules.
Confirm that the tables and columns exist, the joins and aggregations mean what the business expects, and the requester has access.
Compare generated SQL with the registered graph and validation rules. Reject violations and record why, so queries and knowledge can be improved.
Ask a question in natural language to find the data you need and see it in a table. Review the query conditions and results in one place.
This example shows a product query in the ONDO AI workspace. Products and figures shown are sample data.
The results are ready. Here is the summary.
| Cost ratio Rank | Style code | Product name | Confirmed Retail price | Cost ratio (%) | Sell-through rate (%) | Supplier code | Supplier name |
|---|---|---|---|---|---|---|---|
| 5 | NDTS5B899IV | Navy cool-touch striped polo | 139,000 | 15.7 | 56.5% | 0000103026 | Hansung A&D Co., Ltd. |
| 7 | NDTS5B404NV | Cool Light navy C/P piqué polo | 159,000 | 16.0 | 47.0% | 0000303572 | Pacific Apparel Ltd |
| 7 | NDTS5B404BR | Cool Light brown C/P piqué polo | 159,000 | 16.0 | 44.2% | 0000303572 | Pacific Apparel Ltd |
| 7 | NDTS5B404BG | Cool Light beige C/P piqué polo | 159,000 | 16.0 | 42.8% | 0000303572 | Pacific Apparel Ltd |
| 7 | NDTS5B404BK | Cool Light black C/P piqué polo | 159,000 | 16.0 | 41.8% | 0000303572 | Pacific Apparel Ltd |
| 7 | NDTS5B404LB | Cool Light light-blue C/P piqué polo | 159,000 | 16.0 | 40.5% | 0000303572 | Pacific Apparel Ltd |
| 7 | NDTS5B404LG | Cool Light light-green C/P piqué polo | 159,000 | 16.0 | 35.8% | 0000303572 | Pacific Apparel Ltd |
| 7 | NDTS5B404BL | Cool Light blue C/P piqué polo | 159,000 | 16.0 | 31.6% | 0000303572 | Pacific Apparel Ltd |
| 1 | NDTS5B897NV | Navy embroidered-logo T-shirt | 109,000 | 12.7 | 26.3% | 0000103026 | Hansung A&D Co., Ltd. |
| 3 | NDTS5B898NV | Navy embroidered-logo polo | 139,000 | 14.9 | 23.3% | 0000103026 | Hansung A&D Co., Ltd. |
Connect terms extracted from documents with data structures in a knowledge graph. Conversational AI refers to this knowledge while people inspect and refine the graph in real time.
An LLM extracts business terms from internal documents, including image-based files.
Link data structures and business terms in the graph. User edits remain in place when the source data is reloaded.
Manage views, columns, joins, and terms in the graph to give AI a consistent reference.
Conversational AI first finds the tables, columns, and joins relevant to a question.
Compare generated SQL with the graph before execution. Reject rule violations and prompt a rewrite.
Generating and validating SQL are separate steps. Structural errors are checked before execution; business meaning and access rights need their own review.
Review database schemas, business terms, and representative questions. Check structural validation, access rights, and operating conditions in the environment where the system will run.
| Inputs | DB schema, business terms, representative questions, access rights, and aggregation rules |
|---|---|
| Structure checks | Compare generated SQL with registered tables, columns, and joins before execution |
| Output and history | Query results, references, rejection reasons, and edit history |
| Deployment | Confirm target databases, supported SQL syntax, schema updates, and execution paths |
| Meaning and access | Review metric definitions, aggregated results, and data access separately |
| Evaluation | Use representative questions, wrong answers, and rejections to assess accuracy, retries, and validation errors |
Structural validation does not guarantee a correct answer or catch every error. Confirm scope and performance with real data, questions, models, and execution conditions.
Related work — Enterprise AI platform
Our experience with internal data queries, access, and usage management informs the knowledge core.
We operate a knowledge graph core. The next step is expanding toward an ontology that can reason over relationships in that knowledge.
Designed a structure for linking schemas and business terms in a graph and reviewing them visually.
We operate schema and business-term linking, SQL validation, live knowledge editing, and improvement suggestions.
Explore OWL-based formal reasoning to derive relationships between knowledge. We also plan to assess value ranges, hierarchies, and compatibility with the existing graph.
We will use representative questions and data structures to explore how natural-language queries could fit your work.