Live data from Hacker News

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

github.com

1–10 of 171 posts

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

#4
really cool, the license is not really standard, but seems open source. The actual model can be found here: https://huggingface.co/cfahlgren1/NaturalSQL-6.7B-v0

This seems like a great base model, although I wonder if text-to-sql is good use case for small models. We are also building a tool in the space and I regularly wish gpt-4 to be even more knowledgable when answering. Even gpt 3.5 is not good enough for production.

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

#5
post #4

really cool, the license is not really standard, but seems open source. The actual model can be found here: https://huggingface.co/cfahlgren1/NaturalSQL-6.7B-v0 This seems like a great base model, although I wonder if text-to-sql is good use case for small models. We are also building a tool in the space and I regularly wish gpt-4 to be even more knowledgable when answering. Even gpt 3.5 is not good enough for produc…

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!

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

#7
So you feed it the whole DDL with the prompt. I wonder how it performs on a task like schema normalization or optimization? Say, also include the slow queries log and ask it for the SQL commands to modify the indexes to speed up those queries. Allow it to normalize/denormalize/materialize as options. Give it a way to run the resulting DDL against a test suite and iterate toward some fitness goal.

This would save gobs of compute.

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

#9
>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.

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

#10

> 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!

Post reply on HN