Kinjal Doshi,
Falguni Parsana,
- Research Scholar, Department of Computer Science, Atmiya University Rajkot, Gujarat, India
- Assistant Professor, Department of Computer Science, Atmiya University Rajkot, Gujarat, India
Abstract
The requirement for large, manually labeled datasets is one of the main barriers to applying sentiment analysis algorithms in specialized or rapidly evolving disciplines in the present natural language processing (NLP) landscape. This work investigates a paradigm shift from traditional fully supervised learning to data-efficient methods, specifically zero-shot learning (ZSL) and few-shot learning (FSL). This study uses the advanced capabilities of instruction-tuned large language models (LLMs), like GPT-4, to assess the ability to classify emotions in a variety of language settings with little to no task-specific training data. The project mixes benchmark datasets like SST-2 with specialty domain sets like hospital evaluations and financial tweets to evaluate performance stability and domain generalizability. According to our experimental results, highly supervised models like Bidirectional Encoder Representations from Transformers (BERT) obtain great accuracy (93.2%), whereas the GPT-4 few-shot model achieves a competitive 92.8% accuracy utilizing just 1% of the labeled training data. This is a significant resource allocation optimization that reduces both the amount of human labor required for annotation and the computational overhead of fine-tuning the model. The study then does a comprehensive error analysis, indicating persistent challenges in language complexity, such as recognizing sarcasm and understanding domain-specific jargon. By addressing context ambiguity and data imbalance through purposeful prompt engineering and in-context learning (ICL), this work provides a comprehensive method for performing high-performance sentiment analysis in resource-constrained contexts. The results show that the marginal usefulness of more labeled data rapidly drops at the few-shot barrier, making FSL the most practicable technical and cost-effective method for modern enterprise-level sentiment monitoring.
Keywords: Sentiment analysis, zero-shot learning, few-shot learning, transfer learning, NLP, artificial intelligence, Large Language Models.
[This article belongs to International Journal of Computer Science Languages ]
Kinjal Doshi, Falguni Parsana. Understanding Sentiment Trends Through Zero-Shot and Few-Shot Learning Models. International Journal of Computer Science Languages. 2026; 04(01):01-08.
Kinjal Doshi, Falguni Parsana. Understanding Sentiment Trends Through Zero-Shot and Few-Shot Learning Models. International Journal of Computer Science Languages. 2026; 04(01):01-08. Available from: https://journals.stmjournals.com/ijcsl/article=2026/view=241116
References
- Pang B, Lee L, Vaithyanathan S. Thumbs up? sentiment classification using machine learning techniques [Preprint]. 2002. arXiv:cs/0205070. doi:10.48550/arXiv.cs/0205070.
- Brown TB, Mann B, Ryder N, Subbiah M, Kaplan J, Dhariwal P, et al. Language models are few-shot learners. In: Proceedings of the 34th International Conference on Neural Information Processing Systems (NeurIPS 2020), Vancouver, BC, Canada. Red Hook (NY): Curran Associates Inc.; 2020. Article No.: 159. p. 1877–1901.
- Adusumalli S, Lee H, Hoi Q, Koo SL, Tan IB, Ng PC. Assessment of web-based consumer reviews as a resource for drug performance. J Med Internet Res. 2015;17(8):e211. doi:10.2196/jmir.4396. PubMed PMID: 26319108.
- Ramesh G, Sahil M, Palan SA, Bhandary D, Ashok TA, Shreyas J, et al. A review on NLP zero-shot and few-shot learning: methods and applications. Discov Appl Sci. 2025;7:966. doi:10.1007/s42452-025-07225-5.
- Yu Y, Zhang D, Li S. Unified multi-modal pre-training for few-shot sentiment analysis with prompt-based learning. Proceedings of the 30th ACM International Conference on Multimedia, Lisboa, Portugal. 2022. p. 189–198. doi:10.1145/3503161.3548306.
- Niu C, Li C, Ng V, Luo B. CrossCodeBench: benchmarking cross-task generalization of source code models. IEEE/ACM 45th International Conference on Software Engineering (ICSE), Melbourne, Australia. 2023. p. 537–549. doi:10.1109/ICSE48619.2023.00055.
- Min S, Lyu X, Holtzman A, Artetxe M, Lewis M, Hajishirzi H, et al. Rethinking the role of demonstrations: what makes in-context learning work? [Preprint]. 2022 Feb 25. arXiv:2202.12837. doi:10.48550/arXiv.2202.12837.
- Song R, Li Y, Shi L, Giunchiglia F, Xu H. Shortcut learning in in-context learning: a survey [Preprint]. 2024 Nov 4. arXiv:2411.02018. doi:10.48550/arXiv.2411.02018.
- Zhou Y, Xu A, Zhou Y, Singh J, Gui J, Joty S. Variation in verification: understanding verification dynamics in large language models [Preprint]. 2025 Sep 22. arXiv:2509.17995. doi:10.48550/arXiv.2509.17995.
- Liu H, Tam D, Muqeeth M, Mohta J, Huang T, Bansal M, et al. Few-shot parameter-efficient fine-tuning is better and cheaper than in-context learning. Adv Neural Inf Process Syst. 2022;35:1950–1965.
- Yong G, Jeon K, Gil D, Lee G. Prompt engineering for zero-shot and few-shot defect detection and classification using a visual-language pretrained model. Comput Aided Civ Infrastruct Eng. 2023;38(11):1536–1554. doi:10.1111/mice.12954.
- Zhang W, Deng Y, Liu B, Pan S, Bing L. Sentiment analysis in the era of large language models: a reality check. Findings of the Association for Computational Linguistics: NAACL 2024, Mexico City, Mexico. 2024. p. 3881–3906. doi:10.18653/v1/2024.findings-naacl.246.
- Vamvakas D, Papaioannou I, Tsaknakis C, Sgouros T, Korkas C. Generative AI for sustainable smart environments: a review of energy systems, buildings, and user-centric decision-making. Energies. 2025;18(23):6163. doi:10.3390/en18236163.
- Song Y, Wang T, Cai P, Mondal SK, Sahoo JP. A comprehensive survey of few-shot learning: evolution, applications, challenges, and opportunities. ACM Comput Surv. 2023;55(13s):1–40. doi:10.1145/3582688.
- Kamath U, Keenan K, Somers G, Sorenson S. Prompt-based learning. In: Kamath U, Keenan K, Somers G, Sorenson S, editors. Large language models: a deep dive: bridging theory and practice. 1st ed. Cham (Switzerland): Springer Nature; 2024. p. 83–133. doi:10.1007/978-3-031-65647-7_3.

International Journal of Computer Science Languages
| Volume | 04 |
| Issue | 01 |
| Received | 22/12/2025 |
| Accepted | 09/01/2026 |
| Published | 27/04/2026 |
| Publication Time | 126 Days |
Login
PlumX Metrics