Table of Contents
Fetching ...

BISCUIT: Scaffolding LLM-Generated Code with Ephemeral UIs in Computational Notebooks

Ruijia Cheng, Titus Barik, Alan Leung, Fred Hohman, Jeffrey Nichols

TL;DR

This work tackles the challenge of understanding and effectively working with LLM-generated code in computational notebooks. It introduces BISCUIT, a JupyterLab extension that places ephemeral, LLM-generated UIs between user prompts and code to scaffold understanding, guide generation, and support exploration. Through a 10-participant study, BISCUIT demonstrated improvements in code comprehension, reduced prompting effort, and a productive playground for iterating ideas, while preserving core notebook workflows. The contribution offers a practical UI-centric approach to LLM-assisted programming with potential applications beyond ML tutorials, suggesting a shift toward in-context, dynamic scaffolds within development environments.

Abstract

Programmers frequently engage with machine learning tutorials in computational notebooks and have been adopting code generation technologies based on large language models (LLMs). However, they encounter difficulties in understanding and working with code produced by LLMs. To mitigate these challenges, we introduce a novel workflow into computational notebooks that augments LLM-based code generation with an additional ephemeral UI step, offering users UI scaffolds as an intermediate stage between user prompts and code generation. We present this workflow in BISCUIT, an extension for JupyterLab that provides users with ephemeral UIs generated by LLMs based on the context of their code and intentions, scaffolding users to understand, guide, and explore with LLM-generated code. Through a user study where 10 novices used BISCUIT for machine learning tutorials, we found that BISCUIT offers users representations of code to aid their understanding, reduces the complexity of prompt engineering, and creates a playground for users to explore different variables and iterate on their ideas.

BISCUIT: Scaffolding LLM-Generated Code with Ephemeral UIs in Computational Notebooks

TL;DR

This work tackles the challenge of understanding and effectively working with LLM-generated code in computational notebooks. It introduces BISCUIT, a JupyterLab extension that places ephemeral, LLM-generated UIs between user prompts and code to scaffold understanding, guide generation, and support exploration. Through a 10-participant study, BISCUIT demonstrated improvements in code comprehension, reduced prompting effort, and a productive playground for iterating ideas, while preserving core notebook workflows. The contribution offers a practical UI-centric approach to LLM-assisted programming with potential applications beyond ML tutorials, suggesting a shift toward in-context, dynamic scaffolds within development environments.

Abstract

Programmers frequently engage with machine learning tutorials in computational notebooks and have been adopting code generation technologies based on large language models (LLMs). However, they encounter difficulties in understanding and working with code produced by LLMs. To mitigate these challenges, we introduce a novel workflow into computational notebooks that augments LLM-based code generation with an additional ephemeral UI step, offering users UI scaffolds as an intermediate stage between user prompts and code generation. We present this workflow in BISCUIT, an extension for JupyterLab that provides users with ephemeral UIs generated by LLMs based on the context of their code and intentions, scaffolding users to understand, guide, and explore with LLM-generated code. Through a user study where 10 novices used BISCUIT for machine learning tutorials, we found that BISCUIT offers users representations of code to aid their understanding, reduces the complexity of prompt engineering, and creates a playground for users to explore different variables and iterate on their ideas.
Paper Structure (44 sections, 5 figures, 1 table)

This paper contains 44 sections, 5 figures, 1 table.

Figures (5)

  • Figure 2: Ephemeral UIs generated by Biscuit in the example usage scenario described in \ref{['sec:usage_scenario']}. : generated UI for sampling data in an image dataset; : generated UI to support model customization; : generated UI to support visualization.
  • Figure 3: Helper feature of Prompt Suggestion.
  • Figure 4: System implementation of Ephemeral UI.
  • Figure 5: Results of the Likert scale questions from the user study.
  • Figure 6: Examples of user request and ephemeral UI in our study. : UI generated by P8 for plotting. : UI generated by P4 to view training data. : UI generated by P5 to impute missing values. : UI generated by P3 to construct a model.