Cerebra: Aligning Implicit Knowledge in Interactive SQL Authoring

Yunfan Zhou, Qiming Shi, Zhongsu Luo, Xiwen Cai, Yanwei Huang, Dae Hyun Kim, Di Weng and 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.

Venue
CHI 2026
Volume
Proceedings of the 2026 CHI Conference on Human Factors in Computing Systems
DOI
10.1145/3772318.3790974
PDF
https://dl.acm.org/doi/pdf/10.1145/3772318.3790974
Anthology ID
2026.chi.695

Cite

@inproceedings{zhou-etal-2026-cerebra,
    title = {{Cerebra: Aligning Implicit Knowledge in Interactive SQL Authoring}},
    author = {Yunfan Zhou and Qiming Shi and Zhongsu Luo and Xiwen Cai and Yanwei Huang and Dae Hyun Kim and Di Weng and Yingcai Wu},
    booktitle = {Proceedings of the 2026 CHI Conference on Human Factors in Computing Systems},
    isbn = {9798400722783},
    year = {2026},
    publisher = {Association for Computing Machinery},
    address = {New York, NY, USA},
    doi = {10.1145/3772318.3790974},
    url = {https://doi.org/10.1145/3772318.3790974},
    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.}
}