Automated Phenotype Annotation in Spanish Clinical Text: A Large Language Model Approach with Retrieval-Augmented Generation
This work addresses the challenge of automatically annotating phenotypes from unstructured Spanish clinical text. Phenotype coding from free text is essential for standardizing health information and improving interoperability between health information systems. Currently, this task is often done ma...
| Autor: | |
|---|---|
| Tipo de recurso: | tesis de maestría |
| Estado: | Versión enviada para evaluación y publicación |
| Fecha de publicación: | 2025 |
| País: | España |
| Institución: | Universitat Oberta de Catalunya (UOC) |
| Repositorio: | O2, repositorio institucional de la UOC |
| OAI Identifier: | oai:openaccess.uoc.edu:10609/152965 |
| Acceso en línea: | https://hdl.handle.net/10609/152965 |
| Access Level: | acceso abierto |
| Palabra clave: | Human Phenotype Ontology (HPO), Artificial Intelligence (AI), phenotyping, medical coding, Large Language Model (LLM), Retrieval Augmented Generation (RAG) |
| id |
ES_e767a5f53ff5bb3dc3140ea978bfffe3 |
|---|---|
| oai_identifier_str |
oai:openaccess.uoc.edu:10609/152965 |
| network_acronym_str |
ES |
| network_name_str |
España |
| repository_id_str |
|
| spelling |
Automated Phenotype Annotation in Spanish Clinical Text: A Large Language Model Approach with Retrieval-Augmented GenerationDíaz Río, MalenaHuman Phenotype Ontology (HPO), Artificial Intelligence (AI), phenotyping, medical coding, Large Language Model (LLM), Retrieval Augmented Generation (RAG)This work addresses the challenge of automatically annotating phenotypes from unstructured Spanish clinical text. Phenotype coding from free text is essential for standardizing health information and improving interoperability between health information systems. Currently, this task is often done manually by geneticists, increasing workload and delaying patient care. The objective of this work is to optimize the current annotation process by developping an Articial Intelligencebased platform that automates phenotype extraction and mapping. The system analyzes Spanish clinical notes, identifies relevant phenotypes, and links them to corresponding codes from the Human Phenotype Ontology (HPO). The proposed approach combines Large Language Model (LLM) with Retrieval Augmented Generation (RAG), as this method has shown high accuracy in similar tasks in English. Additional benefits include adaptability to ontology updates and easy scalability to other codification systems. The methodology followed in this work involves translating the HPO into Spanish, building a reference vector database, testing prompt strategies, and creating a user interface for the validation and annotation of clinical notes. The entire solution is built on an open-source, microservice-based architecture. In addition, the results of different RAG and LLMs configurations are compared, revealing their effect on accuracy and computational cost. Results show that the LLMs alone (i.e. OpenAI’s o4-mini) performs poorly (F1-score of 0.2), often generating incorrect or unrelated codes. Integrating RAG significantly improves results. The highest-performing configuration achieved reaches an F1-score of 0.64 (0.68 precision and 0.62 recall) on the RAGHPO dataset.Universitat Oberta de Catalunya (UOC)Pérez Millan, AgnèsMadrid García, Alfredo202520252025info:eu-repo/semantics/masterThesisinfo:eu-repo/semantics/submittedVersionapplication/pdfhttps://hdl.handle.net/10609/152965reponame:O2, repositorio institucional de la UOCinstname:Universitat Oberta de Catalunya (UOC)InglésAttribution-NonCommercial 4.0 Internationalhttps://creativecommons.org/licenses/by-nc/4.0/info:eu-repo/semantics/openAccessoai:openaccess.uoc.edu:10609/1529652026-05-28T12:42:01Z |
| dc.title.none.fl_str_mv |
Automated Phenotype Annotation in Spanish Clinical Text: A Large Language Model Approach with Retrieval-Augmented Generation |
| title |
Automated Phenotype Annotation in Spanish Clinical Text: A Large Language Model Approach with Retrieval-Augmented Generation |
| spellingShingle |
Automated Phenotype Annotation in Spanish Clinical Text: A Large Language Model Approach with Retrieval-Augmented Generation Díaz Río, Malena Human Phenotype Ontology (HPO), Artificial Intelligence (AI), phenotyping, medical coding, Large Language Model (LLM), Retrieval Augmented Generation (RAG) |
| title_short |
Automated Phenotype Annotation in Spanish Clinical Text: A Large Language Model Approach with Retrieval-Augmented Generation |
| title_full |
Automated Phenotype Annotation in Spanish Clinical Text: A Large Language Model Approach with Retrieval-Augmented Generation |
| title_fullStr |
Automated Phenotype Annotation in Spanish Clinical Text: A Large Language Model Approach with Retrieval-Augmented Generation |
| title_full_unstemmed |
Automated Phenotype Annotation in Spanish Clinical Text: A Large Language Model Approach with Retrieval-Augmented Generation |
| title_sort |
Automated Phenotype Annotation in Spanish Clinical Text: A Large Language Model Approach with Retrieval-Augmented Generation |
| dc.creator.none.fl_str_mv |
Díaz Río, Malena |
| author |
Díaz Río, Malena |
| author_facet |
Díaz Río, Malena |
| author_role |
author |
| dc.contributor.none.fl_str_mv |
Pérez Millan, Agnès Madrid García, Alfredo |
| dc.subject.none.fl_str_mv |
Human Phenotype Ontology (HPO), Artificial Intelligence (AI), phenotyping, medical coding, Large Language Model (LLM), Retrieval Augmented Generation (RAG) |
| topic |
Human Phenotype Ontology (HPO), Artificial Intelligence (AI), phenotyping, medical coding, Large Language Model (LLM), Retrieval Augmented Generation (RAG) |
| description |
This work addresses the challenge of automatically annotating phenotypes from unstructured Spanish clinical text. Phenotype coding from free text is essential for standardizing health information and improving interoperability between health information systems. Currently, this task is often done manually by geneticists, increasing workload and delaying patient care. The objective of this work is to optimize the current annotation process by developping an Articial Intelligencebased platform that automates phenotype extraction and mapping. The system analyzes Spanish clinical notes, identifies relevant phenotypes, and links them to corresponding codes from the Human Phenotype Ontology (HPO). The proposed approach combines Large Language Model (LLM) with Retrieval Augmented Generation (RAG), as this method has shown high accuracy in similar tasks in English. Additional benefits include adaptability to ontology updates and easy scalability to other codification systems. The methodology followed in this work involves translating the HPO into Spanish, building a reference vector database, testing prompt strategies, and creating a user interface for the validation and annotation of clinical notes. The entire solution is built on an open-source, microservice-based architecture. In addition, the results of different RAG and LLMs configurations are compared, revealing their effect on accuracy and computational cost. Results show that the LLMs alone (i.e. OpenAI’s o4-mini) performs poorly (F1-score of 0.2), often generating incorrect or unrelated codes. Integrating RAG significantly improves results. The highest-performing configuration achieved reaches an F1-score of 0.64 (0.68 precision and 0.62 recall) on the RAGHPO dataset. |
| publishDate |
2025 |
| dc.date.none.fl_str_mv |
2025 2025 2025 |
| dc.type.none.fl_str_mv |
info:eu-repo/semantics/masterThesis info:eu-repo/semantics/submittedVersion |
| format |
masterThesis |
| status_str |
submittedVersion |
| dc.identifier.none.fl_str_mv |
https://hdl.handle.net/10609/152965 |
| url |
https://hdl.handle.net/10609/152965 |
| dc.language.none.fl_str_mv |
Inglés |
| language_invalid_str_mv |
Inglés |
| dc.rights.none.fl_str_mv |
Attribution-NonCommercial 4.0 International https://creativecommons.org/licenses/by-nc/4.0/ info:eu-repo/semantics/openAccess |
| rights_invalid_str_mv |
Attribution-NonCommercial 4.0 International https://creativecommons.org/licenses/by-nc/4.0/ |
| eu_rights_str_mv |
openAccess |
| dc.format.none.fl_str_mv |
application/pdf |
| dc.publisher.none.fl_str_mv |
Universitat Oberta de Catalunya (UOC) |
| publisher.none.fl_str_mv |
Universitat Oberta de Catalunya (UOC) |
| dc.source.none.fl_str_mv |
reponame:O2, repositorio institucional de la UOC instname:Universitat Oberta de Catalunya (UOC) |
| instname_str |
Universitat Oberta de Catalunya (UOC) |
| reponame_str |
O2, repositorio institucional de la UOC |
| collection |
O2, repositorio institucional de la UOC |
| repository.name.fl_str_mv |
|
| repository.mail.fl_str_mv |
|
| _version_ |
1869422851947233280 |
| score |
15,81155 |