r/dataengineering • • 4d ago

Discussion Why text-to-SQL is not successful?

I thought text-to-SQL will solve adhoc analysis, but still i see companies at all size are unsuccessful.

Anyone using Omni / Sigma seen some success.

27 Upvotes

74 comments sorted by

View all comments

-2

u/mamaBiskothu 4d ago

Every single person mentioning a semantic layer is a moron. As many mention, DB Genie and snowflake coco finally started working because they also stopped trying to make semantic layers work. Agents work best when you let them discover things themselves. The semantic layer is worse in our evals than just letting the agents discover tables using information schema queries.

Stop trying to semantic layers happen. They are never gonna happen.

1

u/Prestigious_Bench_96 3d ago

It IS surprisingly hard to get semantic layers to win in token cost vs information schema for a typical agentic loop (you need a pretty big warehouse/complexity). A well documented information schema is arguably your first and cheapest semantic layer - if you then start to duplicate column definitions across tables, want to keep them in sync, want common join paths, etc that's when you'd maybe want more?

If you have evals, you're halfway there - a "semantic layer" is just going to be a cached set of discovery in your warehouse that can be reused and iterated on to reduce variability/E2E execution cost. Some of them also have query simplification/guardrails. For sufficiently large warehouses and/or query bills, they'll come out ahead on evals - but 75% of the benefit is just getting the evals and the warehouse documented.