The Query That Ran and Lied
A wrong SQL query that crashes is a bug. A wrong SQL query that runs successfully, returns a clean number, and looks completely normal is something else entirely. Text-to-SQL tools have made it trivially easy to generate queries. They have not made it easy to know whether the answer is correct.
The Query That Ran and Lied
A team asks an AI assistant for sales by territory. Nothing exotic. Total sales and order count for the year, from the header table, with product detail from the line items.
The assistant writes a clean query. It joins the header to the detail and sums the header total. It runs without error. It returns a number.
The real number for that territory was 2,061 orders. The query reported 7,775. The annual total went from 6.7 million to 190 million. Every order had been counted once per line item. No error. No warning. A number that was ready to paste into a slide.
This is not a hypothetical. It is a documented failure, reproduced on a standard dataset, by someone who knows SQL well enough to catch it. The problem is not that the AI could not write SQL. It wrote syntactically valid SQL that executed successfully. The problem is that the SQL was wrong in a way that produced no signal of wrongness.
Nothing here looks broken. That is exactly what makes it dangerous.
Why Silent Failure Is Worse Than a Crash
A query that fails tells you something. It returns an error, blocks the pipeline, forces someone to look. A query that succeeds and returns a wrong number tells you nothing. It enters the workflow. It gets copied into a report. It informs a decision. By the time anyone suspects, the decision has already been made.
A practitioner testing naive text-to-SQL with a small model documented the pattern precisely: on 32 questions, the system produced 7 silently wrong answers. The queries ran. They returned numbers. The numbers were incorrect, and nothing in the output indicated a problem.
Another measurement of text-to-SQL on an ordinary schema with a role split found that 38.5% of questions returned no records when the data was right there, a failure mode that logs nothing and alerts nothing.
A blog post from a data practitioner put the structural issue plainly: the most insidious failure mode in text-to-SQL is not a broken query. It is an executed query that returns wrong results with no signal that anything went wrong.
A wrong query that fails is a debugging task. A wrong query that runs is a decision that will be made on false premises, and nobody will know until it is too late.
A crash is visible. A wrong number is not.
What the Community Is Actually Reporting
This is not a theoretical concern raised by skeptics. It is the consistent experience of people who have tried to deploy text-to-SQL in production.
On Reddit's r/dataengineering, a discussion about an AI SQL tool drew a blunt response: "I do not believe 'no matter how complex the query is, the platform generates the correct SQL.' It never does." The same commenter added: "Any complex query with complex context and schema fails miserably so far." https://www.reddit.com/r/dataengineering/comments/1k8632s/would_you_use_this_tool_ai_that_writes_sql/
Another commenter in the same thread described building a prototype with detailed schemas, event taxonomies, and metric definitions. Even with all that context, the system "often got the SQL logic wrong from a business perspective. The code was error free but it used the wrong columns or filtered the data incorrectly and thus the result was incorrect." The deeper issue, they wrote, is that "it's very difficult to validate the output of the results." https://www.reddit.com/r/dataengineering/comments/1k862la/would_you_use_this_tool_ai_that_writes_sql/
A LinkedIn post about Databricks Genie described a specific test: asking for the value of a metric on a date where no row existed in the data. Genie returned a specific number with a full reasoning trail. It had made a silent assumption, pulled a number from nowhere, hardcoded it into the SQL, and never mentioned it. The author's conclusion was direct: "It never said 'I don't know.' That's how text-to-SQL fails, and without a semantic layer holding the definitions, I don't see how Agent Mode escapes it." https://www.linkedin.com/posts/nivbelleli_databricks-new-genie-agent-mode-did-everything-activity-7455503784778227713-lJav
A technical analysis of the same product documented three primary failure types in early rollouts: context and abbreviation blindness (the system did not understand company-specific jargon), structural join failures (incorrect SQL joins that multiplied rows or threw errors), and complex metric hallucinations (no internal baseline for what a specific calculation actually meant). https://www.devoteam.com/me/expert-view/cracking-the-reliability-code-with-databricks-genie/
On the Google Developer forums, a user reported that the conversational analytics engine "keeps on hallucinating about tables and columns despite them being clearly defined in the data-sources." The code provided in the documentation did not work, and the agent continued to hallucinate table names and column references. https://discuss.google.dev/t/conversational-analytics-broken-sdk/325633
The same reports, from different platforms, about different products.
It Is Not the Model
The instinct when an AI query tool gives a wrong answer is to blame the model. A better model will fix it. This instinct is wrong, and it leads teams to waste months swapping models without addressing the actual failure.
The problem is not that the model cannot write SQL. It is that the model has no way to know which SQL is correct for this specific business, against this specific schema, with these specific definitions. A model without business context is doing pattern matching on column names. It will produce queries that run. It will not produce queries that are right.
A Reddit commenter captured this precisely: "The data mapping is in someone's head, and takes you like 2 weeks to find out by asking 100 people. You find out that the Revenue column is actually calculated differently depending on department, and the calculation details are in two different finance guy's Excel." https://www.reddit.com/r/dataengineering/comments/1k8632s/would_you_use_this_tool_ai_that_writes_sql/
A LinkedIn analysis of text-to-SQL failures reached the same conclusion: "The thing that makes text-to-SQL fail isn't that an LLM wrote the SQL. It's the lack of constraints." Without a semantic model that defines relationships, canonical metrics, and access rules, "whatever came out, ran."https://www.linkedin.com/posts/merrickchristopher_text-to-sql-doesnt-work-but-our-ai-agent-activity-7455956708721459200-5sG-
A blog post from SQL Authority put it in the simplest terms: AI coding assistants "struggle with what they can't see: your schema, your data volumes, your business rules and your team's unwritten conventions. Their mistakes look like working code."https://blog.sqlauthority.com/2026/11/05/ai-written-sql-interview-questions/
The fix is not a larger model. The fix is giving the system enough context to know when it does not know, and enough guardrails to refuse to answer rather than answer wrongly.
The model sees column names. The business lives in definitions that are not in the schema.
What Guardrails Actually Require
If silent failure is the problem, the solution is not better generation. It is validation before execution, and honesty about uncertainty.
A semantic layer that the model must respect. Generated queries should be parsed back against a defined model of relationships, metrics, and access rules. If the query joins on a relationship that has not been defined, or references a metric that does not exist in the model, it should be rejected before it runs. A commenter on the Reddit thread made this point directly: "the likely best solution will be to implement this in a semantic layer." https://www.reddit.com/r/dataengineering/comments/1k862la/would_you_use_this_tool_ai_that_writes_sql/
Validation against known-good results. A wrong query that runs is more dangerous than one that fails. The only way to catch it is to compare it with something trusted, run it next to a known-good query or a report total, and check the results. A blog post on the SQL Authority makes this explicit: "A wrong query that runs is more dangerous than one that fails." https://blog.sqlauthority.com/2026/11/05/ai-written-sql-interview-questions/
Read-only execution and scope enforcement. Running generated SQL against a production database without constraints is a risk on its own. Read-only execution through a dedicated role, with permissions applied before the query reaches the database, prevents a wrong query from becoming a security incident.
The willingness to say "I don't know." A system that is 70% accurate but knows when it is wrong is more useful than one that is 75% accurate and silently serves bad answers. A LinkedIn post on silent failures in text-to-SQL put it this way: "A system that's 70% accurate but knows when it's wrong is more useful than one that's 75% accurate and silently serves bad answers." https://www.linkedin.com/posts/nikodemdabski_silent-failures-in-text-to-sql-a-growing-concern-activity-7455981620712341504-Qf8C
Explanation attached to every answer. A user who can see what the query included, what period it covered, and which assumptions were applied has a chance of catching an error before acting on it. A number without provenance is a number that has to be trusted on faith.
The guardrail is not a constraint on the model. It is the thing that makes the model usable.
The Honest Position
Conversational analytics is not going away. The ability to ask a question in plain language and get an answer is too valuable to abandon because the first generation of tools was unreliable.
But the industry has spent the last year learning an uncomfortable lesson: a blank canvas and a capable model is not a product. The interesting work is in the guardrails, the validation, the semantic context that makes an answer correct rather than merely plausible.
Until that work is done, every text-to-SQL answer carries a hidden question: did the query run because it was right, or did it run because nothing stopped it.
The difference between those two outcomes is the difference between analytics you can build a decision on and analytics that will eventually, quietly, be wrong.
Want to see what validated, guardrailed SQL execution looks like when it runs inside your own application, against your own schema, with role-based rules applied before any result is returned? https://blunxai.com/docs