Exploring the Design Space of Cognitive Engagement Techniques with AI-Generated Code for Enhanced Learning
Authors
Novice programmers are increasingly relying on Large Language Models (LLMs) to generate code for learning programming concepts. However, this interaction can lead to superficial engagement, giving learners an illusion of learning and hindering skill development. To address this issue, we conducted a systematic design exploration to develop seven cognitive engagement techniques aimed at promoting deeper engagement with AI-generated code. In this paper, we describe our design process, the initial seven techniques and results from a between-subjects study (N=82). We then iteratively refined the top techniques and further evaluated them through a within-subjects study (N=42). We evaluate the friction each technique introduces, their effectiveness in helping learners apply concepts to isomorphic tasks without AI assistance, and their success in aligning learners' perceived and actual coding abilities. Ultimately, our results highlight the most effective technique: guiding learners through the step-by-step problem-solving process, where they engage in an interactive dialog with the AI, prompting what needs to be done at each stage before the corresponding code is revealed.
Research Questions / Practical Problems
Question signals indexed for this paper.
- 100%
Playing Dumb to Get Smart: Creating and Evaluating an LLM-based Teachable Agent within University Computer Science Classes
CHI '25· Human-LLM Collaboration +1
- 80%
DBox: Scaffolding Algorithmic Programming Learning through Learner-LLM Co-Decomposition
CHI '25· Human-LLM Collaboration +2
- 80%
LingoQ: Bridging the Gap between EFL Learning and Work through AI-Generated Work-Related Quizzes
CHI '26· Human-LLM Collaboration +2
- 67%
From Code Generation to Conceptual Learning: Student Use of LLMs in a Web Programming Course
CHI '26· Human-LLM Collaboration +2
- 67%
Exploring the Learnability of Program Synthesizers by Novice Programmers
UIST '22· Human-LLM Collaboration +1
- 60%
CodeAid: Evaluating a Classroom Deployment of an LLM-based Programming Assistant that Balances Student and Educator Needs
CHI '24· Human-LLM Collaboration +1
- 60%
BIDTrainer: An LLMs-driven Education Tool for Enhancing the Understanding and Reasoning in Bio-inspired Design
CHI '24· Human-LLM Collaboration +1
- 60%
Teach AI How to Code: Using Large Language Models as Teachable Agents for Programming Education
CHI '24· Human-LLM Collaboration +1
- 60%
PromptHive: Bringing Subject Matter Experts Back to the Forefront with Collaborative Prompt Engineering for Educational Content Creation
CHI '25· Human-LLM Collaboration +1
- 60%
How Humans Communicate Programming Tasks in Natural Language and Implications For End-User Programming with LLMs
CHI '25· Human-LLM Collaboration +1
Based on Jaccard similarity of research subtopics & professions (≥60%)