Live data from Hacker News

Vanna.ai: Chat with your SQL database

github.com

141–150 of 243 posts

Re: Vanna.ai: Chat with your SQL database

#142

How about instead of making AI wrappers to over 50 years old SQL, we’d make a database query language that’s easier to read an write?

https://prql-lang.org/ might be an answer for this. As a cross-database pipelined language, it would allow RAG to be intermixed with the query, and the syntax may(?) be more reliable to generate

Re: Vanna.ai: Chat with your SQL database

#143

Perhaps an uninformed question, but why do we need an llm rather than a simpler natural language to SQL NLP translator? Wouldn't that be much more efficient and reliable?

People have been working on simple natural language processing algorithms since the 50‘s. If it were easy we'd have one by now.

Re: Vanna.ai: Chat with your SQL database

#144

Earlier quoted context omitted.

What’s funny is SQL was supposed to be the natural language everyone uses to communicate with. Few bothered to learn it.

"Few"? I guess I must be one of the olds.

Are you a “business person” or analyst ?

Re: Vanna.ai: Chat with your SQL database

#145

Perhaps an uninformed question, but why do we need an llm rather than a simpler natural language to SQL NLP translator? Wouldn't that be much more efficient and reliable?

What would be missing from that is the ability to look up what tables are in the database, how they join together, what terminology the business uses, preferences around whether to exclude nulls from certain columns, etc.

This allows you to ask more of a “business question” like “who are the top 10 customers by sales?” and the LLM will be able to construct a query that joins the customers table to an orders table and get the results that you’re looking for.

With a simple NL to SQL, you’d have to say “join the customer table with the sales table, aggregate on the sales column from the orders table and limit the results to 10 rows” or something along those lines.

Re: Vanna.ai: Chat with your SQL database

#146
post #124

While I recognize the efforts in developing natural language to SQL translation systems, I remain skeptical. The core of my concern lies in the inherent nature of natural language and these models, which are approximative and lack precision. SQL databases, on the other hand, are built to handle precise, accurate information in most cases. Introducing an approximative layer, such as a language model, into a system tha…

The key here is to always have some structured intermediate layer that can allow people to evaluate what it is the system thinks they're asking, short of the full complexity of SQL. You'll need something like this for disambiguation anyway - are "Jon Favreau movies" movies starring or directed by Jon Favreau? Or do you mean the other Jon Favreau? Don't one-shot anything important end to end from language. Use languag…

I think AI to direct SQL will have use cases, but I personally have found it more of a fun toy than anything close to the main way I would interact with my data, at least in the course of running a business.

I am a fan of a semantic layer (I made an open source one but there are others out there), and think having AI talk to a semantic layer has potential. Though TBH a good UI over a semantic layer is so easy it makes the natural language approach moot.

https://github.com/totalhack/zillion

Re: Vanna.ai: Chat with your SQL database

#147
post #42
post #27

Earlier quoted context omitted.

Please turn this into a product. There's enormous demand for that.

I feel like by the time I could turn it into a product, Microsoft & friends will release something that makes it look like a joke. If there is no one on the SQL Server team working on this right now, I don't know what the hell their leadership is thinking. I am not chasing this rabbit. Someone else will almost certainly catch it first. For now, this is a fun toy I enjoy in my free time. The moment I try to make money…

> I feel like by the time I could turn it into a product, Microsoft & friends will release something that makes it look like a joke. If there is no one on the SQL Server team working on this right now, I don't know what the hell their leadership is thinking.

If Cortana for Azure isn't a thing in the works, I *really* don't know what the hell their leadership is working on. I could see insane value in "why is my website slow?" and getting actionable responses.

Re: Vanna.ai: Chat with your SQL database

#148
post #42
post #27

Earlier quoted context omitted.

Please turn this into a product. There's enormous demand for that.

I feel like by the time I could turn it into a product, Microsoft & friends will release something that makes it look like a joke. If there is no one on the SQL Server team working on this right now, I don't know what the hell their leadership is thinking. I am not chasing this rabbit. Someone else will almost certainly catch it first. For now, this is a fun toy I enjoy in my free time. The moment I try to make money…

There’s daylight between personal toolsmithing and a VC-backed startup (both are fun sometimes and a grind sometimes).

I’m getting together a bunch of related-sounding stuff in terms of integrating modern models into my workflow to polish up a bit and release MIT.

If you’d like to have a hand tidying it up a little and integrating it with e.g. editors and stuff, I think the bundle would be a lot cooler for it!

Re: Vanna.ai: Chat with your SQL database

#149

I've already done this with GPT-4. It goes something like this: Here's the table structure from MySQL cli `SHOW TABLE` statements for my tables I want to query. Now given those tables, give me a query to show me my cart abandonment rate (or, some other business metric I want to know). Seems to work pretty well.

What surprises me is the amount of programmers and analysts that I meet the don’t do this yet. Writing complex, useful SQL queries is probably the most valuable thing that ChatGPT does for me. It makes you look like a god to stakeholders, and “I’m not strong in SQL” is no longer an excuse for analysis tasks.

I've noticed this as well. Do you have any theories as to why that is?

Re: Vanna.ai: Chat with your SQL database

#150
post #77

Earlier quoted context omitted.

Guessing its intended use case is business analytic queries without write permissions —- particularly for non-programmers. I don’t think it’d be advisable to use something like this for app logic

100% -- in fact originally the package used to parse out SELECT statements and only execute SELECT statements. After some feedback, we decided that the permissions on the user should handle that level of detail.

You can select from a procedure that change data, though?
Post reply on HN