Fine-Tuning Large Language Models and Machine Learning for Extracting Entities and Relationships in Spanish Medical Texts

Authors

  • José A. Reyes-Ortiz UAM
  • Nidia K. Serafin-Rojas UAM-Azcapotzalco
  • Maricela Bravo UAM-Azcapotzalco
  • Jousé Padilla-Cuevas UAM-Azcapotzalco

DOI:

https://doi.org/10.61467/2007.1558.2025.v16i4.575

Keywords:

Natural Language Processing, Entities and Relationships Extraction, Fine-tuning Large Language Models, Machine Learning

Abstract

In this paper, we delve into the techniques used to extract information from medical texts written in Spanish. Our study focuses on fine-tuning Large Language Models by training them on Spanish medical texts and adjusting various hyperparameters. We also explore traditional machine learning algorithms like support vector machines, decision trees, and nearest neighbours. Our analysis aims to evaluate the tool's ability to identify entities and relationships between them. Our results show that the support vector machine algorithm outperformed Large Language Models in entity identification, achieving a 78.72% F1 score compared to 68.04%. However, Large Language Models demonstrated superior performance in relationship identification, achieving a 57.15% F1 score compared to 35.5% for machine learning algorithms.

Downloads

Published

2025-10-12

How to Cite

Reyes-Ortiz, J. A., Serafin-Rojas, N. K., Bravo, M., & Padilla-Cuevas, J. (2025). Fine-Tuning Large Language Models and Machine Learning for Extracting Entities and Relationships in Spanish Medical Texts. International Journal of Combinatorial Optimization Problems and Informatics, 16(4), 473–485. https://doi.org/10.61467/2007.1558.2025.v16i4.575

Issue

Section

Ontologies and Knowledge Graphs