Text-to-SQL Agent with a 50-Question Benchmark by Pratyaksh PandeyText-to-SQL Agent with a 50-Question Benchmark by Pratyaksh Pandey

Text-to-SQL Agent with a 50-Question Benchmark

Portfolio project
Pratyaksh Pandey
An agent that answers plain-English questions about a database by writing and running SQL, with a benchmark that measures how often the answer is actually right.
Qwen2.5-Coder writes SQLite from the schema plus example rows
Safety: a sqlglot guard and a read-only SQLite authorizer block every write; queries time out after 5 seconds
Self-correction: failed queries go back to the model with the database error
Results on 50 questions: 64% correct from the schema alone, 72% with example rows, 74% with self-correction
Benchmark reruns in GitHub Actions; 31 tests; live demo on Hugging Face

0 likes · 0 views · Nov 24, 2026

LLM agent that writes safe, read-only SQL from plain English; 74% execution accuracy on a 50-question benchmark.

Tags