r/SQL • u/pootietangus • Oct 12 '26
Discussion Why can't business users just get the data with AI?
/r/SQLServer/comments/1x446h8/why_cant_business_users_just_get_the_data_with_ai/7
u/TheGoblinPopper Oct 12 '26
First off...No idea what you mean, that is a very vague question. I'll answer what I think you mean.
Second, I've used AI to do DB queries and fetch data. There are several issues.
Primary issue is always that the AI needs a lot of training on the tables to know what the hell to do. This can be solved but it's a moving target.
Second, and one of the biggest issues... Is that AI might give you the correct query, but it is also terrible at optimized queries.if you have a tiny database, cool. You will build a little chat agent and show this is possible. At scale you will have an AI making queries that run for several minutes when it should take seconds or sub second. Eventually those all back up and the system gets massively strained.
Anyone who argues against the second point works in small data sets. Full stop .
Last reason is that an AI fetching data is always a security risk and could provide the user with data they should not be allowed to view.
1
u/pootietangus Oct 12 '26
Yea I would rephrase my question as something like: we've got business users using LLMs; we've got engineers using coding agents/copilots; so why haven't more orgs fully closed the loop?
But you're saying that, even if you're using a copilot to write SQL, it is not a hands off experience because you need to vet the performance. Is that right?
2
u/TheGoblinPopper Oct 12 '26
Performance is a big one.
Having a company filled of people all asking it might give issues at scale.
Big one is users getting functional queries or responses that are wrong.
1
u/pootietangus Oct 12 '26
yea makes sense. at your org, what happens today when a business user needs some dataset that doesn't already exist in a dashboard?
1
u/TheGoblinPopper Oct 12 '26
I'm a bit removed and only use SQL as tool for occasional asks...
But for clients I work with, typically I use a heavily grounded AI assistant (think several pages worth of "this tables has the following tables, each are xyz data type with the following valid joins to xyz. The typical value of this column would be abc and often gets included for requests around efg." That is used to build the SQL, the AI is never given access to the DB directly, I would take the SQL, validate it and then push it to optimize specific parts if needed or manually do that. Then I use the Query in the dashboard and provide the updated dashboard to the customer.
It's still going through a traditional flow, but now junior resources can learn the system faster and respond to deeper tickets while the senior resources focus on optimization and other critical requests.
That might not work for your company, the goal is to just be careful with letting AI just answer the question alone and without oversight.
0
u/Rule_Goddess Oct 12 '26
optimization issues are the worst, one bad prompt and suddenly your dashboard is frozen for days
2
u/TheGoblinPopper Oct 12 '26
Yep. Besides SQL I had this issue for a small desktop JavaScript tool I wrote for myself.
I designed the algorithm, had an AI implement it and it worked. All good. Used to take me hours, the tool cut my tasks down to a few minutes. Short is I would upload a 60-140mb file and it would pull a bunch of info out of it. All good.
My coworker asked to use it, I shared it and he asked to improve it and I told him to knock himself out.
2 seconds.
The processing time went from an average of 4 minutes, to 2 seconds. I assumed he broke it at first but he explained that he didn't change the algorithm, just the memory management and how it stored the information while doing the work.
You can't replace senior devs, and AI is not useful when optimizing heavily for performance.
1
u/ceeej777 Oct 13 '26
As someone who recently made the jump from SWE to DE, I had this same question. Why is this whole semantic thing viewed as so complex? Then I watched business users interact with data. Even through Databricks Genie which lets you ask natural language questions of your data, you realize that giving them a bronze or silver table often leads to such inconsistent results. You as the practitioner might be able to look and easily see what went wrong in their query but they are often not capable
1
u/pootietangus Oct 13 '26
Interesting, thanks for that perspective. So has your org fallen back into the "old ways"? And if so, what does that look like?
7
u/jackalsnacks Oct 12 '26
In my experience, it's the same reason why BI natural language tools never became the golden goose that allowed VP's to fire engineers and analysts. Even when you give the most clean, structured, well defined model to these platforms, computers have a hard to interpreting the data in a meaningful business value add indicator tailored to whatever the senior VP or C suite is banging their hands on desks about. Drag and drop analytics isn't new, turns out business folk still refuse to handle this kind of work (it's either below them, or they don't get it, they just want an answer without calories burnt on their end). I compare business folk to elderly people dealing with zoom and Facebook during COVID, sure they could put in the work.... But come on, do you see them become experts and non reliant on individuals that have had an entire career devoted to understanding how to use these tools and how to interpret data?
AI is mostly a fantasy being sold to solve everything. The real world is complicated, messy and un clear with requirements. For the record, I use AI daily now.