Live data from Hacker News

Vanna.ai: Chat with your SQL database

github.com

111–120 of 243 posts

Re: Vanna.ai: Chat with your SQL database

#111

What's the origin behind the name Vanna?

Author of the package here. It was originally because it's both a name and a finance term because I was originally using this to query a financial database.

https://www.thebalancemoney.com/vanna-explanation-of-the-opt...

Re: Vanna.ai: Chat with your SQL database

#112
post #97

Earlier quoted context omitted.

I think you have a point. I also think people who share this mindset and keep sticking with it will have a tough future. The technical benefits and potentials clearly outshine the problems and challenges. That's also true in this example. You just have to let go of some principles that were helpful in the past but aren't anymore.

What technical benefits?

A translation engine between natural language and SQL means that everyone can communicate with a SQL database now. That's huge. Soon also DB people will use it to get the response for complex questions and queries. It's just more natural and way faster.

With technology like this, there is little reason to even know SQL anymore as the average developer. Just like today, the average developer doesn't know how databases work because the cloud takes care of it. We're moving up on the abstraction ladder and tomorrow all you need to know for SQL is to ask the right question.

Re: Vanna.ai: Chat with your SQL database

#113
post #112

Earlier quoted context omitted.

What technical benefits?

A translation engine between natural language and SQL means that everyone can communicate with a SQL database now. That's huge. Soon also DB people will use it to get the response for complex questions and queries. It's just more natural and way faster. With technology like this, there is little reason to even know SQL anymore as the average developer. Just like today, the average developer doesn't know how databases…

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

Re: Vanna.ai: Chat with your SQL database

#114

I haven't loaded this up so maybe this has been accounted for, but I think a critical feature is tying the original SQL query to all artifacts generated by Vanna. Vanna would be helpful for someone that knows SQL when they don't know the existing schema and business logic and also just to save time as a co-pilot. But the users that get the most value out of this are the ones without the ability to validate the genera…

This is a good idea. I think what you'd want to do is override the generate_sql function and store the question with the "related" metadata and the generated sql somewhere:

https://github.com/vanna-ai/vanna/blob/main/src/vanna/base/b...

We're going to be adding a generic logging function soon and fairly soon what you're talking about could just be a custom logger.

Re: Vanna.ai: Chat with your SQL database

#116
post #2

I'm curious about how this performs with more complex queries, like joins across five tables. Also, does the training phase actually involve writing SELECT queries by hand? In the age of ORMs and so on, many people have probably forgotten how to write raw SQL queries.

Author of the package here. Joining 5 tables is not a problem.

The training does not necessarily require you to write the queries by hand. A trick that we've seen people do is to just train with DDL statements and then ask "leading" questions if it can't answer on the first try.

I've been using the package myself for about 6 months and while I haven't forgotten SQL, what I have forgotten are the fully qualified table names and which tables live in which schemas etc since I never have to think about that.

Re: Vanna.ai: Chat with your SQL database

#117
post #70

I wonder if this supports spatial queries as in PostGIS, SpatiaLite, SQL Server Spatial as per the OGC standard? I'm interested in integrating a user friendly natural language query tool for our GIS application. I've looked at LangChain and the SQL chain before but I didn't feel it was robust enough for professional use. You needed to run an expensive GPT-4 backend to begin with and even then, it wasn't perfect. I th…

Author of the package here. I think that it probably could handle that but may need more example SQL queries.

Re: Vanna.ai: Chat with your SQL database

#118
post #77
post #34

Sorry, maybe I'm just too tired to see it, but how much control do you have over the SQL query that is generated by the AI? Is there a risk that it could access unwanted portions or, worse, delete parts of your data? (the AI equivalent of Bobby Tables, so to speak)

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.

Re: Vanna.ai: Chat with your SQL database

#119
post #5

This is awesome. It's a quick turnkey way to get started with RAG using your own existing SQL database. Which to be honest is what most people really want when they say they "want ChatGPT for their business". They just want a way to ask questions in prose and get an answer back, and this gets them a long way there. Very cool!

Author of the package here. Thank you! That's exactly what we've seen. Businesses spent millions of dollars getting all their structured data into a data warehouse and then it just sits there because the people who need the information don't know how to query the database.

Re: Vanna.ai: Chat with your SQL database

#120
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…

> Microsoft & friends will release something that makes it look like a joke

True, Microsoft & Friends have gotten greedy every passing year. Before they used to develop the platform (OS,DB etc.,) and let others develop and sell apps on it that would benefit them as well as the whole ecosystem.

Now they want every last dollar they can squeeze out of the ecosystem. So they don't leave any stone unturned and they have big pockets to do that.

Post reply on HN