Another test with Copilot in SSMS (v22 P3) that didn’t go so well. This one surprised me.
This is part of a series of experiments with AI systems.
Looking for Known Data with Copilot
One of the things I wanted to do recently was do some checkdb checking of a system. As a result, I was looking for the last time this was run on a database. I decided to ask Copilot.
This made perfect sense, as this was a new restore, and I hadn’t run it. So I asked for the query.
This doesn’t work, but I’ve gotten used to pasting in errors and letting the LLM sort this out. So I did this.
OK better, but this still doesn’t work.
I apply this and run it, and it works, but doesn’t return data. I wouldn’t expect this to for this database, so I try to clue in the AI.
Seems wrong. On this page, DatabasePropertyEX, I see this:
Not sure why this doesn’t work well. I don’t see a way to change the model, so I’m not sure what’s being used or when it was trained, but I’d expect it to know what is in DatabasePropertyEX().
Prompt AI
Prompt AI was a little better, though not at first. I asked the question:
I got this:
I can’t select this code (submitted a bug), but this isn’t bad. The result of my next query failed as well.
At least I had a clue what to do. I started then with this:
I got the “with TableResults” added. I then asked it to modify this to find the last time DBCC CHECKDB ran. I got this:
Summary
To be fair I futzed with both of these a few times. An LLM isn’t deterministic, so I got different results, but I never got the correct result from Copilot. I did get this from PromptAI at one point, which does work.
GenAI’s are funny beasts. You definitely need to spend some time learning how to use them.
The post A Small LLM Fail appeared first on SQLServerCentral.
