this post was submitted on 16 May 2026
175 points (98.9% liked)
Programming Humor
3427 readers
57 users here now
Related Communities !programmerhumor@lemmy.ml !programmer_humor@programming.dev !programmerhumor@kbin.social !programming_horror@programming.dev
Other Programming Communities !programming@beehaw.org !programming@programming.dev !programming@lemmy.ml !programming@kbin.social !learn_programming@programming.dev !functional_programming@programming.dev !embedded_prog@lemmy.ml
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
For the use case of a readonly db that you have 100% data exposure on, for internal use case only, sure, whatever I guess
IE metrics stuff where its just a big data dump and you wanna query it easily, readonly. IE sales figures or something.
Fine, thats both an easy app to slap together for the sales team to play with, and fairly harmless.
Any other use case though and its pretty fucking stupid lol
But why? In that use case it would be cheaper, easier, quicker, safer to use a series a series of end points then Ai.
Imagine if you have a sales goal of $10,000 sales per month with a bonus to the sales person for meeting that goal and the Ai just makes up a bunch of sales. Better yet Ai makes up additional sales people to pay the bonus to, which you can't cause the don't exist so your records say you gave out more money then you did and now your your accounting ledgers are illegitimate.
If I were to design this, and I do indeed do stuff like this for a living, I would have the AI only able to compose just the query, but not handle the results, my API itself would actually perform the query and return the results.
This would ensure the AI cannot "muck up" the results with fake data. Its only job is just to compose the query and confirm it works.
So I would construct a set of MCP tools it can use to:
Which actually would not be terribly hard to implement, maybe 1 week of work if Im just making an internal "to be used by our own people" type of tool that doesnt have to be super pretty, just a simple dashboard where they punch in their prompt, which then gets put in a queue, and then the get notified when the LLM has finished and returned the results to them, which they can then download as a CSV or some shit.
Easy peasy and an example of actually using these tools in a sane way.
I would never have something like this be outward "client" facing public though, this stuff would be reserved for internal use.
Yup that's similar what I do sometimes. My general idea was always write a simplified example, prove it works, ask Ai to add in whatever complexity was needed based on my example, prove that works, release for internal use.
This is how you end up with made figures, because the generated query forgot a WHERE clause and no one's there to check it
See my post for how I'd solve this problem above here: https://lemmy.world/post/46926396/23775592
The tl;dr of it is there are ways to engineer this so the LLM doesnt get to "make up" data, the LLMs job is to just compose the query, and then it gets run against the DB and that returns to the user directly, preventing the LLM from just making shit up.
MCP Tools are powerful as hell for this, and its actually very viable to do.