Large Language Models (LLMs) have revolutionized programming and software engineering. AI programming assistants such as GitHub Copilot X enable conversational programming, narrowing the gap between human intent and code generation. However, prior literature has identified a key challenge--there is a gap between user's mental model of the system's understanding after a sequence of natural language utterances, and the AI system's actual understanding. To address this, we introduce Programming with Representations (PwR), an approach that uses representations to convey the system's understanding back to the user in natural language. We conducted an in-lab task-centered study with 14 users of varying programming proficiency and found that representations significantly improve understandability, and instilled a sense of agency among our participants. Expert programmers use them for verification, while intermediate programmers benefit from confirmation. Natural language-based development with LLMs, coupled with representations, promises to transform software development, making it more accessible and efficient.
翻译:大型语言模型(LLMs)已彻底改变了编程与软件工程领域。诸如GitHub Copilot X等AI编程助手实现了对话式编程,缩小了人类意图与代码生成之间的鸿沟。然而,先前文献揭示了一个关键挑战——用户在一连串自然语言表述后形成的关于系统理解的心理模型,与AI系统的实际理解之间存在差异。为解决这一问题,我们提出了"基于表征的编程"(PwR)方法,该方法利用表征以自然语言将系统的理解传达回用户。我们开展了一项面向任务的实验室研究,招募了14名编程熟练度各异的用户,结果表明表征显著提升了可理解性,并在参与者中建立了掌控感。专家级程序员将其用于验证,而中级程序员则从确认中受益。基于LLM的自然语言开发结合表征,有望变革软件开发,使其更便捷高效。