<story><title>An open source DuckDB text to SQL LLM</title><url>https://motherduck.com/blog/duckdb-text2sql-llm/</url></story><parent_chain></parent_chain><comment><author>swimwiththebeat</author><text>I see so many business leaders touting the promise of LLMs allowing business to &amp;quot;talk&amp;quot; to their data. The promise does sound enticing, but it&amp;#x27;s actually kind of hard to get working in practice.&lt;p&gt;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 prompting, context, and question-SQL examples (few-shot learning), and it still fails in unexpected ways. It&amp;#x27;s a tough ask for people to use a tool like this if they can&amp;#x27;t trust the results all the time. It&amp;#x27;s also a bit infeasible to scale this to tens or hundreds of tables across our data warehouse.&lt;p&gt;It&amp;#x27;s great that a lot of people are trying to crack this problem, I&amp;#x27;m curious to try this model out. I&amp;#x27;d also love to see if other people have tried solving this problem and made any headway.</text></comment>
<story><title>An open source DuckDB text to SQL LLM</title><url>https://motherduck.com/blog/duckdb-text2sql-llm/</url></story><parent_chain></parent_chain><comment><author>vgt</author><text>Co-founder and Head of Produck at MotherDuck here, happy to answer any questions or go nag the amazing engineers [0] who worked on this :)&lt;p&gt;[0]&lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;news.ycombinator.com&amp;#x2F;user?id=tdoehmen&quot;&gt;https:&amp;#x2F;&amp;#x2F;news.ycombinator.com&amp;#x2F;user?id=tdoehmen&lt;/a&gt;</text></comment>