arXiv AI By Anupreksha Jain, Manish Shrivastava

Reflect-SQL: A Self-Reflection Based Framework for Text-to-SQL

Read the original on arXiv AI →

Reflect‑SQL is a new framework for converting natural language into SQL queries. It tackles challenges such as large, obscure database schemas, poor table and column retrieval, and syntactically or logically flawed SQL by using a multi‑stage self‑reflection approach. The system iteratively refines queries and SQL through feedback loops driven by an LLM‑as‑a‑judge, achieving 72.03% execution accuracy on the BIRD benchmark, outperforming existing baselines.

Machine-generated by The Flow from the publisher's headline and feed description — not written or checked by a human. The full article lives at arXiv AI.

arXiv Computation and Language
Aug 25

SPOC-SQL: Stage-wise Preference Optimization for Controllable Text-to-SQL

SPOC-SQL introduces a stage-wise approach to Text-to-SQL, breaking the task into four sequential subtasks aligned with standard SQL execution logic. It applies fine-grained preference optimization at key decision points and a structured decomposition strategy, enabling explicit intermediate representations for stage-wise intervention and correction. The method yields more controllable and reliable SQL generation, with experiments showing that incorporating stage-wise human knowledge consistently improves performance.

By Yingnan Chen, Chun Ding, Tianshi Xu, Xu Yang, Si Wu
Hugging Face Trending Papers
Jul 14

Finding the Right Tables and Columns: A Benchmark and Corpus-Adaptive Embeddings for SQL Schema Retrieval

Retrieval in the SQL setting has largely been studied as the task of finding, within a large collection of SQL statements, the statement that answers a natural-language question. At scale, however, a more fundamental retrieval problem precedes generation: schema retrieval, identifying the tables and columns a question requires in a database that may contain thousands of them, far more than fit in a model's context.