CodexDB: Synthesizing Code for Query Processing from Natural Language Instructions using GPT-3 Codex
Immanuel Trummer
Abstract
CodexDB enables users to customize SQL query processing via natural language instructions. CodexDB is based on OpenAI's GPT-3 Codex model which translates text into code. It is a framework on top of GPT-3 Codex that decomposes complex SQL queries into a series of simple processing steps, described in natural language. Processing steps are enriched with user-provided instructions and descriptions of database properties. Codex translates the resulting text into query processing code. An early prototype of CodexDB is able to generate correct code for up to 81% of queries for the WikiSQL benchmark and for up to 62% on the SPIDER benchmark.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext d0d59525-f4b8-448c-a285-a6385f584369Cited by top-tier papers15
- Text-to-SQL Empowered by Large Language Models: A Benchmark EvaluationDawei Gao, Haibin Wang, Yaliang Li, Xiuyu Sun et al.VLDB 2024 · 609 citations
- Language Models Enable Simple Systems for Generating Structured Views of Heterogeneous Data LakesSimran Arora, Brandon Yang, Sabri Eyuboglu, Avanika Narayan et al.VLDB 2024 · 165 citations
- How Large Language Models Will Disrupt Data ManagementRaul Castro Fernandez, Aaron J. Elmore, Michael J. Franklin, Sanjay Krishnan et al.VLDB 2023 · 127 citations
- PhenoFlow: A Human-LLM Driven Visual Analytics System for Exploring Large and Complex Stroke DatasetsJaeyoung Kim, Sihyeon Lee, Hyeon Jeon, Keon-Joo Lee et al.IEEE VIS 2024 · 22 citations
- SQLStorm: Taking Database Benchmarking into the LLM EraTobias Schmidt, Viktor Leis, Peter Boncz, Thomas NeumannVLDB 2025 · 21 citations
Builds on5
- AutoPrompt: Eliciting Knowledge from Language Models with Automatically Generated PromptsTaylor Shin, Yasaman Razeghi, Robert L. Logan IV, Eric Wallace et al.EMNLP 2020 · 1,162 citations
- Jigsaw: Large Language Models meet Program SynthesisNaman Jain, Skanda Vaidyanath, Arun Iyer, Nagarajan Natarajan et al.ICSE 2022 · 134 citations
- RPT: Relational Pre-trained Transformer Is Almost All You Need towards Democratizing Data PreparationNan Tang, Ju Fan, Fangyi Li, Jianhong Tu et al.VLDB 2021 · 92 citations
- Ember: No-Code Context Enrichment via Similarity-Based Keyless JoinsSahaana Suri, Ihab F. Ilyas, Christopher Ré, Theodoros RekatsinasVLDB 2022 · 34 citations
- ATHENA++: Natural Language Querying for Complex Nested SQL QueriesJaydeep Sen, Chuan Lei, Abdul Quamar, Fatma Özcan et al.VLDB 2020
Related papers
- MCTS-SQL: Light-Weight LLMs Can Master the Text-to-SQL Through Monte Carlo Tree SearchShuozhi Yuan, Liming Chen, Miaomiao Yuan, Jin ZhaoAAAI 2026 · 4 citations
- CodeS: Towards Building Open-source Language Models for Text-to-SQLHaoyang Li, Jing Zhang, Hanbing Liu, Ju Fan et al.SIGMOD 2024 · 124 citations
- ScienceBenchmark: A Complex Real-World Benchmark for Evaluating Natural Language to SQL SystemsYi Zhang, Jan Deriu, George Katsogiannis-Meimarakis, Catherine Kosten et al.VLDB 2024 · 65 citations
- Gar: A Generate-and-Rank Approach for Natural Language to SQL TranslationYuankai Fan, Zhenying He, Tonghui Ren, Dianjun Guo et al.ICDE 2023 · 12 citations
- Metasql: A Generate-Then-Rank Framework for Natural Language to SQL TranslationYuankai Fan, Zhenying He, Tonghui Ren, Can Huang et al.ICDE 2024 · 23 citations
