Earlier quoted context omitted.
> It depends, sometimes just feeding back broken SQL with "that didn't return any rows, can you fix it" and it comes up with something that works. But how do you know if the SQL is correct, or just happened to return results that match for one particular case?
how do you know SQL is correct if you write it yourself or another teamate of yours?
Getting AI to write good SQL
301–310 of 379 posts
Re: Getting AI to write good SQL
#302Can I just say that Google AI Studio with latest Gemini is stunningly, amazingly, game changingly impressive. It leaves Claude and ChatGPT's coding looking like they are from a different century. It's hard to believe these changes are coming in factors of weeks and months. Last month i could not believe how good Claude is. Today I'm not sure how I could continue programming without Google Gemini in my toolkit. Gemini…
I’ve felt the same, but what is the equivalent of Claude code in Google’s ecosystem? I want something running in a VM I can safely let all tools execute without human confirmation and I want to write my own tools and plug them in. Right now a pro max subscription with Claude code plus my MCP servers seems to be the sweet spot, and a cursory look at the Google ecosystem didn’t identify anything like it. Am I overlooki…
It's my daily driver so far. I switch between the Claude and Gemini models depending on the type of work I'm doing. When I know exactly what I want, I use Claude. When I'm experimenting and discovering, I use Gemini.
Re: Getting AI to write good SQL
#303Earlier quoted context omitted.
I can’t reconcile statements like this with my experience trying to code with LLMs. As soon as there’s any real complexity they spit out nonsense broken code that in some cases could take a long time to debug. Then when you correct it “You’re totally right, I’ll change it so that x y z”. If you weren’t a senior dev with loads of experience you wouldn’t be able to debug or correct the code these tools produce.
If you were a new dev now learning the ropes, with these AI coding tools available, I highly doubt you would gain the same "loads of experience". Learning comes through struggle and it's too easy to bypass that struggle now. It's so much easier to get the answers from AI.
I often find myself repeating this, although one would think it's well-known or even self-evident.
If there's no active struggle, there's no remaining knowledge, it's just fleeting information.
Re: Getting AI to write good SQL
#304Re: Getting AI to write good SQL
#305Given that their first query example has a leading wildcard as a predicate (WHERE p.product_name LIKE '%shoe%') and doesn't take case into account, I have doubts.
I'm certain they'll get there soon, they're just not there yet.
Re: Getting AI to write good SQL
#306Can I just say that Google AI Studio with latest Gemini is stunningly, amazingly, game changingly impressive. It leaves Claude and ChatGPT's coding looking like they are from a different century. It's hard to believe these changes are coming in factors of weeks and months. Last month i could not believe how good Claude is. Today I'm not sure how I could continue programming without Google Gemini in my toolkit. Gemini…
It always is for the first week. Then you find out that the last 10% matter a lot more than than the other 90%. And finally they turn off the high compute version and you're left with a brain dead model that loses to a 32b local model half the time.
Would you expect that to be Google employing cost-saving measures?
Re: Getting AI to write good SQL
#307Earlier quoted context omitted.
It's better for society to get much wealthier, much faster, by opening up the possibility for anyone to do advanced programming, than for a small class of anointed and studied elites to get rich via this exclusion. It's the opposite of sad. It's the best thing that ever happened for the productive use of a computer by a layperson since the invention of the search engine.
Sure, but this isn't "anyone" doing advanced programming, it's the LLM doing it. The humans get skill in using LLM, not programming, and whether this new skill will make anyone wealthy is an open question. (Also, just by market logic, rare skills in demand are always paid more; I'm not sure why you're calling it an "exclusion". The education system in a lot of places might have that function, but that's a separate is…
I also contest your definition of wealth. Society absolutely and obviously becomes wealthier when many more people are able to use computers for more advanced things. Just because that wealth doesn't directly appear as zeros in your financial statements doesn't mean the wealth hasn't been created.
Re: Getting AI to write good SQL
#308Earlier quoted context omitted.
I wish my AI would tell me when I'm going in the wrong direction, instead of just placating my stupid request over and over until I realize.. even though it probably could have suggested a smarter direction, but instead just told me "Great idea! "
I don't know if you have used 2.5, but it is the first model to disagree with directions I have provided... "..the user suggests using XYZ to move forward, but that would be rather inefficient, perhaps the user is not totally aware of the characteristics of XYZ. We should suggest moving forward with ABC and explain why it is the better choice..."
Re: Getting AI to write good SQL
#309I understand from a technical POV how this could be considered great news. But I don't see how this is good news at all from a societal POV. The last 15 or so years has seen an unprecedented rise in salaries for engineers, especially software engineers. This has brought an interest in the profession from people who would normally not have considered SW as a profession. I think this is both good and bad. It has brough…
It's better for society to get much wealthier, much faster, by opening up the possibility for anyone to do advanced programming, than for a small class of anointed and studied elites to get rich via this exclusion. It's the opposite of sad. It's the best thing that ever happened for the productive use of a computer by a layperson since the invention of the search engine.
I personally don't think we are ever going to get to that point where I can give a simple propnmt and have an LLM generate a complex app ready to run. Think about what that would require:
1. The LLM would have to read my mind and extrapolate all the minute decisions I would make to implement the app based on the prompt.
2. Assuming the LLM can get past (1), it would have to basically be AGI to be able to implement pretty much whatever I can dream up.
3. If 2 & 3 above is somehow achieved, it would be economically very valuable, and you can bet that functionality is not going to be casually enabled in LLMs, for just anyone to use.
Re: Getting AI to write good SQL
#310“Metrics: We combine user metrics and offline eval metrics, and employ both human and automated evaluation, particularly using LLM-as-a-judge techniques”. I’m curious to know what people are doing to measure whether the customer got what they were looking for. Thumbs up/down seems insufficient to me. The ability of the LLM to perform purely depends on having good knowledge of what is going to get asked and how, which…
Works pretty well for me, where you can typically get within the range of human2human variance.