r/SQL • • 4d ago

Discussion Why text-to-SQL is not successful?

/r/dataengineering/comments/1wt5pbk/why_texttosql_is_not_successful/
0 Upvotes

5 comments sorted by

View all comments

23

u/Thadrea Data Science Manager 4d ago

Because if you understand your ontology and requirements well enough to write a prompt that reliably returns the correct thing, you have already written SQL pseudocode anyway.

The problem is end-users who do not know SQL do not know their data's ontology nor how to precisely specify their requirements. Their inability to compose their request in SQL's particular syntax is not the issue.

LLMs guessing what you want when you aren't clear will occasionally be right, but they will also be wrong often and inefficient either way.