IDEAS home Printed from https://ideas.repec.org/a/gam/jftint/v17y2025i10p445-d1760980.html

Sentiment Analysis in Mexican Spanish: A Comparison Between Fine-Tuning and In-Context Learning with Large Language Models

Author

Listed:
  • Tomás Bernal-Beltrán

    (Departamento de Informática y Sistemas, Universidad de Murcia, Campus de Espinardo, 30100 Murcia, Spain)

  • Mario Andrés Paredes-Valverde

    (Tecnológico Nacional de México, I.T.S. Teziutlán, Fracción I y II, Teziutlán 73960, Puebla, Mexico)

  • María del Pilar Salas-Zárate

    (Tecnológico Nacional de México, I.T.S. Teziutlán, Fracción I y II, Teziutlán 73960, Puebla, Mexico)

  • José Antonio García-Díaz

    (Departamento de Informática y Sistemas, Universidad de Murcia, Campus de Espinardo, 30100 Murcia, Spain)

  • Rafael Valencia-García

    (Departamento de Informática y Sistemas, Universidad de Murcia, Campus de Espinardo, 30100 Murcia, Spain)

Abstract

The proliferation of social media has made Sentiment Analysis an essential tool for understanding user opinions, particularly in underrepresented language variants such as Mexican Spanish. Recent advances in Large Language Models have made effective sentiment analysis through in-context learning techniques, reducing the need for supervised training. This study compares the performance of zero and few-shot with traditional fine-tuning approaches of tourism-related texts in Mexican Spanish. Two annotated datasets from the REST-MEX 2022 and 2023 shared tasks were used for this purpose. Results show that fine-tuning, particularly with the MarIA model, achieves the best overall performance. However, modern LLMs that use in-context learning strategies, such as Mixtral 8x7B for zero-shot and Mistral 7B for few-shot, demonstrate strong potential in low-resource settings by closely approximating the accuracy of fine-tuned models, suggesting that in-context learning is a viable alternative to fine-tuning for sentiment analysis in Mexican Spanish when labeled data is limited. These approaches can enable intelligent, data-driven digital services with applications in tourism platforms and urban information systems that enhance user experience and trust in large-scale socio-technical ecosystems.

Suggested Citation

  • Tomás Bernal-Beltrán & Mario Andrés Paredes-Valverde & María del Pilar Salas-Zárate & José Antonio García-Díaz & Rafael Valencia-García, 2025. "Sentiment Analysis in Mexican Spanish: A Comparison Between Fine-Tuning and In-Context Learning with Large Language Models," Future Internet, MDPI, vol. 17(10), pages 1-23, September.
  • Handle: RePEc:gam:jftint:v:17:y:2025:i:10:p:445-:d:1760980
    as

    Download full text from publisher

    File URL: https://www.mdpi.com/1999-5903/17/10/445/pdf
    Download Restriction: no

    File URL: https://www.mdpi.com/1999-5903/17/10/445/
    Download Restriction: no
    ---><---

    References listed on IDEAS

    as
    1. Ikram Karabila & Nossayba Darraz & Anas El-Ansari & Nabil Alami & Mostafa El Mallahi, 2023. "Enhancing Collaborative Filtering-Based Recommender System Using Sentiment Analysis," Future Internet, MDPI, vol. 15(7), pages 1-21, July.
    2. Shangyi Yan & Jingya Wang & Zhiqiang Song, 2022. "Microblog Sentiment Analysis Based on Dynamic Character-Level and Word-Level Features and Multi-Head Self-Attention Pooling," Future Internet, MDPI, vol. 14(8), pages 1-19, July.
    3. Alireza Alaei & Ying Wang & Vinh Bui & Bela Stantic, 2023. "Target-Oriented Data Annotation for Emotion and Sentiment Analysis in Tourism Related Social Media Data," Future Internet, MDPI, vol. 15(4), pages 1-21, April.
    Full references (including those not matched with items on IDEAS)

    Most related items

    These are the items that most often cite the same works as this one and are cited by the same works as this one.
    1. Abdullah Alghamdi, 2025. "Leveraging Spectral Clustering and Long Short-Term Memory Techniques for Green Hotel Recommendations in Saudi Arabia," Sustainability, MDPI, vol. 17(5), pages 1-28, March.
    2. Bosen Li & Rui Li & Junhao Wang & Aihong Song, 2025. "Tourism Sentiment Chain Representation Model and Construction from Tourist Reviews," Future Internet, MDPI, vol. 17(7), pages 1-30, June.
    3. Hemn Barzan Abdalla & Mehdi Gheisari & Ardalan Hussein Awlla, 2025. "Hybrid self-attention BiLSTM and incentive learning-based collaborative filtering for e-commerce recommendation systems," Electronic Commerce Research, Springer, vol. 25(6), pages 4947-4970, December.
    4. Ulugbek Hudayberdiev & Junyeong Lee & Odil Fayzullaev, 2025. "Smart Tourism Landmark Recognition: A Multi-Threshold Enhancement and Selective Ensemble Approach Using YOLO11," Sustainability, MDPI, vol. 17(17), pages 1-26, September.
    5. Zhongzhong Zeng & Meizhu Wang & Dingyi Liu & Xuan Yu & Bo Zhang, 2024. "A Semantic Analysis Method of Public Public Built Environment and Its Landscape Based on Big Data Technology: Kimbell Art Museum as Example," Land, MDPI, vol. 13(5), pages 1-16, May.
    6. Sawitree Srianan & Aziz Nanthaamornphong & Chayanon Phucharoen, 2025. "Advancing tourism sentiment analysis: a comparative evaluation of traditional machine learning, deep learning, and transformer models on imbalanced datasets," Information Technology & Tourism, Springer, vol. 27(4), pages 1011-1045, December.
    7. Ye Yuan & Wang Wang & Guangze Wen & Zikun Zheng & Zhemin Zhuang, 2023. "Sentiment Analysis of Chinese Product Reviews Based on Fusion of DUAL-Channel BiLSTM and Self-Attention," Future Internet, MDPI, vol. 15(11), pages 1-19, November.
    8. Jinlong Wang & Dong Cui & Qiang Zhang, 2023. "Chinese Short-Text Sentiment Prediction: A Study of Progressive Prediction Techniques and Attentional Fine-Tuning," Future Internet, MDPI, vol. 15(5), pages 1-20, April.

    More about this item

    Keywords

    ;
    ;
    ;
    ;
    ;
    ;
    ;
    ;
    ;

    Statistics

    Access and download statistics

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:gam:jftint:v:17:y:2025:i:10:p:445-:d:1760980. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    If CitEc recognized a bibliographic reference but did not link an item in RePEc to it, you can help with this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: MDPI Indexing Manager (email available below). General contact details of provider: https://www.mdpi.com .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.