The submitted link results in a login wall. It would probably be worth updating the submission to the introducing-dhai page that's mentioned all the way at the end here, as getting greeted by a login prompt that way isn't going to entice people to explore or learn about the product.
Show HN: Natural Language to SQL "Text-to-SQL" API
11–20 of 41 posts
Re: Show HN: Natural Language to SQL "Text-to-SQL" API
#12Re: Show HN: Natural Language to SQL "Text-to-SQL" API
#13Re: Show HN: Natural Language to SQL "Text-to-SQL" API
#14Can I trust the generated output SQL? I want to turn something like this into a frontend for my customers to use.
Re: Show HN: Natural Language to SQL "Text-to-SQL" API
#15Can I trust the generated output SQL? I want to turn something like this into a frontend for my customers to use.
Yes, absolutely. Every AI-generated SQL comes with a confidence score, so that you stay in control. We've had people who set a confidence threshold for returning answers to the users. If confidence threshold isn't met, then there's human-in-the-loop.
Re: Show HN: Natural Language to SQL "Text-to-SQL" API
#16I think fine-tuning is too inflexible and costly for working with something as versatile as database schemas, I would recommend looking into RAG, e.g. https://www.sqlai.ai/posts/enhancing-ai-accuracy-for-sql-gen... .
Re: Show HN: Natural Language to SQL "Text-to-SQL" API
#17Earlier quoted context omitted.
Yes, absolutely. Every AI-generated SQL comes with a confidence score, so that you stay in control. We've had people who set a confidence threshold for returning answers to the users. If confidence threshold isn't met, then there's human-in-the-loop.
I see. Just so I'm clear because this is important, if I set the confidence threshold very high, does it mean that my customers cannot create a malicious query? I don't want them deleting data or accessing rows that they're not allowed to.
Re: Show HN: Natural Language to SQL "Text-to-SQL" API
#18Earlier quoted context omitted.
I see. Just so I'm clear because this is important, if I set the confidence threshold very high, does it mean that my customers cannot create a malicious query? I don't want them deleting data or accessing rows that they're not allowed to.
All DML commands are blocked by the engine. You can wrap the returned SQL in a CTE only passing the rows the customer is allowed to access.
Re: Show HN: Natural Language to SQL "Text-to-SQL" API
#19What do you mean by complex SQL? How complex?
I've been playing w/ this product self-hosted for a few weeks. It can join across multiple tables, windowing functions. I haven't tried self-joins yet, nor I have put much effort into tuning w/ Golden SQL or other documentation. I would put this at the skill level of a junior data engineer. It's pretty impressive.
Re: Show HN: Natural Language to SQL "Text-to-SQL" API
#20Seeing what has happened with Assistants API, do you expect OpenAI to soon introduce an SQL API as well?
As someone in the position to evaluate integrating a text-to-SQL pipeline in our product, I'm left wondering "why not just wait until OpenAI does this?" Especially when you consider the pipeline ends at OpenAI's model anyway. How long will the current crop of productized text-to-SQL pipelines really be around for?