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 10 user studies where 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.
翻译:新手经常在计算笔记本中参与机器学习教程,并已开始采用基于大语言模型(LLMs)的代码生成技术。然而,他们在理解与处理LLM生成的代码时仍面临困难。为缓解这些挑战,我们向计算笔记本引入了一种新型工作流程,通过附加临时UI步骤增强基于LLM的代码生成,在用户提示与代码生成之间设置UI式支架作为中间环节。我们在BISCUIT中实现了该工作流程——这是一个JupyterLab扩展,可根据用户代码上下文和意图生成临时UI,辅助用户理解、引导和探索LLM生成的代码。通过10项用户研究(新手使用BISCUIT完成机器学习教程),我们发现BISCUIT不仅为用户提供语义化的代码表征以促进理解,还降低了提示工程的复杂性,并创建了可供用户探索不同变量、迭代创意的交互空间。我们讨论了这些发现对LLM代码生成中UI中心化交互范式的启示意义。