Portuguese Sentiment Analysis with Open-Source LLMs: Models, Prompts, and Efficient Deployment

João V R J Lima, Vládia Pinheiro, Carlos Caminha


Abstract
Robust sentiment analysis in Portuguese is central to applications across Lusophone contexts, yet systematic evaluations still focus predominantly on English and proprietary systems. This paper presents a comparative study of 29 open-source Large Language Models (LLMs) and two proprietary models on Portuguese sentiment classification under four prompting strategies: Zero-Shot, Few-Shot, Chain-of-Thought (CoT), and CoT with Few-Shot (CoT+FS). Experiments on a unified three-class benchmark built from three public review corpora (about 3,000 instances) comprise roughly 372,000 inferences, totaling approximately 150M input tokens and 65M output tokens. Results show that CoT+FS generally yields the best performance for larger models, while several compact open-source models obtain competitive F1-scores with substantially lower computational cost, making them suitable for real-world deployments. We identify concrete teacher–student configurations tailored for knowledge distillation in Portuguese sentiment analysis.
Anthology ID:
2026.propor-1.21
Volume:
Proceedings of the 17th International Conference on Computational Processing of Portuguese (PROPOR 2026) - Vol. 1
Month:
April
Year:
2026
Address:
Salvador, Brazil
Editors:
Marlo Souza, Iria de-Dios-Flores, Diana Santos, Larissa Freitas, Jackson Wilke da Cruz Souza, Eugénio Ribeiro
Venue:
PROPOR
SIG:
Publisher:
Association for Computational Linguistics
Note:
Pages:
212–221
Language:
URL:
https://preview.aclanthology.org/ingest-dnd/2026.propor-1.21/
DOI:
Bibkey:
Cite (ACL):
João V R J Lima, Vládia Pinheiro, and Carlos Caminha. 2026. Portuguese Sentiment Analysis with Open-Source LLMs: Models, Prompts, and Efficient Deployment. In Proceedings of the 17th International Conference on Computational Processing of Portuguese (PROPOR 2026) - Vol. 1, pages 212–221, Salvador, Brazil. Association for Computational Linguistics.
Cite (Informal):
Portuguese Sentiment Analysis with Open-Source LLMs: Models, Prompts, and Efficient Deployment (Lima et al., PROPOR 2026)
Copy Citation:
PDF:
https://preview.aclanthology.org/ingest-dnd/2026.propor-1.21.pdf