←back to thread

Getting AI to write good SQL

(cloud.google.com)
477 points richards | 1 comments | | HN request time: 1.039s | source
Show context
rectang ◴[] No.44010899[source]
> We will cover state-of-the-art [...] how we approach techniques that allows the system to offer virtually certified correct answers.

I don't need AI to generate perfect SQL, because I am never going to trust the output enough to copy/paste it — the risk of subtle semantic errors is too high, even if the code validates.

Instead, I find it helpful for AI to suggest approaches — after which I will manually craft the SQL, starting from scratch.

replies(4): >>44011204 #>>44011349 #>>44011379 #>>44011432 #
hosel ◴[] No.44011204[source]
Really? In my experience it’s been pretty good (using Pydantic)! I read over before I execute it, but it’s never done anything malicious.
replies(3): >>44011259 #>>44011340 #>>44013480 #
1. yahoozoo ◴[] No.44013480[source]
What is the relevance of Pydantic with SQL?