Reproduce “CoE-SQL: In-Context Learning for Multi-Turn Text-to-SQL with Chain-of-Editions” on OpenResearch

Run Claude Code, Codex or any coding agent as a research agent: literature, hypotheses and experiments on your laptop, cluster or cloud GPUs.

Universal app for Apple silicon and Intel. Requires macOS 11 or later.

About this paper

Hanchong Zhang, Ruisheng Cao, Hongshen Xu, Lu Chen, Kai Yu

CoE-SQL enables multi-turn text-to-SQL conversion by leveraging large language models to generate and apply a "Chain-of-Editions" to previous SQL queries, achieving state-of-the-art performance among in-context learning methods on SParC and CoSQL datasets without requiring fine-tuning. This framework models SQL query evolution as an iterative editing process on Abstract Syntax Trees, focusing on incremental changes between conversational turns.

Key insights

  • Framing multi-turn query generation as an iterative "editing" process on Abstract Syntax Trees (ASTs) rather than generating from scratch improves efficiency and reduces error propagation in SQL conversion.
  • Natural language serialization of the defined edition chains proves most effective for in-context learning with LLMs, outperforming formal rule-based or code-based representations.
  • Incorporating explicit "no change needed" statements for unchanged clauses and an initial "question analysis" step enhances the LLM's reasoning and performance in identifying necessary SQL modifications.

Summary by alphaXiv.

Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.