Remix.run Logo
brotchie an hour ago

Text to SQL is the wrong framing of the problem.

Ideally you ask the agent the thing you want to know / business question you want answered.

An agentic loop then runs. The agent can look at the schema, look at any existing SQL scripts available that query similar tables, run a few limit 10 probe queries. Analyze the data, do some joins, check the data again. Show you the data, ask for feedback, etc.

Pure zero / one shot SQL generation isn’t the solution and isn’t how humans do things. We look at the schema, run some queries, do some joins, spot check the totals / row counts, etc.