Live data from Hacker News

MQL – Client and server to query your db in natural language

github.com

11–20 of 33 posts

Re: MQL – Client and server to query your db in natural language

#11
post #6

Nice job getting something released! How does this compare to the other similar open source solutions like Vanna AI and DataHerald?

Thank you, we have not done that comparison yet, but we will check these 2 out to learn more. We calculated the accuracy with a test data set which is part of the repo, we will see how can compare this with others.

Re: MQL – Client and server to query your db in natural language

#12

text-to-sql is a dead end. There's no way for a model to correctly interpret the meaning of every column in a real world database using the `information_schema` alone. Most cloud warehouses (e.g. Snowflake) don't use foreign keys, so you don't even know the joins. Imagine you hire a highly skilled data analyst (e.g. 9 out of 10 proficiency in SQL) and start asking them questions about your database. They won't answer…

providing some context about the data, the schema + samples from the entries works quite well, definitely room for improvement but already quite usable imho

Re: MQL – Client and server to query your db in natural language

#13

text-to-sql is a dead end. There's no way for a model to correctly interpret the meaning of every column in a real world database using the `information_schema` alone. Most cloud warehouses (e.g. Snowflake) don't use foreign keys, so you don't even know the joins. Imagine you hire a highly skilled data analyst (e.g. 9 out of 10 proficiency in SQL) and start asking them questions about your database. They won't answer…

Agreed, but perhaps more semantic meaning could be expressed in metadata for tables and columns, extending beyond what's typically found in information_schema. (This may be the semantic layer you are talking about.)

Here it seems MQL isn't a query language as much as it's a text-to-SQL translator and you're right... without a bit more understanding of the data's role and purpose and intent it's a hard job for anyone, human or AI.

It strikes me that as I write an sql statement I'm not only using knowledge of sql but also knowledge of domain and database structure that I don't even think about until I need to show someone else how to do the query.

Re: MQL – Client and server to query your db in natural language

#14
post #12

text-to-sql is a dead end. There's no way for a model to correctly interpret the meaning of every column in a real world database using the `information_schema` alone. Most cloud warehouses (e.g. Snowflake) don't use foreign keys, so you don't even know the joins. Imagine you hire a highly skilled data analyst (e.g. 9 out of 10 proficiency in SQL) and start asking them questions about your database. They won't answer…

providing some context about the data, the schema + samples from the entries works quite well, definitely room for improvement but already quite usable imho

Agreed, very usable if you know SQL and iterate from whatever the LLM spits out.

Re: MQL – Client and server to query your db in natural language

#15

text-to-sql is a dead end. There's no way for a model to correctly interpret the meaning of every column in a real world database using the `information_schema` alone. Most cloud warehouses (e.g. Snowflake) don't use foreign keys, so you don't even know the joins. Imagine you hire a highly skilled data analyst (e.g. 9 out of 10 proficiency in SQL) and start asking them questions about your database. They won't answer…

> There's no way for a model to correctly interpret the meaning of every column in a real world database using the `information_schema` alone. Why would text-to-sql be limited to information_schema alone? Human analysts would use additional documentation, why wouldn't an LLM-based text-to-sql system?

I should have clarified. There's a large number of apps that are:

1. taking info strictly from SQL (e.g. information_schema, query history)

2. taking a user input / question

3. writing SQL to answer that question

An app like this is what I call "text-to-sql". Totally agree a better system would pull in additional documentation (which is what we're doing), but I'd no longer consider it "text-to-sql". In our case, we're not even directly writing SQL, but rather generating semantic layer queries (i.e. https://cube.dev/).

Re: MQL – Client and server to query your db in natural language

#18
For the majority of people from non-tech business functions, the ability to ask for insights from data is liberating. Tools like this can unlock their potential to make more informed decisions. Imagine a store manager of a hyperlocal grocery startup managing a dark store. What if they could ask questions like "What is the fulfilment rate of a certain SKU between 12-3 pm in their store for the past 7 days?"

Re: MQL – Client and server to query your db in natural language

#19

Or one could, you know, learn SQL.

:D We have been working with many non-tech founders and business people who are genuinely interested in data but they cannot learn SQL, due to different constraints.

What are those constraints? Really usable SQL for Business people can be learnt in a day long workshop or less time. If they can do Excel, they can do SQL too.
Post reply on HN