DSCode Comparator: An Interactive Interface for Comparing Models and Evaluating Code for Data Science Tasks
Authors
Code-generating models are increasingly used to support data science tasks. Yet reviewing their outputs, both to understand how the code works and to assess its quality, remains largely manual and time-consuming. Instead of eliminating effort, these models shift the burden from writing code to verifying it. Complicating matters further, different models often produce divergent solutions of varying efficacy, creating additional challenges for code interrogation. To address this unmet need, we introduce DSCodeComparator, an interactive interface designed to support code understanding, evaluation, refinement, and comparison in data science workflows. DSCodeComparator allows code to be viewed from different levels of granularity, from individual lines of code to comparisons across prompts and tasks. The individual code views automatically annotate lines of code via an agentic pipeline we developed to facilitate quick functional overviews. The individual views also automatic diagnosis code quality according to efficiency, readability, and resource computation. The comparison and historical views leverage the annotations to create compact visual summaries of code, allowing for direct comparisons of its functionality, length, and efficiency across multiple models, data science tasks, and prompts. To evaluate DSCodeComparator, we conducted a user study with 22 participants, all with varying levels of proficiency in writing Data science code. Our findings show that, especially for non-expert users, DSCodeComparator sped up the pace of code comprehension and increased participant confidence. The majority report finding DSCodeComparator easier to use and more efficient than manual efforts in reviewing and refining code. Overall, our systems and their findings present an intelligent, human-centered approach to address the verification gap when using code generation models for Data Science.
Research Questions / Practical Problems
Question signals indexed for this paper.
- 63%
Gamut: A Design Probe to Understand How Data Scientists Understand Machine Learning Models
CHI '19· Explainable AI (XAI) +2
- 63%
Debugging Defective Visualizations: Empirical Insights Informing a Human-AI Co‑Debugging System
CHI '26· Interactive Data Visualization +2
Based on Jaccard similarity of research subtopics & professions (≥60%)