A Framework for Enhancing Personalized Learning of Computer Programming using Large Language Models
Abstract
Purpose – This study presents a framework that utilizes prompt engineering to refine AI-generated content, ensuring its coherence, accuracy, and educational relevance. It explores the integration of LLMs to enhance personalized learning in introductory computer programming courses, focusing on the C programming language.
Method – The quasi-experimental design was adopted to compare traditional teaching methods with LLM-supported learning. We evaluated adaptive learning algorithms to track changes in student performance over time using metrics like reduced error rates, average time spent on tasks, and task completion rates
Results – The experimental group recorded a pretest mean of 57.16 and an improved posttest mean of 66.24, yielding a gain of +9.08 marks. The control group began with a pretest mean of 60.94 and achieved a posttest mean of 63.08, resulting in a comparatively lower gain of +2.14 marks. To determine statistical significance between the groups, a Mann-Whitney U test was conducted on the posttest scores. The test yielded a U-value of 1,725.5, a Z-score of -2.634, and a p-value of 0.008, indicating that the difference between the experimental and control groups was statistically significant at the p < 0.01 level.
Conclusion – Effective prompt engineering strategies reduce hallucinations and align generated content with curriculum objectives, thereby enabling scalable, adaptive, and student-centered support in programming education.
Recommendations – Learning through LLM frameworks should adopt effective prompt engineering strategies to achieve a practical impact on student engagement, content understanding, and the overall learning experience.
Practical Research Implications – The findings reinforce the pivotal role of prompt engineering in LLM-based learning. Effective GenAI frameworks for education must go beyond novelty and automation and instead embed educationally grounded principles that support learners' development through intelligent, responsive, and context-aware interactions.

This work is licensed under a Creative Commons Attribution 4.0 International License.
This is an Open Access article distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/by/4.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly credited.





