InkSight: Leveraging Sketch Interaction for Documenting Chart Findings in Computational Notebooks

Yanna Lin, Haotian Li, Leni Yang, Aoyu Wu, Huamin Qu · DOI

Introduction

InkSight is a mixed-initiative Jupyter Notebook plugin designed to bridge the gap between data exploration and documentation. By allowing analysts to sketch directly onto visualizations, the tool captures user intent and utilizes Large Language Models (LLMs) to generate polished, natural language narratives. This approach transforms the often-tedious task of drafting documentation into a fluid, intuitive interaction.

The InkSight interface allows users to sketch directly on charts to generate natural language documentation.

The Documentation Bottleneck in Exploratory Analysis

Computational notebooks like Jupyter are essential for exploratory data analysis, yet documenting findings remains a significant hurdle. Analysts frequently prioritize exploration over explanation because manual documentation is time-consuming and disrupts their analytical "flow."

While automated tools can generate generic "data facts," they often lack the context of a user's specific interests. Specifying intent—such as focusing on a particular outlier or a specific trend—usually requires writing additional code or navigating complex menus. InkSight addresses this by making intent specification as natural as pointing and drawing, reducing the cognitive load required to transition from analysis to documentation.

Methodology: From Sketches to Narratives

InkSight employs a three-stage computational pipeline to translate hand-drawn sketches into structured data narratives:

  1. Sketch Interaction: Users draw directly on SVG-based charts using two primary modes: closed-path sketches for enclosing specific data points (like clusters or outliers) and open-path sketches for tracing trends or identifying ranges.
  2. Sketch Identification & Intent Inference: The system maps sketch coordinates to underlying data items and applies statistical algorithms—such as linear regression for trends or Interquartile Range for outliers—to identify eight distinct types of data facts (e.g., Value, Proportion, Trend, and Association).
  3. Finding Documentation Generation: Using GPT-3.5, InkSight transforms raw statistical facts into human-like text. Prompt engineering is used to synthesize multiple facts into a coherent narrative, which users can then refine through an interactive documentation panel by editing, grouping, or reordering "cards."
The InkSight computational pipeline: from user input to generated data narrative.

Key Insights and User Experience

  • Sketching as a Low-Friction Language: Sketching is more expressive and less demanding than coding, allowing users to externalize thoughts without needing to recall specific syntax or attribute names.
  • The "AI Partner" Effect: Participants in user studies noted that the tool felt like a collaborative partner. The AI occasionally surfaced unexpected data facts within a sketched area, aiding exploration rather than just documenting it.
  • Minimizing Context Switching: By placing the documentation panel adjacent to the chart, InkSight reduces the "split-attention effect," helping analysts stay "in the zone."
  • Mixed-Initiative Balance: The system provides a draft based on visual hints but leaves final polishing and organization to the human, empowering the user while automating the heavy lifting.

Evaluation and Results

A within-group study with 12 participants compared InkSight to a code-based baseline. The results demonstrated significant improvements in both productivity and user satisfaction:

  • Higher Productivity: Participants documented more than double the findings with InkSight (159 findings) compared to the baseline (78 findings) within the same timeframe ($p < 0.01$).
  • Superior Usability: InkSight received significantly higher ratings for being intuitive, natural, and easy to use ($p < 0.05$).
  • Seamless Integration: Users praised the tool for its ability to integrate into their existing workflow without disruption.

Limitations and Future Directions

Currently, InkSight supports six basic chart types and eight data fact categories. It does not yet handle complex visualizations like heatmaps or geographic maps, nor does it support cross-chart documentation. Future work will focus on adding "drag-and-resize" capabilities for sketches and exploring more advanced LLMs, such as GPT-4, to further improve the naturalness and variety of the generated prose.

Summary updated

BibTeX
@article{lin2024inksight,
  author = {Yanna Lin and Haotian Li and Leni Yang and Aoyu Wu and Huamin Qu},
  title = {{InkSight: Leveraging Sketch Interaction for Documenting Chart Findings in Computational Notebooks}},
  journal = {IEEE Trans. Vis. Comput. Graph.},
  year = {2024},
  doi = {10.1109/tvcg.2023.3327170},
}
Figure