Blog

Teaching Students to Question AI, Not Just Use It

Blog

When I think about where this learning journey truly began, I always return to a moment early in the school year that caught me off guard. I introduced AI tools into my coding classroom, and the energy was electric. Students were typing quickly, generating Python and HTML code with a speed and confidence that felt almost unreal. For a brief moment, I felt proud — it looked like students were finally breaking through the initial barriers that often make coding feel intimidating. But that excitement shifted when I asked one student to explain what their loop was doing.

He paused, looked at the screen, and said quietly, “AI wrote it… I don’t really know.”

That moment stayed with me. 

I noticed students could write Python/HTML code faster, but couldn’t explain it. It was the first time I realized that speed and accuracy were not the same as understanding. That moment became the spark for my inquiry and the beginning of a deeper shift in my teaching.

My inquiry in Lead by Learning’s AI Together Community of Practice centered on understanding how AI could be integrated into a high school coding classroom in a way that strengthened students’ problemsolving skills rather than replacing them. I wanted to explore how AI could support learning without becoming a shortcut. I was especially interested in how students interacted with AI during debugging and how their understanding of code changed when AI was part of the process. This inquiry became a way for me to examine not just student behavior, but my own instructional choices. I found myself asking:

  •  What does it mean to teach coding in a world where AI can generate answers instantly? 
  • How do I ensure that students are still developing the cognitive muscles that computer science requires?

I chose this focus because I care deeply about students becoming confident, independent thinkers. Many of my students — multilingual learners, beginners in coding, or students who have internalized the belief that “coding is too hard” — often struggle with the cognitive load of programming. AI could either widen that gap or help close it. As part of my participation in Lead by Learning’s Community of Practice, we were supported to reflect on our practice and shifts in thinking. I wrote, “I used to think AI increased efficiency → now I think it should support thinking.” That shift is tied to equity. If AI becomes a shortcut, only students who already understand the content benefit. But if AI becomes a scaffold, every student gains access to deeper learning. This matters to me because I want my classroom to be a place where students build confidence, not dependence. I wanted AI to be a tool that opened doors, not one that quietly closed them by masking confusion.

Throughout the year, I collected a wide range of data to understand how students were learning with AI. I analyzed student coding artifacts from the beginning, middle, and end of the year to see how their thinking evolved. I used AI-generated debugging prompts to observe how students approached errors and whether they could articulate their reasoning. I created differentiated HTML tasks to see how students made sense of structure and hierarchy. I gathered written and verbal explanations of student thinking, noting when students could articulate their logic and when they struggled. I tracked patterns in errors, engagement, and confidence. I also collected student reflections about when AI helped them and when it confused them. One of the clearest data points came from comparing early-year and spring explanations: at first, students could fix bugs with AI’s help but couldn’t explain why the fix worked. By spring, many were narrating their debugging steps with clarity and confidence. This shift in metacognition became one of the strongest indicators that my instructional changes were working.

At first, I allowed open-ended AI use, assuming students would naturally use it to deepen their understanding. Instead, I saw faster code but shallower thinking. Students were completing tasks quickly but not engaging in the reasoning behind them, as shown in my data. So I redesigned my approach and began making instructional changes:

  • Adding reflection questions that required students to justify their code.
  • Introducing guided prompts that walked them through debugging step-by-step.
  • Differentiating tasks so students could choose challenges aligned to their skill level. 
  • Modeling how to question AI output rather than accept it. 

The moment a student told me, “AI helped me figure out the bug, but I understand it now because I had to explain it,” I knew the shift was working. That was the moment I realized that AI could actually deepen learning, but only if I created the right conditions.

This inquiry changed my teaching in meaningful ways. I became more intentional about how I integrated AI into lessons. I emphasized explaining logic, narrating debugging steps, and identifying errors in AI-generated code. I taught students how to compare AI output to their own thinking and how to question AI rather than accept it. I collaborated with colleagues and learned more about ethical AI use, which shaped how I framed expectations for students. This wasn’t just a shift in practice — it was a shift in mindset. I began to see AI not as a shortcut but as a tool that, when used thoughtfully, could deepen learning. I also became more reflective about my own role: instead of being the person who provided answers, I became the person who designed the thinking journey.

The outcomes on student learning were significant. Students became more engaged with coding tasks. They improved in debugging Python code with hints, explaining HTML structure, and articulating their thinking. Their confidence grew, especially when tackling unfamiliar problems. They began using AI more responsibly, seeing it as a support rather than a crutch. My classroom shifted from fast answers to slow, intentional thinking, and students rose to meet that expectation. I also noticed a cultural shift: students began asking deeper questions, taking more risks, and showing more curiosity about how code works rather than just what the final output should be.

As I look ahead, I still have several questions. 

  • How can I  continue balancing AI support with student independence?
  • How can AI help me track student progress in real time?
  • How might AI support multilingual learners even more effectively?
  • What does sustainable, ethical AI integration look like long-term?
  • How do I ensure that AI remains a tool for empowerment rather than a shortcut? 
  • How do I help students develop the discernment to know when AI is helpful and when it might mislead them? 

These questions feel energizing rather than overwhelming because this year taught me that inquiry is not about finding final answers, it’s about continually refining my practice to better meet the needs of my students.

Jasneet Kaur Matta is an Engineering Teacher at Dublin High School, where she teaches Advanced Placement Computer Science Principles, Cybersecurity, and Computer Science Essentials courses while supporting department-wide collaboration. As she enters the 26-27 school year, she will have been in education for 12 years, teaching across high schools, community colleges, and enrichment programs. She holds a Master’s degree in Computer Science and is currently completing her M.Ed. in School Leadership along with an  Administrative credential. She is certified in Career Technical Education Information & Technology, AVID Path to Schoolwide, Professional Learning Community Leadership (Northeastern University), and BeGlad, and she brings her background as a former software developer into designing real-world, relevant CS learning experiences. Outside of school, she loves going for walks to reset and reflect.

Interested in partnering with Lead by Learning to build the schools students need? Connect with a member of our team to learn more about our range of partnerships and opportunities designed to reach your goals for student and adult learning.