一句话:首个针对开发者查看生成式 AI 代码建议过程的眼动追踪研究,量化了建议带来的认知成本与「微中断」。
生成式 AI 代码建议工具(如 GitHub Copilot)已广泛嵌入开发者工作流,但其对开发者认知与任务表现的真实影响尚无一致结论。本文开展首个深入的眼动追踪研究,招募 33 名专业开发者与学生,在其编程过程中同步记录注视行为、建议交互与代码编辑活动,并将高分辨率眼动数据与 AI 建议的细粒度日志对齐,从而量化查阅建议的认知代价。结果显示:约一半的生成建议根本未被查看;在被查看的建议中,超过 75% 最终未被采用;尽管查看时间平均仅约 0.9 秒,每条建议都会引入一次「微中断」,打断开发者的心流。作者据此讨论了如何设计更高效、上下文感知的生成式代码建议,以尽量减少认知开销。
Generative AI code suggestion tools, such as GitHub Copilot, are increasingly integrated into developer workflows. While these tools promise productivity gains, the actual impact on developer cognition and task performance has been mixed. In this paper, we present the first in-depth eye-tracking study of how developers interact with generative AI code suggestions during programming. We recruited 33 professionals and student developers and recorded their gaze behavior, code suggestion interactions, and code editing activity during programming sessions. By combining high-resolution eye-tracking data with fine-grained logging of AI-generated suggestions, we quantify the cognitive costs of reviewing code suggestions. Our findings show that approximately half of the generated suggestions are not even looked at. From the suggestions that were looked at, over 75% are not used. Although suggestions are only reviewed briefly (∼ 0.9 seconds on average), each suggestion introduces a micro-interruption that disrupts developer flow. We discuss opportunities for more efficient and context-aware generative AI code suggestions that minimize cognitive overhead.