Topic Classification of Small Sample News Based on Prompt Engineering
Abstract
This paper proposes a classification framework that integrates dynamic prompt generation and knowledge distillation to address the issue of performance degradation in news topic classification in small sample scenarios. Research background shows that over 65% of vertical news datasets have a sample size of less than 500, and traditional methods generally have F1 scores below 0.6 in small sample sizes. This framework consists of three core modules: dynamic prompt generation, extracting news features through GRU and attention mechanisms, and generating adaptive templates by combining topic semantic libraries; Constructing a "teacher student" model through knowledge distillation, using 20000 unlabeled data to transfer ERNIE 3.0 knowledge; The classification decision module integrates features through a gating mechanism and sets dynamic thresholds based on sample distribution. The experiment was validated on a 10 topic news dataset (3200 articles), with an accuracy of 0.785 in the 5-shot scenario and 0.763 in Macro-F1, which were 9.2% and 7.4% better than the mixed prompt model, respectively; The ablation experiment proves that the knowledge distillation module contributes the most to performance improvement (accuracy reduction of 9.1%). Research has shown that this method can effectively utilize the contextual learning ability of prompt engineering and unlabeled data, providing a new solution for low resource news classification.
References
- Li, Ming, et al. "Deep learning and machine learning with gpgpu and cuda: Unlocking the power of parallel computing." arxiv preprint arxiv: 2410.05686 (2024).
- Wu, Gene, et al. "GPGPU performance and power estimation using machine learning." 2015 IEEE 21st international symposium on high performance computer architecture (HPCA). IEEE, 2015.
- Lin, Yiyu, et al. "GPU-Optimized Image Processing and Generation Based on Deep Learning and Computer Vision." Journal of Artificial Intelligence General science (JAIGS) ISSN: 3006-4023 5.1 (2024): 39-49.
- Dhanasekaran, S., et al. "Utilizing cloud computing for distributed training of deep learning models." 2024 Second International Conference on Data Science and Information System (ICDSIS). IEEE, 2024.
- Shank, Daniel B., et al. "AI composer bias: Listeners like music less when they think it was composed by an AI." Journal of Experimental Psychology: Applied 29.3 (2023): 676.
- Yang, Tiancheng, and Shah Nazir. "A comprehensive overview of AI-enabled music classification and its influence in games." Soft Computing 26.16 (2022): 7679-7693.
- Tchemeube, Renaud Bougueng, et al. "Evaluating human-AI interaction via usability, user experience and acceptance measures for MMM-c: A creative AI system for music composition." arXiv preprint arXiv: 2504.14071 (2025).
- Qiusi, Mao. "Research on the improvement method of music education level under the background of AI technology." Mobile information systems 2022.1 (2022): 7616619.
- El Ardeliya, Vina, Joshua Taylor, and Julia Wolfson. "Exploration of artificial intelligence in creative fields: Generative art, music, and design." International Journal of Cyber and IT Service Management 4.1 (2024): 40-46.
- Zhao, Hanbing, et al. "AI-driven music composition: Melody generation using Recurrent Neural Networks and Variational Autoencoders." Alexandria Engineering Journal 120 (2025): 258-270.