News for hackers. Stuff that matters.
Re:New GitHub Copilot research finds 'downward pressure on c... by l5870uoo9y on Sunday January 28, 2024 @05:01PM (#39170246)
This is the problem with using AI for generating SQL statements; it doesn't know the semantics of the your database schema. If you are still open for a solution, I recently deployed a solution[1] that combines AI, db schema and simple way train AI to know your database schema.

Essentially, you "like" correct (or manually corrected) generations and a vectorized version is stored and used in future similar generations. An example could be tell which table or foreign key is preferred for a specific query or that is should wrap columns in quotes.

From my preliminary tests it works well. I was able to consistently make it use correct tables, foreign keys and quotes on table/column name for case-sensitivity using only a couple of trainings. Will open a public API for that soon too.

[1]: https://www.sqlai.ai/

Re:New GitHub Copilot research finds 'downward pressure on c... by tilwidnk on Sunday January 28, 2024 @05:15PM (#39170357)
It's "a public API", not "an public API", because of the consonant rule.

I really worry that there are people out there who will anxiously mangle their company's data thinking what is being called AI, which doesn't exist yet, will save the day.

Re:New GitHub Copilot research finds 'downward pressure on c... by l5870uoo9y on Sunday January 28, 2024 @06:01PM (#39170772)
Use it as a tool not a replacement. However it does do things well even without much additional information like fixing SQL statement[1]. That being said it is consistently improving, GPT-3.5 to GPT-4 was a major upgrade.

[1]: https://www.sqlai.ai/snippets/clroq0qn9001xqzqeidtm4jgx

Re:New GitHub Copilot research finds 'downward pressure on c... by CrimsonRain on Monday January 29, 2024 @06:29AM (#39175136)
Just copy paste the db/table schema in a comment at start of your file. Nothing else needed.