What these studies actually measure when they say "computational thinking"
Computational thinking is not a single test score in the abstract; in these studies it is broken into dimensions and measured before and after a programming course. One comparison assessed five separate computational thinking dimensions alongside a measure of epistemic laziness, the habit of accepting answers without working through the reasoning [2]. Another tracked computational thinking and metacognitive awareness—students' awareness of their own thinking and learning strategies—in two intact classes [4].
That matters for the question, because "building computational thinking" is being checked as a set of skills and habits, not just as finishing an assignment. When an experimental group showed higher post-intervention computational thinking and metacognitive awareness than a control group, that is evidence of skill growth, not merely faster task completion [4]. The scope is a classroom comparison, so it speaks to course-level outcomes rather than to every informal use of an AI chatbot.
Why the way the AI responds may change what students get out of it
The most direct clue comes from comparing two styles of AI support in programming learning: one that gives answers and one that uses Socratic questioning, responding with prompts that push the student to reason. That comparison looked at epistemic laziness and five computational thinking dimensions, and the differences between the styles are the point of the study [2]. In plain terms, an AI that hands over code can let a student skip the mental work; an AI that asks "what do you think this loop does?" keeps that work in the student's hands.
A separate study paired generative AI assistance with Socratic questioning and found the experimental group scored higher on computational thinking and metacognitive awareness than the control group after the intervention [4]. Read together, these results are consistent with the idea that the questioning style is doing some of the work—but the studies compare different classroom setups, so this is a pattern in the evidence rather than a proven cause.
Does this hold for younger students, and what happens to confidence?
The pattern is not limited to older programming students. In a study of fifth graders, combining Scratch coding with ChatGPT interaction was examined for effects on math performance and computational thinking, and the work reports that AI can improve math outcomes and computational thinking in elementary education [3]. That extends the question down to children, though the outcome measured is a mix of math performance and computational thinking rather than programming skill alone.
Confidence and frustration are a separate thread. One study looked at how students' learning styles related to their frustration with and confidence in using generative AI tools for programming, using the VARK framework of visual, auditory, reading/writing, and kinesthetic preferences [5]. This study does not measure computational thinking or task-completion speed, so it cannot settle the build-versus-finish question; it reminds us that the same tool can feel supportive to one student and frustrating to another.
So should a learner let the AI answer, or make it ask?
The practical reading of these studies is that the AI's role is not fixed by the tool itself but by the interaction. Where generative AI support was paired with Socratic questioning, students showed higher computational thinking and metacognitive awareness than a comparison group [4], and a direct comparison of answer-giving versus Socratic support examined epistemic laziness alongside computational thinking dimensions [2]. The task-completion benefit is real—AI help is being studied precisely because it supports programming work—but the evidence points to the questioning mode as the one more closely tied to skill development.
A caveat sits beside that conclusion: these are abstract-level reports of classroom comparisons, and the studies differ in age group, subject mix, and what exactly was measured. The fifth-grade study bundles math performance with computational thinking [3], while the Socratic comparison separates epistemic laziness from thinking dimensions [2]. So the honest answer is that generative AI can build computational thinking when it is used to make students reason, and can mainly help them finish when it is used to supply answers—with the strength of that split still being worked out.
Sources used in this answer
The effect of generative artificial intelligence (AI)-based tool use on students' computational thinking skills, programming self-efficacy and motivation
The study investigated how generative AI tools such as ChatGPT in programming education affect students' computational thinking skills, programming self-efficacy, and motivation.
… -Answer Versus Socratic Generative AI Support in Programming Learning: Differences in Epistemic Laziness, Computational Thinking, and Computational Thinking …
Comparing answer-giving versus Socratic generative AI support in programming learning, the study assessed epistemic laziness and five computational thinking dimensions.
Assessing the efficacy of coding with Scratch and AI interaction using ChatGPT on 5th graders' math performance and computational thinking
Combining Scratch coding with ChatGPT interaction was examined for effects on fifth graders' math performance and computational thinking, with the work reporting that AI can improve math outcomes and computational thinking in elementary education.
… generative AI-assisted programming learning with Socratic questioning: effects on learning achievement, computational thinking, and metacognitive awareness
In a comparison of two intact classes, generative AI-assisted programming learning with Socratic questioning produced higher post-intervention computational thinking and metacognitive awareness scores than the control group.
Generative AI's impact on programming students: frustration and confidence across learning styles.
The study examined how students' learning styles relate to their frustration with and confidence in using generative AI tools for programming, without addressing computational thinking or task-completion efficiency.
