Most of us have realized that simply throwing schema metadata into a vector database or embedding model doesn't stop text-to-SQL agents from hallucinating complex business logic. If an agent doesn't understand your specific business context, it fails.
This video by Databricks co-fonders is truly inspiring: https://www.youtube.com/watch?v=Yp_u1NpbkJg Instead of a flat semantic layer, it talks about an active, self-improving knowledge graph that weighs definitions based on authority and actual usage patterns (almost like a PageRank for metadata). It got an 84.5% first-attempt accuracy rate on complex workloads by separating the core ontology from the execution runtime.
For those of you building in production right now:
How are you handling the mapping of highly subjective metrics (like calculating "churn" or "net active ARR") without hardcoding endless custom rules?
Do you think a graph-based ontology layer is the only real path to enterprise-grade text-to-SQL accuracy?
Curious to hear your thoughts on how you’re solving the semantic context gap.