Database
An Iterative LangGraph Agent for Text-to-SQL: Natural Language Access to the Chicago Crime Database
arXiv cs.DB0 views
arXiv:2609.22917v2 Announce Type: replace-cross Abstract: Non-technical stakeholders frequently cannot write the SQL needed to extract insights from operational databases. We built and evaluated a Text-to-SQL agent that closes this gap end to end: a six-node LangGraph StateGraph checks question relevance, fetches the live schema, generates PostgreSQL, validates it with a dry run, retries on failure, executes the query, and narrates the result set in plain English. The agent uses prompt engineering only; no model was fine-tuned. We evaluated it on the Chicago Crime dataset (approximately 8.5 million records, 22 attributes) against a hand-built benchmark of 100 natural language questions with ground-truth SQL, stratified into 30 Easy, 40 Medium and 30 Hard items. Comparing two prompt revisions of the same agent, the revised system (V2) reached a Valid SQL Rate of 93% (from 87%), an Execution Accuracy of 60% under a hybrid relational equivalence metric (from 47%; 19% from 12% under strict JSON matching), and a mean Synthesis Quality of 4.34 out of 5 (from 3.91). The single largest driver was removing a LIMIT 10 instruction from the system prompt, which had been truncating multi-row answers. Error analysis attributes the residual failures to relevance-checker false rejections, ambiguous question semantics, and free-tier API rate limits rather than to the language generation step. We report no comparison against an external baseline system or a public benchmark; the study is a single-model engineering evaluation.
Source:https://arxiv.org/abs/2609.22917PreviousThe Case for Single-Version Concurrency Control in the CloudNextUse Of Convolutional Neural Networks In Detection Of Branch Dieback Disease In Pequi Trees
Related posts
SOLID Principles Explained: 5 Essential Principles for Writing Clean, Maintainable Code
0dev.to Tutorial
How to Build a Professional Resume in 2026: Best Resume Formats, Templates, and ATS Tips
0dev.to Career
How to Explain Your Project in a Technical Interview
0dev.to Career
Stop Calling It "Refactoring" When You Are Just Moving The Bugs Around
0dev.to Career
PostgreSQL migrations that lock a busy table
0dev.to Testing

🧠 Do Prompt ao RAG: como fazer um LLM responder sem inventar (e sem processo do cliente)
0dev.to Java