iCreatAI News
Skip to content
OpenRouter Announcements·· 5 hr agoFeaturedAI score60

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

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

AI summary

A test of a text-to-SQL agent across six models on a synthetic shop database with 22 questions found 95% correct answers from the schema alone (244 of 256 completed runs) and 99% with a five-line note about data quirks (246 of 248). Most errors came from messy data, such as a country column mixing DE, de, and Germany, rather than invalid SQL. With the notes, openai/gpt-6-luna answered all 44 runs correctly at $0.16 per 1,000 questions, matching anthropic/claude-sonnet-5.5 at $6.20.

Why it matters

It offers a concrete, reproducible benchmark of prompt notes and read-only tool design for text-to-SQL agents, with per-model cost and accuracy figures.

Source: OpenRouter Announcements · openrouter.ai