Hacker News new | ask | show | jobs
by disgruntledphd2 54 days ago
> These guys also love text to sql. I know 4 people each implementing text to sql for their separate companies.

Text to SQL is a really bad idea, as the agent will just generate really convincing and terrible analyses that lack all business context.

I mean, you could implement some kind of semantic layer, but that's a lot of work, for uncertain reward.

I saw a place which essentially tasked the data analysts/scientists in an area to describe the good tables, and assumptions and necessary context to make decent queries/analyses, and that definitely lead to much, much better (almost usable) results.

As I have said many times, what the world really needs is SQL2Text, rather than Text2SQL.

1 comments

> I saw a place which essentially tasked the data analysts/scientists in an area to describe the good tables, and assumptions and necessary context to make decent queries/analyses, and that definitely lead to much, much better (almost usable) results.

Yep. After this has been done, the later text to sql outputs works half decent. The major issue I heard was that whenever a small assumption changes few months down the line, while humans are able to "JIT" apply it to each of their queries, these models sometimes lose it in all of the context and so it becomes hard to progressively update anything - you end up having to redo the whole workflow.

And in my experience, even the more complex dashboards requested by product or upper mgmt were stood up within the day by humans. Or the next day (but that was cos some ETL would be scheduled overnight rather than immediately). And I am not sure if speeding up this part would even matter to the guy who requested the dashboard. So I am not sure if this is a major bottleneck people should try to innovate in. If openai does the work for you then great but otherwise. Humans aided by copilot-of-old style autocomplete is probably more than enough.

Needless to say, text to sql is pointless for application queries made during API calls.

Yeah, it's not the development but the maintenance that kills you in both software and other information fields.

The whole text to SQL thing is about data teams being a bottleneck to the business (rather like software people). The goal is good in theory but honestly an Excel plugin is probably a better solution in many cases.