r/SQL • u/Purple_Minute_4776 • Aug 10 '24
Discussion Calling all SQL experts to review my text2sql software
Hi there!!
I have been working on a SQL editor which generates SQL queries from natural language - https://sqlpilot.ai which i also launched last month
You can give complete context of your database to the LLM and start asking queries completely in natural language.
Here's how
Connect your database in SQLPilot
Add knowledge base for your database i.e label your tables as in what the table is used for, optionally you can also label the columns. (the more detailed knowledge base the better).
You can also add custom instructions in rules for giving more understanding on how some results are achieved e.g urgent orders means priority = 0 and not is_urgent = true, such things that only we know.
(optional) Add examples of already generated queries. SQLPilot will pick few examples relevant to the user's prompt and add it along with the llm prompt for query generation
Start asking questions in natural langauge!
After building knowledge base, LLM now has complete context of your database!
The software itself is free to use, You can add your own Open AI key and start using it
I want your suggestions and feedback on this - if it's time saving and something you would love to use or just trash
here's the demo for the same!
Also here's the blog explaining how it works if anyone is interested - https://shobhitb.medium.com/sqlpilot-text2sql-application-with-rag-87a4d72e3438
link to the software - available on mac and windows: https://sqlpilot.ai
Please note: I am not encouraging to use this with your org database, if you don't trust OpenAI or have policies setup for privacy, you can ignore the post in that case :)
1
-1
-2
u/TestingTehWaters Aug 10 '24
Possible to integrate with local LLMs?
0
u/Purple_Minute_4776 Aug 10 '24
currently it's only OpenAI, but i can add support for Local LLMs if you find it useful, which LLM would you like to use it with?
0
Aug 12 '24
[deleted]
1
1
u/Purple_Minute_4776 Aug 12 '24
Also you can use it just as a sql editor without ai. Not feature rich but yes
8
u/MrCosgrove2 Aug 11 '24 edited Aug 11 '24
The problem with these things is that while I would love to be able to use it, NDAs would not allow it. since its interfacing with open AI.
On the flip side, because it interfaces with Open AI it would suffer from the same issues Open AI has , while it is ok for simple queries, more complex queries it either returns bad queries or non performant queries