Announcing an LLM-Powered SQL Assistant on DoltHub
Today we're excited to announce a new feature on DoltHub: an LLM-powered SQL assistant 🤖!
If you've been keeping up with our recent posts, you know we've been experimenting with integrating AI into some of our products and workflows. Our goal is to evaluate how (actually) useful these things might be, use them where appropriate, and report our findings.
Our first experiment, which was short-lived, was to create a robot-blogger to generate additional blog content for us. Though we learned a lot from building the robot-blogger, it didn't deliver any real value, since it wrote terrible, boring content.
But now, we think we've found a much more compelling use-case for AI: adding an LLM-powered SQL Assistant to DoltHub's SQL Console.
The SQL Assistant in Action
Now on DoltHub, when you use the SQL Console to execute queries on a database, you may see a suggestion provided by the SQL Assistant.
If you like the suggestion provided by the SQL Assistant, just click the "Accept" option and this query will be executed for you. If you don't like the suggestion, or you want to view the error message that triggered the SQL Assistant to run, just click the "Decline" option.
How it works
On DoltHub, when using the SQL Console, you will trigger the SQL Assistant to run if your input is either a natural language query or if your input has resulted in an error. In these cases, the SQL Assistant will attempt to generate valid SQL that does what your original input was trying to do.
If your original input was valid SQL and didn't result in an error, the SQL Assistant will not run.
It's that simple!
Limitations and Future Work
Unfortunately, the SQL Assistant is a bit of a dolt, in the literal sense. It seems to work ok for very simple queries, but it is definitely prone to hallucinations if more complex outputs are requested.
Nice try there, SQL Assistant.
The good news is that, currently, the SQL Assistant is just a raw, out-of-the-box LLM, we haven't begun attempting to fine-tune or customize it for this use-case, so we're hopeful that this feature will get better over time as we explore ways to improve it.
Conclusion
We are excited to continue working with these growing technologies and would love to chat with you if you have any suggestions or feedback, or just want to share your own experiences.
As it turns out, Zach added a SQL Assistant to the Dolt CLI some time ago. We're not sure if the DoltHub SQL Assistant will be more useful. Maybe the DoltHub UI is a better place for AI integration, than is the command line, but time will tell.
Let us know if you find the SQL Assistant useful, or if you have any ideas for how we can make it better. Just come by our Discord and give us a shout. Don't forget to check out each of our cool products below:
- Dolt—it's Git for data.
- Doltgres—it's Dolt + PostgreSQL.
- DoltHub—it's GitHub for data.
- DoltLab—it's GitLab for data.
- Hosted Dolt—it's RDS for Dolt databases.
- Dolt Workbench—it's a SQL workbench for Dolt databases.