
The rise of AI in education offers exciting new ways to support student learning, especially in complex fields like programming. But simply using AI to generate feedback isn’t enough. To truly help students, we need to ground AI-driven tools in solid teaching principles.
In our recent research, we explored how metacognition – the ability to understand and manage one’s own learning – can be used to create more effective AI-assisted programming education. We developed an AI hint system designed around the metacognitive phases of planning, monitoring, and evaluation, and studied how students used it in a real-world course.
Why Metacognition Matters in Programming?
Programming isn’t just about writing code; it’s also about problem-solving, critical thinking, and self-regulation. Metacognition plays a key role in all of these areas. Students who are good at metacognition are better at:
These skills are essential for becoming a successful programmer.
Our AI Hint System: AIMS Hints
To support students’ metacognitive development, we created a system that provides three types of AI-generated hints, which we collectively refer to as AI-generated hints based on Metacognitive Scaffolds (or AIMS hints):
To encourage students to think carefully about their learning process, we set a limit on the number of hints they could request for each problem and allowed them to choose the type of hint they needed.

Overview of students’ requested hints in the study (725 hints in 366 student-question pairs). Throughout the paper, P, D, and O denote a planning, debugging, and optimization hint, respectively.


What We Learned from Students
We conducted a study with 102 students in an introductory data science programming course to see how they interacted with our AIMS hint system. Here are some of our key findings:
Implications for AI-Assisted Learning
Our research has several important implications for the design of AI-assisted learning environments:
Our work demonstrates the potential of integrating metacognitive theory with AI to create more effective programming learning tools. By helping students develop strong metacognitive skills, we can empower them to become better problem-solvers and more successful programmers.
References:
Plan More, Debug Less: Applying Metacognitive Theory to AI-Assisted Programming Education, Phung et al. (AIED 2025), paper will be publicly available soon.