Cerebra: Aligning Implicit Knowledge in Interactive SQL Authoring

Human-LLM CollaborationExplainable AI (XAI)Computational Methods in HCISoftware Engineers & DevelopersData Scientists & AnalystsAI/ML Researchers & Engineers

Paper Title

Cerebra: Aligning Implicit Knowledge in Interactive SQL Authoring

Publication Info

  • Topic area: Interactive NL-to-SQL tools for improved query authoring and refinement.
  • Keywords: NL-to-SQL, implicit knowledge, interactive tools, SQL authoring, LLMs, data querying, knowledge alignment, user study, code refinement, human-AI collaboration.

Background and Problem

  • Problem / challenge: Current NL-to-SQL tools struggle with implicit knowledge alignment, leading to erroneous SQL scripts and iterative user clarifications. Users also face difficulties validating whether models correctly applied implicit knowledge.
  • Significance: Addressing implicit knowledge gaps can reduce user frustration, improve query accuracy, and enhance productivity in SQL authoring tasks.
  • Motivation and related work: Prior research has explored interactive SQL tools and NL-driven querying but has not adequately addressed implicit knowledge transfer between users and models. Existing tools often fail to capture dataset-specific conventions and task-specific computations, leaving a significant gap in usability and effectiveness.

Solution

  • Proposed approach: Cerebra, an interactive NL-to-SQL tool that extracts, aligns, and visualizes implicit knowledge during SQL authoring.
  • Novelty:
    1. Categorization of implicit knowledge into five types: calculation, condition, relation, dimension, and output.
    2. Automatic extraction of implicit knowledge from historical SQL scripts and database schemas.
    3. Interactive interface with a Knowledge View for transparent review and refinement of SQL queries.
    4. Integration of knowledge retrieval and refinement mechanisms to improve query generation accuracy.
  • Procedure and key techniques:
    • Offline stage: Extract implicit knowledge from historical scripts and database schemas, creating a repository.
    • Online stage: Retrieve relevant knowledge based on user instructions, generate SQL scripts, and visualize inferred knowledge for iterative refinement.
    • Interface features: Script View for SQL structure visualization, Knowledge View for inspecting implicit knowledge, and Data View for validating intermediate results.

Results

  • Concrete findings:
    • Participants completed tasks significantly faster with Cerebra compared to a baseline tool (ANOVA, p < 0.01).
    • Cerebra reduced perceived workload in Performance (p < 0.01) and Effort (p < 0.05) dimensions of NASA-TLX.
    • Knowledge extraction achieved over 95% accuracy across four databases.
    • Retrieval-augmented generation improved SQL success rates by 29–47%, with final pipeline accuracy exceeding 90%.
  • Advantage over baselines:
    • Improved query generation accuracy and efficiency.
    • Enhanced user understanding of implicit knowledge through structured visualization.
    • Easier refinement of queries at the knowledge level.
  • Experiments / evaluation:
    • User study with 16 participants comparing Cerebra to a baseline tool across two datasets.
    • Technical evaluation of knowledge extraction, retrieval, and refinement using a custom dataset with 232 tasks.
    • Metrics included task completion time, NASA-TLX workload ratings, SQL reconstruction accuracy, and retrieval precision/recall.
  • Limitations and future work:
    • Knowledge extraction tailored to single database schemas; future work could explore cross-database knowledge transfer.
    • Limited integration with IDE environments; potential for embedding Cerebra as an IDE extension.
    • Addressing schema evolution and maintaining knowledge validity under changes.

Summary

Cerebra addresses the challenge of aligning implicit knowledge in NL-to-SQL tasks by extracting and reusing knowledge from historical scripts, providing interactive tools for transparent review and refinement. User studies demonstrate improved efficiency, reduced workload, and enhanced understanding of SQL generation processes. Technical evaluations confirm high accuracy in knowledge extraction and retrieval, with robust performance in query refinement. Future directions include cross-database knowledge transfer and tighter integration with IDE environments to further enhance usability and generalizability.

Quick Actions

Share

Share this page

ios_share

https://hci.top/en/papers/chi/222751/2026

AdRecommended

Learn AI Coding at CodeNow

open_in_newOpen DOI Link
DOI: https://doi.org/10.1145/3772318.3790974
At a Glance

Paper Snapshot

fact_check
dataset
Source
CHI
calendar_month
Year
2026
emoji_events
Award
No award tagged
group
Authors
8 authors
sell
Subtopics
Human-LLM Collaboration, Explainable AI (XAI), Computational Methods in HCI
work
Professions
Software Engineers & Developers, Data Scientists & Analysts, AI/ML Researchers & Engineers
article
Content Status
Full text indexed
hub
Related Papers
10 related papers