Xavier: Toward Better Coding Assistance in Authoring Tabular Data Wrangling Scripts

Interactive Data VisualizationComputational Methods in HCISoftware Engineers & DevelopersData Scientists & Analysts

Research Background and Problem

  • What issues or challenges did the authors identify?
    The current practice of writing data cleaning scripts often relies on code completion tools. However, these tools frequently fail to adequately incorporate data context (e.g., table metadata and data values) when generating suggestions for complex table data processing tasks. This results in lower-quality code suggestions and requires users to write additional code to locate or verify relevant data. Users often need to switch back and forth between data inspection and code writing, which reduces work efficiency. Moreover, for AI-generated code, users may need significant time to validate the results.

  • Why is this problem important?
    Data cleaning is a critical step in data science, and its efficiency and accuracy directly impact the quality of subsequent analyses. Addressing the limitations of code completion tools in effectively integrating data context can significantly enhance users' productivity and the accuracy of code written for data cleaning tasks.

  • Research Motivation and Related Work
    The authors reviewed existing research on data cleaning tools and code assistants, finding that many tools still lack intelligent support for data context. Through preliminary studies, the authors examined user behaviors and needs when using existing AI-driven code completion tools, identifying areas for improvement:

    1. Integrating data context into code completion.
    2. Providing dynamic data localization support.
    3. Simplifying the code validation process.

Solution

  • What methods or solutions did the authors propose?
    The authors designed and implemented Xavier, a code assistance tool for computational notebooks aimed at improving the efficiency of writing data cleaning scripts. Its core features include:

    1. Data context-aware code completion: intelligently integrating code and data context.
    2. Automatic data context highlighting: emphasizing data segments relevant to the user's current code.
    3. Real-time transformation preview: instantly displaying the results of code modifications for user validation.
  • What are the innovative aspects of this solution?

    1. Overcoming the limitations of traditional code completion tools by integrating data context (e.g., table structure, sample values) with real-time code editing.
    2. Providing dynamic data highlighting and real-time result preview features to support immediate result validation.
    3. Adopting an always-on data display mode, enabling users to maintain continuous awareness of data context.
  • What are the implementation steps and key technologies used?
    Xavier's technical architecture includes:

    1. Code Context Manager: parses the syntax tree of the user's current code to identify incomplete function parameters or operators.
    2. Data Context Manager: preprocesses all active table data, extracting key data context (table-level, column-level, row-level).
    3. Completion Generator: generates completion suggestions based on code and data context while triggering data highlighting and real-time previews. Key technologies include:
    • Utilizing the Llama3-70B large language model to support multi-token code completion.
    • Combining code and data context to generate intelligent suggestions and designing a specific interaction interface for efficient user validation.

Research Outcomes

  • What specific outcomes were achieved?
    Xavier significantly reduced users' context-switching frequency and coding errors during user testing. Additionally, most users reported that Xavier's data-aware code completion, highlighting, and preview features greatly enhanced their coding experience.

  • What advantages does it have compared to existing solutions?

    1. Greater intelligence in code completion: Compared to tools like GitHub Copilot, Xavier's completion suggestions are more accurate.
    2. Reduced context switching: Xavier minimizes the need for users to frequently switch between coding and data inspection.
    3. Immediate result validation: The real-time preview feature helps users quickly identify errors, reducing additional validation costs.
  • What were the experimental or evaluation results?
    User testing results:

    • Context switching frequency and coding errors were significantly lower when using Xavier compared to baseline tools.
    • Users perceived a reduced workload, particularly in terms of mental demand, operational effort, and frustration.
    • Users were generally satisfied with Xavier's completion suggestions and interaction design, especially for short code completions and automatic highlighting features.
  • Limitations and Future Directions

    1. Response speed optimization: Generating code completion suggestions by integrating data context results in relatively slower system response times, which need further optimization.
    2. Optimization of sample data context: The current approach samples values for large data contexts, but the optimal sampling method remains unclear and requires further research.
    3. Expansion of applicability: Currently, Xavier only supports the Pandas library; future work could extend support to other programming languages and data cleaning libraries.
    4. Continuous research on data analysis interactions: Eye-tracking studies on user attention shifts could further optimize the design of real-time data views to enhance efficiency.

Conclusion

Xavier provides an innovative approach by deeply integrating code context with tabular data, offering intelligent assistance to data analysts during the coding process. Detailed user experiments and feedback analysis demonstrate that Xavier significantly improves the efficiency and accuracy of writing data cleaning scripts. Future research directions include performance optimization, expanding applicability, and long-term evaluation in real-world industrial environments.

Quick Actions

Share

Share this page

ios_share

https://hci.top/en/papers/chi/188471/2025

AdRecommended

Learn AI Coding at CodeNow

open_in_newOpen DOI Link
DOI: https://dl.acm.org/doi/10.1145/3706598.3714239
At a Glance

Paper Snapshot

fact_check
dataset
Source
CHI
calendar_month
Year
2025
emoji_events
Award
No award tagged
group
Authors
8 authors
sell
Subtopics
Interactive Data Visualization, Computational Methods in HCI
work
Professions
Software Engineers & Developers, Data Scientists & Analysts
article
Content Status
Full text indexed
hub
Related Papers
10 related papers