Prompt Engineering for Small Language Models: Evaluating ICL for Portuguese Sentiment Analysis

André da F. Schuck, Gabriel L. Garcia, João Renato R. Manesco, Pedro Henrique Paiola, Leandro A. Passos, João Paulo Papa


Abstract
The In-Context Learning (ICL) paradigm enables adapting LLMs without parameter tuning. This work evaluates the impact of prompt engineering on 9B models for Brazilian Portuguese sentiment classification, comparing six prompting formats (fewand zero-shot) across three linguistically diverse models (Gemma2-9B-it, Boto-9B-IT, Qwen3.5-9B) and four public datasets, anchored by a fine-tuned encoder (MSA-DistilBERT, ∼0.1B) and a 685B MoE model (DeepSeek-V3.2) under a unified protocol. Results show that all 9B models outperform the encoder and recover 71–101% of the weak-to-strong gap, with Qwen3.5-9B achieving the highest mean coverage (94.5%). Statistical tests indicate that well-defined instructions are the main driver of ICL performance, capturing most of the achievable accuracy even in zero-shot settings, while elaborate formats (roleplay, JSON schema, meta-prompting) add no consistent gain over a minimal instruction-plus-demonstrations prompt, offering practical guidance for deploying SLMs in resource-constrained PT-BR NLP scenarios.
Anthology ID:
2026.stil-1.31
Volume:
Proceedings of the 17th Brazilian Symposium in Information and Human Language Technology
Month:
October
Year:
2026
Address:
Cuiabá, Mato Grosso, Brazil
Editors:
Bryan Khelven da Silva Barbosa, Aline Paes, Ariani Di Felippo
Venue:
STIL
SIG:
Publisher:
Association for Computational Linguistics
Note:
Pages:
375–389
Language:
URL:
https://aclanthology.org/2026.stil-1.31/
DOI:
10.5753/stil.2026.25253
Bibkey:
Cite (ACL):
André da F. Schuck, Gabriel L. Garcia, João Renato R. Manesco, Pedro Henrique Paiola, Leandro A. Passos, and João Paulo Papa. 2026. Prompt Engineering for Small Language Models: Evaluating ICL for Portuguese Sentiment Analysis. In Proceedings of the 17th Brazilian Symposium in Information and Human Language Technology, pages 375–389, Cuiabá, Mato Grosso, Brazil. Association for Computational Linguistics.
Cite (Informal):
Prompt Engineering for Small Language Models: Evaluating ICL for Portuguese Sentiment Analysis (Schuck et al., STIL 2026)
Copy Citation:
PDF:
https://aclanthology.org/2026.stil-1.31.pdf