Cerebra: Aligning Implicit Knowledge in Interactive SQL Authoring
Yunfan Zhou, Qiming Shi, Zhongsu Luo, Xiwen Cai, Yanwei Huang, Dae Hyun Kim, Di Weng, Yingcai Wu
Abstract
LLM-driven tools have significantly lowered barriers to writing SQL queries. However, user instructions are often underspecified, assuming the model understands implicit knowledge, such as dataset schemas, domain conventions, and task-specific requirements, that isn’t explicitly provided. This results in frequently erroneous scripts that require users to repeatedly clarify their intent. Additionally, users struggle to validate generated scripts because they cannot verify whether the model correctly applied implicit knowledge. We present Cerebra, an interactive NL-to-SQL tool that aligns implicit knowledge between users and LLMs during SQL authoring. Cerebra automatically retrieves implicit knowledge from historical SQL scripts based on user instructions, presents this knowledge in an interactive tree view for code review, and supports iterative refinement to improve generated scripts. To evaluate the effectiveness and usability of Cerebra, we conducted a user study with 16 participants, demonstrating its improved support for customized SQL authoring. The source code of Cerebra is available at https://github.com/zjuidg/CHI26-Cerebra.
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 0d9802f0-6ae0-48d6-a1b3-5821fd4d187bBuilds on35
- DIN-SQL: Decomposed In-Context Learning of Text-to-SQL with Self-CorrectionMohammadreza Pourreza, Davood RafieiNeurIPS 2023 · 909 citations
- Text-to-SQL Empowered by Large Language Models: A Benchmark EvaluationDawei Gao, Haibin Wang, Yaliang Li, Xiuyu Sun et al.VLDB 2024 · 609 citations
- RESDSQL: Decoupling Schema Linking and Skeleton Parsing for Text-to-SQLHaoyang Li, Jing Zhang, Cuiping Li, Hong ChenAAAI 2023 · 343 citations
- NL4DV: A Toolkit for Generating Analytic Specifications for Data Visualization from Natural Language QueriesArpit Narechania, Arjun Srinivasan, John T. StaskoIEEE VIS 2020 · 210 citations
- Graphix-T5: Mixing Pre-trained Transformers with Graph-Aware Layers for Text-to-SQL ParsingJinyang Li, Binyuan Hui, Reynold Cheng, Bowen Qin et al.AAAI 2023 · 164 citations
Related papers
- Sphinteract: Resolving Ambiguities in NL2SQL Through User InteractionFuheng Zhao, Shaleen Deep, Fotis Psallidas, Avrilia Floratou et al.VLDB 2025 · 12 citations
- CogSQL: A Cognitive Framework for Enhancing Large Language Models in Text-to-SQL TranslationHongwei Yuan, Xiu Tang, Ke Chen, Lidan Shou et al.AAAI 2025 · 12 citations
- Interactive Text-to-SQL Generation via Editable Step-by-Step ExplanationsYuan Tian, Zheng Zhang, Zheng Ning, Toby Jia-Jun Li et al.EMNLP 2023 · 14 citations
- PURPLE: Making a Large Language Model a Better SQL WriterTonghui Ren, Yuankai Fan, Zhenying He, Ren Huang et al.ICDE 2024 · 49 citations
- MAGIC: Generating Self-Correction Guideline for In-Context Text-to-SQLArian Askari, Christian Pölitz, Xinye TangAAAI 2025 · 44 citations
