An open source DuckDB text to SQL LLM
motherduck.com
An open source DuckDB text to SQL LLM
1–10 of 31 posts
Re: An open source DuckDB text to SQL LLM
#2Re: An open source DuckDB text to SQL LLM
#3looks great, most text-to-sql attempts i’ve tried fall short, hoping this is different
Re: An open source DuckDB text to SQL LLM
#4A lot of our databases at work have columns with custom types and enums, and getting the LLM (Llama2) to write SQL queries to robustly answer natural language questions about the data is tough. It requires a lot of instruction prompting, context, and question-SQL examples (few-shot learning), and it still fails in unexpected ways. It's a tough ask for people to use a tool like this if they can't trust the results all the time. It's also a bit infeasible to scale this to tens or hundreds of tables across our data warehouse.
It's great that a lot of people are trying to crack this problem, I'm curious to try this model out. I'd also love to see if other people have tried solving this problem and made any headway.
Re: An open source DuckDB text to SQL LLM
#5looks great, most text-to-sql attempts i’ve tried fall short, hoping this is different
I do this a lot with GPT4 and I can't recall it ever generating an invalid query, and I did have some complicated ones.
Re: An open source DuckDB text to SQL LLM
#6I see so many business leaders touting the promise of LLMs allowing business to "talk" to their data. The promise does sound enticing, but it's actually kind of hard to get working in practice. A lot of our databases at work have columns with custom types and enums, and getting the LLM (Llama2) to write SQL queries to robustly answer natural language questions about the data is tough. It requires a lot of instruction…
But as you say custom types and encoded domain knowledge is extremely tough and as a result it's very tough to "transfer" the system to different databases.
Re: An open source DuckDB text to SQL LLM
#7Re: An open source DuckDB text to SQL LLM
#8I see so many business leaders touting the promise of LLMs allowing business to "talk" to their data. The promise does sound enticing, but it's actually kind of hard to get working in practice. A lot of our databases at work have columns with custom types and enums, and getting the LLM (Llama2) to write SQL queries to robustly answer natural language questions about the data is tough. It requires a lot of instruction…
It can work to support business analysts to crank out more reporters, but I wouldn’t roll it out to all my staff.
Re: An open source DuckDB text to SQL LLM
#9Co-founder and Head of Produck at MotherDuck here, happy to answer any questions or go nag the amazing engineers [0] who worked on this :) [0] https://news.ycombinator.com/user?id=tdoehmen
Any other ideas about where you plan to utilize LLM? E.g.
- migrate from different SQL dialects (e.g. date functions)
- make my queries nicer (e.g., rewrite them in shorter form or use better variable names)
- warn about potential bugs (e.g. SQL fanout)
Re: An open source DuckDB text to SQL LLM
#10I see so many business leaders touting the promise of LLMs allowing business to "talk" to their data. The promise does sound enticing, but it's actually kind of hard to get working in practice. A lot of our databases at work have columns with custom types and enums, and getting the LLM (Llama2) to write SQL queries to robustly answer natural language questions about the data is tough. It requires a lot of instruction…
My biggest concern is that this will allow people to type a question and get a number back from the database, without being able to tell if the query is right or if the LLM just made up something. It can work to support business analysts to crank out more reporters, but I wouldn’t roll it out to all my staff.