Live data from Hacker News

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

github.com

121–130 of 171 posts

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

#121
post #110

Earlier quoted context omitted.

That’ll often not scale to millions of records. Letting the database optimizer find the optimal execution path instead of doing it procedurally elsewhere might result in “finishes in 5 minutes”, versus “doesn’t fit in a night”.

This isn’t the 90s. Most hardware is way over-specced for the data sizes most people are dealing with. The number of use cases which are too heavy to finish in hours but small enough to fit in a single instance is pretty limited.

SQL is popular because it can be run on a map/reduce backend. So once you have written your code it can run on any number of machines.

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

#122

I don't think any of those text-to-sql models are solving the right problems. The hard part is not syntax or I don't know how to write a group by query. Most data scientists and engineers spend more time on understanding the meaning of the data. One cannot simply look at a 50 columns table in Snowflake and guess what columns are by their names. For example, we have 10 columns in one tables, all named ...price. We hav…

You are right but you can use RAG to “teach” AI about your schema. I did a write up on my implementation [1].

[1]: https://www.sqlai.ai/posts/enhancing-ai-accuracy-for-sql-gen...

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

#123

I don't think any of those text-to-sql models are solving the right problems. The hard part is not syntax or I don't know how to write a group by query. Most data scientists and engineers spend more time on understanding the meaning of the data. One cannot simply look at a 50 columns table in Snowflake and guess what columns are by their names. For example, we have 10 columns in one tables, all named ...price. We hav…

Yeah, we've been working on this problem a good bit and I think text-to-sql is a dead-end for analytical questions. We ( https://www.definite.app/ ) ended up abandoning text-to-sql in favor of answering questions with a semantic layer (which LLM's are far more effective against). https://www.loom.com/share/a0d3c0e273004d7982b2aed24628ef40

So you don’t use AI to generate SQL to retrieve data? As you say on the web site?

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

#124

Earlier quoted context omitted.

This isn’t the 90s. Most hardware is way over-specced for the data sizes most people are dealing with. The number of use cases which are too heavy to finish in hours but small enough to fit in a single instance is pretty limited.

SQL is popular because it can be run on a map/reduce backend. So once you have written your code it can run on any number of machines.

a) SQL is not that popular on map/reduce backends. Most people are doing it in code.

b) Only basic SQL works on any database and even then there are major differences in how they treat things like nulls, type coercion etc.

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

#125

I don't think any of those text-to-sql models are solving the right problems. The hard part is not syntax or I don't know how to write a group by query. Most data scientists and engineers spend more time on understanding the meaning of the data. One cannot simply look at a 50 columns table in Snowflake and guess what columns are by their names. For example, we have 10 columns in one tables, all named ...price. We hav…

At Databricks we have an LLM that is fine-tuned to do the problem you raise - https://www.databricks.com/blog/announcing-public-preview-ai... Many customers like it a lot. Although perhaps in your case if there are many pricing details it may not be quite accurate.

Can I ask how you fine-tune or if you can be a bit more specific?

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

#126

Earlier quoted context omitted.

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…

I’ve been working in this industry professionally for close to 25 years now. By far the most valuable and useful language I have learned is SQL.

I have been working in this industry for 30 years now. SQL is one of the most ugliest programming language I have ever working with. Like Perl, it's write once, hope you never need to read, language.

SQL was created in 60s. It has not really kept up with the pace of modern programming language ergonomics. It was made for a single person executing a batch job query pulling data from the database.

On the other hand, I kind of agree SQL is good to learn. It's an counter example on how not to design a programming language.

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

#128
post #117

Earlier quoted context omitted.

I’ve been working in this industry professionally for close to 25 years now. By far the most valuable and useful language I have learned is SQL.

As a counterpoint, I’ve also worked in this industry for 25 years, and SQL has had no relevance to my career. I write it very occasionally, and if I didn’t, it wouldn’t make any difference. The C for loop on the other hand…

I am happy for you, you seem to have reached your local optimum!

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

#129

Earlier quoted context omitted.

> Azure OpenAI is 3-months behind OpenAI… How is it 3 months behind if you get access to current OpenAI models?

You don't. It took like 2 extra months for Azure OpenAI to get GPT-4 turbo. There's a noticeable time delay between OpenAI deploying their latest model and when Microsoft manages to shove it in Azure.

And it's not just the models. E.g., the Assistants API is not available yet in Azure, and there is no expected ship date for it. But I'm confident it's coming.
Post reply on HN