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

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

TL;DR

InkSight is a mixed-initiative Jupyter Notebook plugin that allows data analysts to document chart findings simply by sketching atop visualizations. By combining intuitive sketch-based interaction with Large Language Models (GPT-3.5), the tool automatically infers user intent and generates polished, natural language documentation for specific data subsets.

What Problem Does This Paper Address?

Computational notebooks (like Jupyter and RStudio) are the gold standard for exploratory data analysis, yet documenting findings remains a major "pain point." Analysts often prioritize exploration over explanation because drafting documentation manually is tedious and interrupts their "flow."

While automated tools exist to generate "data facts," they are often "one-size-fits-all." They lack a mechanism for users to specify their intent—for example, "I only care about this specific outlier" or "Look at the trend in this specific cluster." Existing methods for specifying intent usually require writing more code or navigating complex menus, which adds to the user's cognitive load. InkSight aims to make specifying intent as natural as pointing and drawing.

Methods

InkSight introduces a workflow that translates a quick hand-drawn sketch into a structured data narrative through three main computational modules:

  1. Sketch Interaction: Users can draw two types of sketches directly on SVG-based charts:
  2. Closed-path: Enclosing specific points (e.g., outliers or clusters).
  3. Open-path: Following a trend line or identifying a specific range.
  4. Sketch Identification & Intent Inference: The system maps the sketch's coordinates to the underlying data items. It then applies statistical algorithms (like Interquartile Range for outliers or linear regression for trends) to identify eight types of "data facts": Value, Proportion, Outlier, Rank, Difference, Trend, Association, and Outlier_scatter.
  5. Finding Documentation Generation: InkSight uses GPT-3.5 to transform raw data facts into human-like text. It employs prompt engineering to synthesize multiple facts into a coherent narrative and allows users to refine the output through an interactive documentation panel (editing, grouping, or reordering "cards").

Datasets

The authors evaluated InkSight using a user study with 12 participants. They utilized three well-known datasets for the tasks:

  • Movies dataset: Used for the main usage scenario (genres, release years).
  • Cars dataset (Vega): Used for the initial tutorial.
  • House Price Prediction dataset (Kaggle): Used for the open-ended analysis task.

No new training datasets were introduced, as the system relies on pre-trained LLMs and established data fact recommendation algorithms.

Key Insights and Ideas

  • Sketching as a "Low-Friction" Language: The paper highlights that sketching is more expressive and less demanding than coding. Users can "externalize" their thoughts without needing to remember specific attribute names or syntax.
  • The "AI Partner" Effect: Participants reported that the tool felt like a "conversation with a partner." Interestingly, the AI sometimes surfaced "unexpected" data facts within a sketched area that the user hadn't initially noticed, turning a documentation tool into an exploration aid.
  • Reducing Context Switching: By placing the documentation panel immediately to the right of the chart (rather than below the code cell), InkSight minimizes the "split-attention effect," allowing analysts to stay in the zone while documenting.
  • Mixed-Initiative Balance: The system doesn't try to do everything. It provides a "draft" based on the user's visual hint, but leaves the final "polishing" and "grouping" to the human, which users found empowering rather than intrusive.

Key Results

The authors conducted a within-group study comparing InkSight to a code-based baseline (where users wrote JSON-like filters to specify intent).

  • Higher Productivity: Participants documented significantly more findings with InkSight (159 findings) compared to the baseline (78 findings) within the same timeframe ($p < 0.01$).
  • Superior Usability: InkSight received statistically significant higher ratings for being helpful, intuitive, natural, and easy to use ($p < 0.05$).
  • Seamless Integration: Users specifically praised the tool for not disrupting their analysis flow, with several noting they didn't even realize they were "switching" from analysis to documentation.

Limitations and Future Work

  • Scope of Visualizations: Currently, InkSight only supports six basic chart types (bar, line, pie, scatter, etc.) and eight data fact types. It cannot yet handle complex visualizations like heatmaps or geographic maps.
  • Cross-Chart Documentation: The current version documents findings for one chart at a time. Future work aims to support "multi-cell" documentation that can link findings across different steps of an analysis.
  • Sketch Refinement: Currently, if a user makes a mistake in a sketch, they must delete it and start over. The authors suggest adding "drag-and-resize" capabilities for existing sketches.
  • LLM "Template" Feel: While GPT-3.5 polishes the text, some outputs can still feel repetitive. Moving to more advanced models like GPT-4 or fine-tuning on domain-specific documentation could improve the "naturalness" of the 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