arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2412.13386cs.SEcs.AIcs.HC
收藏

关于 ML 草图与可视化代码助手的探索性研究

An Exploratory Study of ML Sketches and Visual Code Assistants

Carnegie Mellon University(卡内基梅隆大学);INESC-ID;Faculty of Engineering, University of Porto(波尔图大学工程学院)

Luís F. Gomes, Vincent J. Hellendoorn, Jonathan Aldrich, Rui Abreu

AI总结:

本研究构建了首个 IDE 内草图转代码的 Visual Code Assistant 原型,通过 19 名数据科学家的实验与访谈,验证了利用具备视觉能力的 LLM 将 ML 工作流草图转化为 Python 代码的有效性及用户需求。

摘要:

本文探讨了将 Visual Code Assistants 集成到集成开发环境(IDE)中。在软件工程中,白板草图通常是编码前的初始步骤,是开发者之间重要的协作工具。以往的研究调查了 SE 草图中的模式及其实际应用方式,但直接利用这些草图进行代码生成的方法仍然有限。具备视觉能力的大型语言模型的出现为弥合这一差距提供了机会,这正是我们研究的重点。在本文中,我们构建了 Visual Code Assistant 的首个原型,以获取用户对 IDE 内草图转代码工具的反馈。我们对 19 名数据科学家进行了实验,其中大多数人会定期将草图绘制作为其工作的一部分。我们通过分析开发者在开发 ML 工作流时在其草图中常见的模式,来研究开发者的心智模型。分析表明,图表是首选的组织组件(52.6%),通常伴随着列表(42.1%)和编号点(36.8%)。我们的工具通过查询 LLM 将他们的草图转换为 Python notebook。我们使用 LLM-as-judge 设置来评估生成代码的质量,发现即使是简短的草图也能有效地生成有用的代码大纲。我们还发现草图绘制时间与生成代码的质量之间存在正相关。我们通过进行广泛的访谈来评估该工具的实用性、探索潜在的用例并了解开发者的需求,以此作为研究的总结。正如参与者所指出的,这些助手有前景的应用包括教育、原型设计和协作环境。我们的研究结果表明,下一代 Code Assistants 有望集成视觉信息,这既能改进代码生成,又能更好地利用开发者现有的草图绘制实践。

英文摘要:

This paper explores the integration of Visual Code Assistants in Integrated Development Environments (IDEs). In Software Engineering, whiteboard sketching is often the initial step before coding, serving as a crucial collaboration tool for developers. Previous studies have investigated patterns in SE sketches and how they are used in practice, yet methods for directly using these sketches for code generation remain limited. The emergence of visually-equipped large language models presents an opportunity to bridge this gap, which is the focus of our research. In this paper, we built a first prototype of a Visual Code Assistant to get user feedback regarding in-IDE sketch-to-code tools. We conduct an experiment with 19 data scientists, most of whom regularly sketch as part of their job. We investigate developers' mental models by analyzing patterns commonly observed in their sketches when developing an ML workflow. Analysis indicates that diagrams were the preferred organizational component (52.6%), often accompanied by lists (42.1%) and numbered points (36.8%). Our tool converts their sketches into a Python notebook by querying an LLM. We use an LLM-as-judge setup to score the quality of the generated code, finding that even brief sketching can effectively generate useful code outlines. We also find a positive correlation between sketch time and the quality of the generated code. We conclude the study by conducting extensive interviews to assess the tool's usefulness, explore potential use cases, and understand developers' needs. As noted by participants, promising applications for these assistants include education, prototyping, and collaborative settings. Our findings signal promise for the next generation of Code Assistants to integrate visual information, both to improve code generation and to better leverage developers' existing sketching practices.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑