SSMS Copilot Is Messing with Your AI Prompts SSMS Copilot is providing incorrect answers to SQL Server queries because Microsoft's tool is altering user prompts before sending them to large language models, according to database expert Brent Ozar. Ozar demonstrated that Claude Sonnet 4.6 and other AI models produce correct answers when queried directly, but the same models give wrong responses through SSMS Copilot due to prompt corruption. The issue undermines trust in the tool, leading Ozar to recommend using alternative methods like T-SQL-based prompts instead of SSMS Copilot. SSMS Copilot is Messing With Your AI Prompts. Last Updated May 20, 2026Brent OzarAI You might notice that the advice you get from Copilot in SSMS isn’t very good, but it isn’t necessarily AI in general. Part of the problem is something specific about SSMS Copilot and the way it prompts LLMs, and I wish I could tell you exactly what it is, but I can’t because I don’t have access to how SSMS is changing your prompts. Let’s take a task I need to do all the time, and I constantly forget the syntax to do it. How do I turn on last actual plans? That answer is wrong. Period. Flat out incorrect. I’m not even ON 2022, I’m on 2025. At first I thought, “Maybe Claude Sonnet 4.6 has the wrong answer – I’ll try asking Claude directly in Claude’s chat.” And Claude gets it right: That’s correct, and that’s bad , because it means that something about SSMS Copilot’s prompting is biasing it towards incorrect answers. Perhaps it’s including too much background information and losing relevant context, or pushing the LLM towards a certain kind of answer like “encourage the user to adopt new features” . In my experience, Gemini 3.1 Pro has been less vulnerable to Copilot’s prompt corruption. In this example, it gets the answer correct: But that’s misleading, because the answer isn’t to use Gemini 3.1 Pro because it’s somehow “better”. It’s not – Claude Sonnet 4.6 had the right answer when I asked the same question directly, but something about Copilot’s prompting mislead Claude. The real answer is for Microsoft to fix the SSMS Copilot prompting so that all models – including cheaper/faster ones – get better, more accurate answers. I just don’t know how to do that since we don’t get visibility into the prompt that Microsoft is sending along with our question. This kind of thing happens to me all the time, and I try reporting it to Microsoft, but SSMS Copilot’s thumbs-down icon has a weird set of choices: Claude’s response was just flat out wrong – not incorrect for this version, incorrect for ANY version, and it’s bad because Claude itself gets it right – only Copilot is getting it wrong. Between SSMS messing with my prompts, and Copilot switching to usage-based pricing https://github.blog/news-insights/company-news/github-copilot-is-moving-to-usage-based-billing/ , I just don’t see a reason to use SSMS Copilot directly right now. You’re so much better off using T-SQL to build a robust prompt, like we do with the @AI parameter in sp BlitzCache https://www.brentozar.com/archive/2025/12/get-chatgpts-advice-on-your-queries-with-sp blitzcache/ and sp BlitzIndex https://www.brentozar.com/archive/2026/04/updated-first-responder-kit-and-consultant-toolkit-for-april-2026/ , and then sending that prompt to the LLM of your choosing. You get a better prompt, access to better models for processing, and it doesn’t cost you any more. I’m not giving up on Copilot yet. I keep trying it first, every time there’s a new version of SSMS, because I’m eternally hopeful that it’s going to get better. Related Hi I’m Brent Ozar. I make Microsoft SQL Server go faster. I love teaching, travel, cars, and laughing. I’m based out of Las Vegas. He/him. I teach SQL Server training classes https://www.brentozar.com/training/ , or if you haven’t got time for the pain, I’m available for consulting https://www.brentozar.com/sql-critical-care/ too.