IDEAS home Printed from https://ideas.repec.org/a/gam/jftint/v17y2025i10p445-d1760980.html
   My bibliography  Save this article

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
    ---><---

    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.

    We have no bibliographic references for this item. You can help adding them by using 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.