Racharak T.Boongaree N.Ragkhitwetsagul C.Sriwilailak C.Saeheng P.Chuangsuwanich E.Mahidol University2026-04-292026-04-292025-01-01Standards Based AI Innovation for the Learning Ecosystem (2025) , 213-259https://repository.li.mahidol.ac.th/handle/123456789/116439The growing use of Generative Pre-trained Transformers (GPTs) or large language models (LLMs) in programming education has raised concerns about academic dishonesty and the trustworthiness of student submissions. To support educators in evaluating programming skills, it is crucial to identify whether code is written by students or generated by models like ChatGPT. This chapter introduces a framework consisting of two key components: (1) a supervised learning-based detector that distinguishes between human-written and ChatGPT-generated code, and (2) a novel post-hoc explanation mechanism that leverages GPT models to produce humanreadable justifications for each classification. By combining accurate detection with interpretable explanations, the framework enhances assessment transparency, fosters educator trust, and supports academic integrity in AI-assisted learning environments.Computer ScienceSocial SciencesAI Literacy in Code: Identifying and Explaining ChatGPT-Generated Programs in Educational SettingsBook ChapterSCOPUS10.4018/979-8-3373-2235-3.ch0072-s2.0-105036441069