Hacker News new | ask | show | jobs
by RyanHamilton 1096 days ago
In my tool I let users generate SQL using ChatGPT: https://www.timestored.com/pulse/tutorial/chatgpt-sql-query-... However it's their own hosted database and I show them the query for them to run beforehand. For anyone interested in pushing this further, the best paper I found was "Evaluating the Text-to-SQL Capabilities of Large Language Models". It examines which prompts work best and was how I decided on sending schema / create details etc. as part of the initial prompt. Since I create the UI and show the schema as a tree, I can generate that part of the prompt without the users involvement.