Live data from Hacker News

Show HN: Natural-SQL-7B, a strong text-to-SQL model

github.com

31–40 of 171 posts

Re: Show HN: Natural-SQL-7B, a strong text-to-SQL model

#31

Earlier quoted context omitted.

do you not trust the setting OAI provides to exclude your conversation from training data?

1) OpenAI has consistently gone back on commitments it has made 2) Sam Altman has a shady track record publicly, and if you believe the things people say privately he has consistently done business very dishonestly throughout his career. He is the CEO, and virtually the entire executive team are people he brought in from his network. It’s his company. 3) To give one example of many, OpenAI recently changed the terms…

Hm. I disagree that executive level shenanigans translate to real world non-compliance with privacy law when there is an explicit request to delete/not store data.

Re: Show HN: Natural-SQL-7B, a strong text-to-SQL model

#33
post #28

Earlier quoted context omitted.

do you not trust the setting OAI provides to exclude your conversation from training data?

about as much as I trust 23andme to keep my genetic data private i give their intent the benefit of the doubt but I’ve been on the other side of too many data collection systems to trust that theirs is foolproof and more secure than my local machine.

To me there is a significant difference between permanent storing and “keeping private” (23andme is legally prohibited from deleting your genetic data) and not using and deleting after 30 days.

fwiw 23andme genetic data (distinct from summary ancestry data) has not leaked afaik

Re: Show HN: Natural-SQL-7B, a strong text-to-SQL model

#34
post #21

So it looks like it scores 76.5% on SQL-Eval [0], a bit behind GPT-4 at 83% and sqlcoder-15b at 78%. What kind of applications would this be useful for? What can you build with an AI data science intern that's right 75% of the time? As a programmer who always has to look stuff up when I SQL, I could definitely see asking something like this for a first draft of a query but it seems like I'm slightly better off asking…

1. If you are a a programmer I think you should learn SQL. It will give you a different perspective on programming that I think is invaluable. (I.e. programming without for loops)

2. Combining and slicing data is a craft, and doing it subtly wrong in one step can lead to fatal errors in the outcome.

And most importantly, it can be very difficult to notice. Numbers don't smell.

That is why I would be very hesitant to give a slightly more than trivial task to an engine that fails 25% of the time.

But I guess that is the same as any other programming task. Just that other programming tasks require a lot of boilerplate where an AI can help. SQL is much more straight to it.

Maybe it could be useful to ask questions that are similar to writing testcases "how can I verify that my query is doing the right thing"?

Re: Show HN: Natural-SQL-7B, a strong text-to-SQL model

#35

Earlier quoted context omitted.

1) OpenAI has consistently gone back on commitments it has made 2) Sam Altman has a shady track record publicly, and if you believe the things people say privately he has consistently done business very dishonestly throughout his career. He is the CEO, and virtually the entire executive team are people he brought in from his network. It’s his company. 3) To give one example of many, OpenAI recently changed the terms…

If you don't trust OpenAI, you can choose to trust Microsoft. Azure OpenAI is 3-months behind OpenAI that costs 3x as much, but you get more 'security' and better performance.

> Azure OpenAI is 3-months behind OpenAI…

How is it 3 months behind if you get access to current OpenAI models?

Re: Show HN: Natural-SQL-7B, a strong text-to-SQL model

#36

> complex questions like above. This is cool, and up my alley. But that's not a complex question, it's a basic analytics question. Most analysts will be able to write something like that in their sleep. I've been using ChatGPT for writing SQL, and it's mediocre. But it'll get better, I'm sure.

Sure, there is a blog post with some other examples of the first model iteration with more complex, multipart questions. https://www.chatdb.ai/post/naturalsql-vs-sqlcoder-for-text-t... I will update that to be a more truly difficult question. Appreciate the feedback!

Thank you, this is great work! I'll check it out.

Re: Show HN: Natural-SQL-7B, a strong text-to-SQL model

#37
post #17

Earlier quoted context omitted.

Thanks! Yes, that was an earlier iteration. The v1 is here https://huggingface.co/chatdb/natural-sql-7b . Plan to push to Ollama soon and build an open source free tool around it. Would love to hear about what you are building!

We are building Dot ( https://www.getdot.ai/ ). We mostly focus on good conversation design and data governance to ensure a great end user experience. Here is an example conversation about HN data https://eu.getdot.ai/share/c80139c9-13f4-4db4-88f6-6e058ba31...

That's impressive

Re: Show HN: Natural-SQL-7B, a strong text-to-SQL model

#39

This is not open source, because you have use-based restrictions. Call it what it is, source available.

> Call it what it is, source available. Also, it's only weights AFAICT — no source training data/code is available.

Shareware?

Re: Show HN: Natural-SQL-7B, a strong text-to-SQL model

#40
post #32

I doubt it's useful for complex queries or databases without proper relation info in the database schemes. So it's limited to rather simple queries for users without SQL knowledge. But I doubt they should have direct access to the database tables.

Yes it is designed for users without SQL knowledge, however, it can still perform fairly well with questions on the difficult side (for non technical users) with queries having multiple joins, aggregations, ratios, and subqueries.

Next step is fine tuning and leveraging larger models that can handle very complex questions, reasoning, and data schemas since this is only a 7B.

Post reply on HN