Gabriel L. Garcia
Author directory2026
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
Proceedings of the 17th Brazilian Symposium in Information and Human Language Technology
André da F. Schuck | Gabriel L. Garcia | João Renato R. Manesco | Pedro Henrique Paiola | Leandro A. Passos | João Paulo Papa
Proceedings of the 17th Brazilian Symposium in Information and Human Language Technology
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.