Saeheng P.Boongaree N.Sriwilailak C.Ragkhitwetsagul C.Racharak T.Chuangsuwanich E.Mahidol University2026-06-202026-06-202026-01-01International Conference on Agents and Artificial Intelligence Vol.5 (2026) , 4714-471921843589https://repository.li.mahidol.ac.th/handle/123456789/117422The adoption of Large Language Models (LLMs) is rising in programming education, which raises concerns regarding academic dishonesty and a lack of trustworthiness in students’ programming submissions. There are recent automated techniques and tools for classifying submitted code as generated by LLMs or created by students. However, they lack an explanation of their decision, which educators often require to make informed decisions. This paper presents NPC, an approach for detecting and explaining code snippets generated by ChatGPT, employing machine learning and our proposed local neighborhood sampling strategy to build post-hoc explainability in artificial intelligence (AI). We develop our approach as a web application that not only detects ChatGPT-generated code but also provides educators with explanations in an easy-tounderstand format for each classification. The evaluation found that the explanations were clear and helpful, reinforcing the tool’s potential to support academic integrity in programming education. The video demonstration of the tool is available at https://bit.ly/ase25-npc-demo. The tool’s source code is publicly available at https://github.com/pachanitha/NPC Project.Computer ScienceNPC: Automated Tool for Detecting and Explaining ChatGPT-Generated ProgramsConference PaperSCOPUS10.5220/00144855000040522-s2.0-1050417084152184433X