Live data from Hacker News

Vanna.ai: Chat with your SQL database

github.com

231–240 of 243 posts

Re: Vanna.ai: Chat with your SQL database

#232
post #37

Earlier quoted context omitted.

Why not give it access to relevant parts of the database only? And read only access too?

Access management can be harder than building queries if you start getting fine grained.

Yes. Then again, in a project where queries are simpler than granting relevant access to a third party, I guess the AI chat product is just not a good fit.

Re: Vanna.ai: Chat with your SQL database

#234
disclaimer: founder of textql.com (yea i know the name is super obvious)

I would happily bet a kidney that not a single product that has an LLM of any kind writing SQL using next-character-prediction will ever be useful to get results for a business person in an enterprise setting (~5+ people on the data team of a company). Although it's fine for technical users as advanced autocomplete

I'm surprised no one has pointed out that as a building block: english doesn't map 1:1 to SQL at all.

"Can you get me a list of users who've ordered more than 10 red products"

doesn't make it at all clear whether you're writing - s from u where u.ordered_more_than_10_red_products = True - s from u where u.red_products_ordered > 10 - or any other combination of variants

15 years of VCs have poured well over 10 billion dollars claiming to solve "text to sql" of some kind and 15 year later we're still writing SQL - something something chesterton's fence... at least we don't have training sessions where data eng people sit in a room and hard code synonyms for "revenue" into thoughtspot anymore

The only way you can approach something like this at scale is w/ a mature ontology structure for your data. What that means in is a very opinionated data modeling method (handful of valid ones) that is enforced at the level of the data modeling system - dbt / sqlmesh / stored procedures, or otherwise - semantic layers are... kinda ok but mostly doesn't get there on expressiveness either

^lots of ways to do the above, small handful of cool people who are working on it. (yes that kinda includes us - sorry for the implicit self promo)

- obvious second disclaimer that if your "database" is 3 tables w/ clearly labeled joins, feel free to disregard everything I just said

- oh, also the correct query according to chatgpt is SELECT u.user_id, COUNT(o.product_id) AS total_red_products FROM users u JOIN orders o ON u.user_id = o.user_id JOIN products p ON o.product_id = p.product_id WHERE p.color = 'red' GROUP BY u.user_id HAVING COUNT(o.product_id) > 10;

- obvious 4th disclaimer - if i'm wrong, i don't know what i'm talking about

Re: Vanna.ai: Chat with your SQL database

#235

Earlier quoted context omitted.

I think a lot of people tried just asking GPT-3.5 to "Write me full stack web app no bugs please." when it first came out. When it failed to do that they threw up their hands and said "It's just a parrot." Then GPT4 came out, they tried the same thing and got the same results. I keep seeing comments regarding it not being helpful because "super big codebase, doesn't work, it doesn't know the functions and what they d…

Nail. Head. The amount of code I now "write" (I've started calling it directing) and features I've put into my side projects has been more than the last 5-10 years combined this last year. I successfully created a sold a product within 3 months. Start to finish, because of the productivity power I received. People are misusing it.

I'm also using GPT-4 for my side projects. For the database specifically, I can write a short sentence describing my table. Then get GPT-4 to generate the SQL to create it, plus a TypeScript interface and data repository module for access with the methods and SQL for basic CRUD. If I need more than basic CRUD, it can usually create methods for that also.

Its also pretty good at generating basic tests, amongst other things.

Re: Vanna.ai: Chat with your SQL database

#236

Earlier quoted context omitted.

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

I already know SQL, and yes it can take time to form exceptionally complex queries, but ChatGPT doesn't seem to do those accurately (yet). CGPT is more useful for general programming languages where there's a lot more boilerplate.

I've found GPT-4 to be alot better than the free version of ChatGPT (which uses the earlier GPT 3.5).

Re: Vanna.ai: Chat with your SQL database

#237

Earlier quoted context omitted.

All the podcasts I've been listening to recommend RAG over fine-tuning. My intuition is that having the relevant knowledge in the context rather than the weights brings it closer to the outputs, thereby making it much more likely to provide accurate information and avoid hallucinations/confabulations.

Do you have any podcasts you would reccomend with this type of content?

I listen to Data Skeptic and Practical AI. It's interesting content, and I find Practical AI has guests who are particularly relevant to what I want to learn, but you should keep in mind that the guests are usually trying to promote their own products, so everything they say should be taken with a grain of salt

Re: Vanna.ai: Chat with your SQL database

#238

Earlier quoted context omitted.

I already know SQL, and yes it can take time to form exceptionally complex queries, but ChatGPT doesn't seem to do those accurately (yet). CGPT is more useful for general programming languages where there's a lot more boilerplate.

I've found GPT-4 to be alot better than the free version of ChatGPT (which uses the earlier GPT 3.5).

It is. I should've mentioned that I don't have access to that. But I can still hammer out correct SQL faster than I can prompt ChatGPT.

Re: Vanna.ai: Chat with your SQL database

#239
post #27

Earlier quoted context omitted.

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

You can check this out https://www.sqlai.ai . It has AI-powered generators for: - Generate SQL - Generate optimized SQL - Fix query - Optimize query - Explain query Disclaimer: I am the solo developer behind it.

s/GTP/GPT/g

Re: Vanna.ai: Chat with your SQL database

#240

I have been keeping track of a few products like these including some that are YC backed. Interesting space as I am looking for a solution myself: - Minds DB (YC W20) https://github.com/mindsdb/mindsdb - Buster (YC W24) https://buster.so - DB Pilot https://dbpilot.io and now this one

also Brewit.ai (YC W23) https://brewit.ai/
Post reply on HN