The widespread adoption of Large Language Models (LLMs) in software development is transforming programming from a solution-generative to a solution-evaluative activity. This shift opens a pathway for new cognitive challenges that amplify existing decision-making biases or create entirely novel ones. One such type of challenge stems from cognitive biases, which are thinking patterns that lead people away from logical reasoning and result in sub-optimal decisions. How do cognitive biases manifest and impact decision-making in emerging AI-collaborative development? This paper presents the first comprehensive study of cognitive biases in LLM-assisted development. We employ a mixed-methods approach, combining observational studies with 14 student and professional developers, followed by surveys with 22 additional developers. We qualitatively compare categories of biases affecting developers against the traditional non-LLM workflows. Our findings suggest that LLM-related actions are more likely to be associated with novel biases. Through a systematic analysis of 90 cognitive biases specific to developer-LLM interactions, we develop a taxonomy of 15 bias categories validated by cognitive psychologists. We found that 48.8% of total programmer actions are biased, and developer-LLM interactions account for 56.4% of these biased actions. We discuss how these bias categories manifest, present tools and practices for developers, and recommendations for LLM tool builders to help mitigate cognitive biases in human-AI programming.
翻译:大型语言模型在软件开发中的广泛应用,正将编程从解决方案生成活动转变为解决方案评估活动。这一转变带来了新的认知挑战,这些挑战可能放大现有的决策偏差或产生全新的偏差。其中一类挑战源于认知偏差,即导致人们偏离逻辑推理并做出次优决策的思维模式。在新型人工智能协作开发中,认知偏差如何显现并影响决策过程?本文首次对大语言模型辅助开发中的认知偏差进行了全面研究。我们采用混合方法,结合对14名学生和专业开发者的观察性研究,以及对另外22名开发者的问卷调查。我们定性比较了影响开发者的偏差类别与传统非大语言模型工作流的差异。研究结果表明,与大语言模型相关的行为更可能关联到新型偏差。通过对开发者-大语言模型交互中特有的90种认知偏差进行系统分析,我们建立了包含15个偏差类别的分类体系,并获得了认知心理学家的验证。研究发现,48.8%的程序员行为存在偏差,其中56.4%的偏差行为发生在开发者-大语言模型交互过程中。我们探讨了这些偏差类别的具体表现,为开发者提供了工具与实践建议,并向大语言模型工具构建者提出改进方案,以帮助缓解人机编程中的认知偏差。