Intelligent Question-Answering and Knowledge Transfer in Computer Programming Courses Based on ChatGPT and Knowledge Distillation

Main Article Content

H. Y. Liu
Y. N. Wei
P. H. Zhu

Abstract

Current intelligent question-answering and knowledge transfer in programming courses suffer from low efficiency, insufficient model lightweighting, and semantic consistency deviations, limiting the practical deployment of large language models in specialized engineering education. As semantic reasoning and hierarchical information representation become increasingly important for intelligent information processing and knowledge interaction in advanced engineering systems, this paper proposes a ChatGPT semantic transfer optimization method based on hierarchical knowledge distillation. By constructing a multi-level semantic knowledge graph covering programming concepts, syntax, and task logic, the proposed framework performs hierarchical semantic modeling and introduces a multi-layer semantic alignment loss to achieve precise knowledge transfer. Parameter pruning constraints and a dynamic temperature adjustment strategy are further incorporated to improve model lightweighting and training stability, while a semantic consistency judgment mechanism supports intelligent question-answering in programming teaching scenarios. Experimental results demonstrate significant reductions in concept-, syntax-, and task-level distillation losses, together with substantial parameter compression and inference acceleration while maintaining high semantic consistency and answer accuracy. The convergence of semantic alignment corresponds to measurable improvements in practical question-answering performance. The proposed approach provides an effective technical pathway for intelligent programming education and offers methodological references for hierarchical knowledge transfer and semantic information processing in advanced engineering and electromagnetic information systems.

Downloads

Download data is not yet available.

Article Details

How to Cite
Liu, H. Y., Wei, Y. N., & Zhu, P. H. (2026). Intelligent Question-Answering and Knowledge Transfer in Computer Programming Courses Based on ChatGPT and Knowledge Distillation. Advanced Electromagnetics, 15(3), 1321–1331. https://doi.org/10.7716/aem.v15i3.3180
Section
Research Articles

References

A. Keune, “Material syntonicity: Examining computational performance and its materiality through weaving and sewing crafts,” Journal of the Learning Sciences, vol. 31, no. 4-5, pp. 477-508, 2022, doi: 10.1080/10508406.2022.2100704.

View Article

J. Kärnä-Behm and E. Harjuniemi, “Interactive textiles: Learning e-textiles with higher education art and design students,” FormAcademisk, vol. 16, no. 1, pp. 1-15, 2023, doi: 10.7577/formakademisk.5017.

View Article

J. Jin and M. Kim, “GPT-empowered personalized eLearning system for programming languages,” Applied Sciences, vol. 13, no. 23, Art. no. 12773, 2023, doi: 10.3390/app132312773.

View Article

M. Dabingaya, “Analyzing the effectiveness of AI-powered adaptive learning platforms in mathematics education,” Interdisciplinary Journal Papier Human Review, vol. 3, no. 1, pp. 1-7, 2022, doi: 10.47667/ijphr.v3i1.226.

View Article

S. Al Faraby, A. Adiwijaya, and A. Romadhony, “Review on neural question generation for education purposes,” International Journal of Artificial Intelligence in Education, vol. 34, no. 3, pp. 1008-1045, 2024, doi: 10.1007/s40593-023-00374-x.

View Article

C. R. Navas Bonilla, L. M. Viñan Carrasco, J. C. Gaibor Pupiales, and D. E. Murillo Noriega, “The Future of Education: A Systematic Literature Review of Self-Directed Learning with AI,” Future Internet, vol. 17, no. 8, pp. 366, 2025, doi: 10.3390/fi17080366.

View Article

Y. Fan, H. Zhang, R. Li, Y. Wang, G. Zhang, H. Tan, et al., “Weakly-supervised explainable question answering via question aware contrastive learning and adaptive gate mechanism,” Information Sciences, vol. 697, Art. no. 121763, 2025, doi: 10.1016/j.ins.2024.121763.

View Article

H. Yang, L. Xu, C. Liu, and L. Huangfu, “Query-oriented two-stage attention-based model for code search,” Journal of Systems and Software, vol. 210, Art. no. 111948, 2024, doi: 10.1016/j.jss.2023.111948.

View Article

J. Liu, C. Zhang, J. Guo, Y. Zhang, H. Que, K. Deng, et al., “Ddk: Distilling domain knowledge for efficient large language models,” Advances in Neural Information Processing Systems, vol. 37, pp. 98297-98319, 2024, doi: 10.52202/079017-3119.

View Article

K. Huang, X. Guo, and M. Wang, “Towards efficient pre-trained language model via feature correlation distillation,” Advances in Neural Information Processing Systems, vol. 36, pp. 16114-16128, 2023.

Z. Jiang, J. Araki, H. Ding, and G. Neubig, “How can we know when language models know? On the calibration of language models for question answering,” Transactions of the Association for Computational Linguistics, vol. 9, pp. 962-977, 2021, doi: 10.1162/tacl_a_00407.

View Article

D. Wang, Q. Huang, M. Jackson, and J. Gao, “Retrieve what you need: A mutual learning framework for opendomain question answering,” Transactions of the Association for Computational Linguistics, vol. 12, pp. 247-263, 2024, doi: 10.1162/tacl_a_00646.

View Article

I. H. Hsiao and C. Y. Chung, “AI-infused semantic model to enrich and expand programming question generation,” Journal of Artificial Intelligence and Technology, vol. 2, no. 2, pp. 47-54, 2022, doi: 10.37965/jait.2022.0090.

View Article

M. Yousef, K. Mohamed, W. Medhat, E. H. Mohamed, G. Khoriba, and T. Arafa, “BeGrading: Large language models for enhanced feedback in programming education,” Neural Computing and Applications, vol. 37, no. 2, pp. 1027-1040, 2025, doi: 10.1007/s00521-024-10449-y.

View Article

Y. Wu, H. Zhu, C. Wang, F. Song, H. Zhu, Y. Chen, et al., “Programming knowledge tracing based on heterogeneous graph representation,” Knowledge-Based Systems, vol. 300, Art. no. 112161, 2024, doi: 10.1016/j.knosys.2024.112161.

View Article

N. Li, Q. Shen, R. Song, Y. Chi, and H. Xu, “MEduKG: A deep-learning-based approach for multi-modal educational knowledge graph construction,” Information, vol. 13, no. 2, pp. 91, 2022, doi: 10.3390/info13020091.

View Article

R. Cantini, A. Orsino, and D. Talia, “Xai-driven knowledge distillation of large language models for efficient deployment on low-resource devices,” Journal of Big Data, vol. 11, no. 1, pp. 63, 2024, doi: 10.1186/s40537-024-00928-3.

View Article

C. Jia, “Adversarial moment-matching distillation of large language models,” Advances in Neural Information Processing Systems, vol. 37, pp. 112184-112216, 2024, doi: 10.52202/079017-3562.

View Article

K. He, N. Pu, M. Lao, E. M. Bakker, and M. S. K. Lew, “Dual selective knowledge transfer for few-shot classification,” Appl. Intell, vol. 53, no. 22, pp. 27779-27789, 2023, doi: 10.1007/s10489-023-04994-7.

View Article

P. Khodaee, H. L. Viktor, and W. Michalowski, “Knowledge transfer in lifelong machine learning: A systematic literature review,” Artificial Intelligence Review, vol. 57, no. 8, pp. 217, 2024, doi: 10.1007/s10462-024-10853-9.

View Article

B. Liu, W. Guan, C. Yang, Z. Fang, and Z. Lu, “Transformer and graph convolutional network for text classification,” International Journal of Computational Intelligence Systems, vol. 16, no. 1, pp. 161, 2023, doi: 10.1007/s44196-023-00337-z.

View Article

Y. YaPing, Z. U. Abideen, A. Ali, T. Aoun, T. Mazhar, and T. Shahzad, “A hybrid model combining GCN transformer and Word2Vec for Chinese sequence labeling with deep linguistic knowledge,” International Journal of Speech Technology, vol. 28, no. 3, pp. 729-743, 2025, doi: 10.1007/s10772-025-10209-w.

View Article

Y. Zhao, H. Zhou, A. Zhang, R. Xie, Q. Li, and F. Zhuang, “Connecting embeddings based on multiplex relational graph attention networks for knowledge graph entity typing,” IEEE Transactions on Knowledge and Data Engineering, vol. 35, no. 5, pp. 4608-4620, 2022, doi: 10.1109/TKDE.2022.3142056.

View Article

H. Zhu, D. Xu, Y. Huang, Z. Jin, W. Ding, and J. Tong, “Graph structure enhanced pre-training language model for knowledge graph completion,” IEEE Transactions on Emerging Topics in Computational Intelligence, vol. 8, no. 4, pp. 2697-2708, 2024, doi: 10.1109/TETCI.2024.3372442.

View Article

G. Yang, S. Yu, Y. Sheng, and H. Yang, “Attention and feature transfer based knowledge distillation,” Scientific Reports, vol. 13, no. 1, Art. no. 18369, 2023, doi: 10.1038/s41598-023-43986-y.

View Article

W. Jooste, R. Haque, and A. Way, “Knowledge distillation: A method for making neural machine translation more efficient,” Information, vol. 13, no. 2, pp. 88, 2022, doi: 10.3390/info13020088.

View Article

G. Guo, L. Han, L. Wang, D. Zhang, and J. Han, “Semantic-aware knowledge distillation with parameter-free feature uniformization,” Visual Intelligence, vol. 1, no. 1, pp. 6, 2023, doi: 10.1007/s44267-023-00003-0.

View Article

X. Liang, L. Wu, J. Li, T. Qin, M. Zhang, and T. Y. Liu, “Multi-teacher distillation with single model for neural machine translation,” IEEE/ACM Transactions on Audio, Speech, and Language Processing, vol. 30, pp. 992-1002, 2022, doi: 10.1109/TASLP.2022.3153264.

View Article

Z. Yang, Y. Zhang, D. Sui, Y. Ju, J. Zhao, and K. Liu, “Explanation guided knowledge distillation for pre-trained language model compression,” ACM Transactions on Asian and Low-Resource Language Information Processing, vol. 23, no. 2, pp. 1-19, 2024, doi: 10.1145/3639364.

View Article

H. Li, J. Zhang, H. Shen, K. Cheng, and X. Huang, “KEFT: Knowledge-Enhanced Fine-Tuning for Large Language Models in Domain-Specific Question Answering,” Transactions of the Association for Computational Linguistics, vol. 13, pp. 1056-1067, 2025, doi: 10.1162/TACL.a.31.

View Article

Y. Lin, S. Yin, Y. Ding, and X. Liang, “ATMKD: Adaptive temperature guided multi-teacher knowledge distillation,” Multimedia Systems, vol. 30, no. 5, pp. 292, 2024, doi: 10.1007/s00530-024-01483-w.

View Article

Q. Zhong, L. Ding, J. Liu, B. Du, and D. Tao, “Panda: Prompt transfer meets knowledge distillation for efficient model adaptation,” IEEE Transactions on Knowledge and Data Engineering, vol. 36, no. 9, pp. 4835-4848.https://doi.org/10.1109/TKDE.2024.3376453, 2024.

View Article

W. Li, J. Xu, and Q. Chen, “Knowledge distillation-based multilingual fusion code retrieval,” Algorithms, vol. 15, no. 1, pp. 25, 2022, doi: 10.3390/a15010025.

View Article

J. Roh, M. Kim, and K. Bae, “Towards a small language model powered chain-of-reasoning for open-domain question answering,” ETRI Journal, vol. 46, no. 1, pp. 11-21, 2024, doi: 10.4218/etrij.2023-0355.

View Article

S. Liu, X. Guo, X. Hu, and X. Zhao, “Advancing generative intelligent tutoring systems with GPT-4: Design, evaluation, and a modular framework for future learning platforms,” Electronics, vol. 13, no. 24, pp. 4876, 2024, doi: 10.3390/electronics13244876.

View Article

J. Wang, Y. Zhang, and W. Liu, “Question answering system based on the combination of large language model and knowledge graph,” Applied Intelligence, vol. 55, no. 15, pp. 1000, 2025, doi: 10.1007/s10489-025-06828-0.

View Article

Similar Articles

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 > >> 

You may also start an advanced similarity search for this article.