(no title)
tillvz | 1 month ago
We've been building natural language analytics at Veezoo (https://www.veezoo.com/) for 10 years, and what we find is that straight Text-to-SQL doesn't scale. If AI writes SQL directly, you're building on a probabilistic foundation. When a CFO asks for revenue the number can't just be correct 99% of times. Also you can't get the CFO to read SQL to verify.
We're solving that with an abstraction layer (Knowledge Graph) in between. AI translates natural language to a semantic query language, which then compiles to SQL deterministically.
At the same time you can translate the semantic query deterministically back into an explanation for the business user, so they can easily verify if the result matches their intent.
Business logic lives in the Knowledge Graph and the compiler ensures every query adheres to it 100%, every time. No AI is involved in that step.
Veezoo Architecture: https://docs.veezoo.com/veezoo/architecture-overview
kburman|1 month ago
I'm curious how this approach manages cardinality explosion? Also, how do you handle cases where a user asks for data that requires running multiple queries, specifically where each query depends on the results of the previous one?
tillvz|1 month ago
The Knowledge Graph explicitly models cardinality and relationships between entities. The compiler uses that to generate SQL that handles it correctly, using e.g. DISTINCT
> Also, how do you handle cases where a user asks for data that requires running multiple queries, specifically where each query depends on the results of the previous one?
Veezoo can generate adaptive plans, so it can decide to wait for a database query to return results before continuing
Leynos|1 month ago
(Prompts need to be version controlled too, of course)
tillvz|1 month ago
The fundamental artifact is VQL (Veezoo Query Language), which queries against a Knowledge Graph containing your business data model, things like your "Revenue" measure.
A query might look like this:
var order from kb.Order
date_in(order.Order_Date, date("#today"))
var retRevenue = kb.Order.Revenue(order)
select(retRevenue)
If the business decides to change how revenue is computed, the VQL stays valid but compiles to different SQL. At the same time Veezoo can test that with your knowledge graph change that you are not breaking anyones dashboard and even apply evolutions if needed
VQL: https://docs.veezoo.com/vkl/kb-layer/vql/
Evolutions: https://docs.veezoo.com/vkl/evolutions/
The Knowledge Graph itself is version controlled, so the data team can trace every change.