What happened
Snowflake is experimenting with ontology-aware reasoning for Cortex Agents, aiming to help enterprise AI agents understand business concepts, hierarchies, synonyms, and domain constraints rather than relying only on tables, columns, keys, and joins.
An ontology is a formal model of concepts and relationships in a domain. A knowledge graph represents entities and typed links as nodes and edges. In many enterprise settings, the key challenge is not a lack of data, but a gap between how humans define real-world meaning and how AI systems retrieve information from relational schemas. Snowflake’s Semantic View already provides a governed semantic layer with entities, relationships, metrics, and dimensions, but many domain meanings are not explicitly encoded there.
The benchmark setup
The evaluation used a simplified biomedical scenario focused on ontology-dependent reasoning over cancer cell line drug-screening data. Snowflake combined two public resources:
- Cell Ontology: 33,651 terms connected by about 50,000 hierarchy and relationship edges.
- PRISM drug repurposing dataset: 4,518 drugs tested across 578 human cancer cell lines, producing more than 2.6 million cell viability measurements.
The semantic mismatch is central: PRISM labels data by tissue type, such as lung or breast, while Cell Ontology organizes concepts by cell lineage, such as epithelial or stromal cells. The agent therefore has to bridge two vocabularies before it can answer analytical questions. The benchmark included 22 difficult questions covering term resolution, cohort comparison, cross-tissue analysis, drug ranking, distribution analysis, and multi-category comparison. Each agent configuration was run five times to measure consistency.
The baseline used Semantic View with Cortex Analyst to translate natural language into validated SQL over the governed semantic layer. This created a reference point for measuring the incremental value of ontology-aware techniques.
Three enhancement patterns
The first enhancement was a knowledge graph stored directly in Snowflake tables. A KG_NODE table held entities and attributes, while a KG_EDGE table held typed relationships. Recursive CTEs enabled variable-length traversal, which is useful when the number of hierarchy steps is unknown in advance. This approach can deterministically expand ontology descendants; for example, it can traverse more than 10 levels under “epithelial cell” and include 693 descendant concepts. The trade-off is orchestration complexity: the agent had seven tools and had to choose the right sequence, while stored procedures required exact concept names and did not inherently resolve synonyms.
The second pattern was flattened GraphRAG. Instead of traversing the ontology at query time, the system precomputed a profile for each concept, including its official name, definition, synonyms, local neighborhood, and attributes aggregated from descendants. These profiles were indexed in Cortex Search for hybrid keyword and vector retrieval. At runtime, the agent needed only a search tool and a SQL tool. Fewer tools reduced the decision space, and synonym handling improved—for example, “flat epithelial” could be resolved to the relevant squamous epithelial concept. The limitation is that performance depends heavily on profile quality and index refresh practices.
The third pattern added targeted terminology mappings on top of GraphRAG. The team embedded eight curated mappings between cell types, tissue types, and compound terms into the system prompt. One example mapped Squamous Epithelial Cell to Skin, Lung, Esophagus, Bladder, and Cervix. This compressed multi-step lookups into deterministic rules and reduced last-mile errors. However, these rules require manual maintenance and only help for concepts that have already been mapped.
Results and implications
Within this benchmark, all enhanced configurations improved on the baseline. The knowledge graph approach raised evaluated accuracy by about 10 percentage points through exhaustive hierarchy expansion. GraphRAG added roughly another 10 percentage points, likely helped by simpler orchestration and pre-aggregated descendant data. The terminology-mapping version further improved handling of complex aliases and compound expressions.
A key observation was that GraphRAG with aggregated descendant attributes, even without static mappings, delivered most of the total gain over the baseline—about 80%. The main driver was better structured context, not simply more model-side reasoning.
Snowflake also used Cortex Code’s agent optimization workflow to run the 22-question suite, analyze repeated failures, revise prompts and tool descriptions, and compare results. Improvements such as enriched search text, explicit tissue-type pass-through, and standardized threshold rules came from this evaluate-optimize-compare loop.
Industry outlook
This work should not be read as a complete biomedical reasoning system. It is a controlled comparison of ontology techniques under a simplified task. Still, it points to a broader enterprise pattern: a semantic layer is necessary but often insufficient for trustworthy AI agents. Ontologies, controlled vocabularies, graph traversal, retrieval indexes, and a small number of curated rules can turn domain knowledge into structured context that agents can use.
For industries such as financial services, retail, supply chain, and life sciences, the differentiator will not be merely whether a model can be called from an application. It will be whether the organization can govern its domain knowledge well enough for AI systems to reason with it reliably.



