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.
翻译:程序员经常在计算笔记本中与机器学习教程互动,并且已经开始采用基于大语言模型(LLM)的代码生成技术。然而,他们在理解和处理LLM生成的代码时遇到了困难。为了缓解这些挑战,我们在计算笔记本中引入了一种新颖的工作流程,该流程通过一个额外的临时用户界面步骤来增强基于LLM的代码生成,为用户提供UI脚手架作为用户提示与代码生成之间的中间阶段。我们在BISCUIT中实现了这一工作流程,BISCUIT是JupyterLab的一个扩展,它根据用户的代码上下文和意图,通过LLM生成临时用户界面,为用户理解、指导和探索LLM生成的代码提供支持。通过一项有10名新手使用BISCUIT完成机器学习教程的用户研究,我们发现BISCUIT为用户提供了代码的表示形式以帮助理解,降低了提示工程的复杂性,并创建了一个供用户探索不同变量和迭代想法的实验环境。