GazeCopilot: Evaluating Novel Gaze-Informed Prompting for AI-Supported Code Comprehension and Readability
By: Yasmine Elfares, Gül Çalikli, Mohamed Khamis
Potential Business Impact:
Helps computers write better code by watching you.
AI-powered coding assistants, like GitHub Copilot, are increasingly used to boost developers' productivity. However, their output quality hinges on the contextual richness of the prompts. Meanwhile, gaze behaviour carries rich cognitive information, providing insights into how developers process code. We leverage this in Real-time GazeCopilot, a novel approach that refines prompts using real-time gaze data to improve code comprehension and readability by integrating gaze metrics, like fixation patterns and pupil dilation, into prompts to adapt suggestions to developers' cognitive states. In a controlled lab study with 25 developers, we evaluated Real-time GazeCopilot against two baselines: Standard Copilot, which relies on text prompts provided by developers, and Pre-set GazeCopilot, which uses a hard-coded prompt that assumes developers' gaze metrics indicate they are struggling with all aspects of the code, allowing us to assess the impact of leveraging the developer's personal real-time gaze data. Our results show that prompts dynamically generated using developers' real-time gaze data significantly improve code comprehension accuracy, reduce comprehension time, and improve perceived readability compared to Standard Copilot. Our Real-time GazeCopilot approach selectively refactors only code aspects where gaze data indicate difficulty, outperforming the overgeneralized refactoring done by Pre-set GazeCopilot by avoiding revising code the developer already understands.
Similar Papers
VizCopilot: Fostering Appropriate Reliance on Enterprise Chatbots with Context Visualization
Human-Computer Interaction
Helps chatbots understand what you really want.
GazeInterpreter: Parsing Eye Gaze to Generate Eye-Body-Coordinated Narrations
Human-Computer Interaction
Explains what people are looking at and doing.
"My productivity is boosted, but ..." Demystifying Users' Perception on AI Coding Assistants
Software Engineering
Helps AI write better code for programmers.