Create

Sign in to ReadmeX

or

How we handle your data: Privacy Policy

ReadmeX

Your AI reading companion

What would you like to catch up on?

Pick a briefing, or ask your own question.

Your community and people briefings stay personal to you.

Story

OpenRouter says data notes lift text-to-SQL accuracy to 99%

AI summary

OpenRouter tested a text-to-SQL agent with six models, 22 questions, known answers, and a synthetic shop database. Across completed runs, accuracy rose from 95% with the schema alone to 99% after a five-line note documented data quirks, while five models never generated a failing query. The results were limited to one synthetic database, and Gemini had 24 failed requests that reduced its number of completed runs.

In-depth insight

The benchmark suggests that documenting units, inconsistent country codes, and other data quirks can matter more than generating valid SQL, giving teams a practical prompt-design and database-access consideration.

Text-to-SQL Agent: How It Works and What Makes It Accurate

OpenRouter ·12/3/2026

Text-to-SQL Agent: How It Works and What Makes It Accurate
Text-to-SQL Agent: How It Works and What Makes It Accurate

When you connect an LLM to a SQL database so people can ask questions in plain English, writing valid SQL is the easy part. Wrong answers often come from the data itself, such as a column that stores cents instead of dollars, or a country column that mixes names with ISO codes. On October 22, 2026, we ran a text-to-SQL agent on six current models through OpenRouter, using a synthetic shop database and 22 questions with known answers. Across completed runs, it answered 95% correctly from the schema alone (244 of 256) and 99% with a five-line note about the data (246 of 248; 93.2% of all 264 attempts including provider errors).

#OpenRouter#GPT-6 Luna#Claude Sonnet 5.5#Claude Haiku 5.5#DeepSeek V4.1 Flash#MiniMax M3.1 Flash#Gemini 3.8 Flash

Original · 8 min readRead the original
Group chat

No comments yet. Start the conversation.