Blog Post

A Small LLM Fail

,

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.

2025-10_0169

This made perfect sense, as this was a new restore, and I hadn’t run it. So I asked for the query.

2025-10_0170

This doesn’t work, but I’ve gotten used to pasting in errors and letting the LLM sort this out. So I did this.

2025-10_0177

OK better, but this still doesn’t work.

2025-10_0178

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.

2025-10_0179

Seems wrong. On this page, DatabasePropertyEX, I see this:

2025-10_0180

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:

2025-10_0181

I got this:

2025-10_0183

I can’t select this code (submitted a bug), but this isn’t bad. The result of my next query failed as well.

2025-10_0184

At least I had a clue what to do. I started then with this:

2025-10_0185

I got the “with TableResults” added. I then asked it to modify this to find the last time DBCC CHECKDB ran. I got this:

2025-10_0187

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.

2025-10_0188

GenAI’s are funny beasts. You definitely need to spend some time learning how to use them.

Original post (opens in new tab)
View comments in original post (opens in new tab)

Rate

You rated this post out of 5. Change rating

Share

Share

Rate

You rated this post out of 5. Change rating