0sql fixes text-to-SQL accuracy by never letting the model write SQL
nothinginausername · reddit · 2026-10-14
The author describes the classic text-to-SQL failure: demos work, but in production models pick wrong joins, drop filters, guess definitions like "revenue," and produce different SQL for the same question — the query runs but the number is wrong.
Their fix is 0sql: the model never writes SQL. Instead it:
- Describes measures, dimensions, filters and time ranges; 0sql generates the SQL from a data model defined once.
- Rejects requests for nonexistent fields, offering closest matches for retry.
- Guarantees the same question always yields the same SQL.
- Compiles row-level security into the statement so the model can't bypass it.
- Never touches your database — it only returns SQL your code executes.
It ships as an MCP server for Claude Code, Claude Desktop or custom agents, with a demo dataset. Free to use.
More from coding & agent
- PowerShell demo shows AI workflow to classify, rank and route requests — dfinke · 2026-10-15
- Expand Fetch launches: agents see the web, hits 74% vs Exa's 55% on hard extraction benchmark — bclavie · 2026-10-15
- With zero motion design background, dev crafts Apple-style launch film in 3 days using Opus 5.5 — Glittering-Art3723 · 2026-10-15
- iMCP 1.7.0 adds HomeKit control, voicemail transcripts, and editable Reminders for Mac MCP — pcuenq · 2026-10-15
- Snowflake FDE Podcast: Same Model, 25% to 85% Accuracy — Inside Frontier Engineering — ivory_tang · 2026-10-15
- Dev builds AI-vs-AI RTS game using Codex for art and MiniMax for sprite animations — emersoftware · 2026-10-15