Novices 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-based 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 discover that BISCUIT offers user semantic representation 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. We discuss the implications of our findings for UI-centric interactive paradigm in code generation LLMs.
翻译:新手经常在计算笔记本中参与机器学习教程,并逐渐采用基于大型语言模型(LLM)的代码生成技术。然而,他们在理解和处理LLM生成的代码时遇到困难。为缓解这些挑战,我们在计算笔记本中引入了一种新颖的工作流程,该流程在基于LLM的代码生成基础上增加了一个临时的用户界面(UI)步骤,为用户提供基于UI的脚手架,作为用户提示与代码生成之间的中间阶段。我们在BISCUIT中展示这一工作流程,BISCUIT是JupyterLab的一个扩展,它根据用户代码的上下文和意图,提供由LLM生成的临时UI,帮助用户理解、引导和探索LLM生成的代码。通过一项10名新手使用BISCUIT进行机器学习教程的用户研究,我们发现BISCUIT为用户提供了代码的语义表征以辅助理解,降低了提示工程(prompt engineering)的复杂性,并创造了一个沙盒环境,使用户能够探索不同变量并迭代想法。我们讨论了这些发现对于以UI为中心的代码生成LLM交互范式的启示。