Improving GPT-Driven Medical Question Answering Model Using SPARQL–Retrieval-Augmented Generation Techniques
Open Access
- 31 August 2025
- journal article
- research article
- Published by MDPI AG in Electronics
- Vol. 14 (17) , 3488
Abstract
The development of medical question-answering systems (QASs) encounters substantial challenges due to the complexities of medical terminologies and the lack of reliable datasets. The shortcomings of traditional artificial intelligence (AI) driven QAS lead to generating outcomes with a higher rate of hallucinations. In order to overcome these limitations, there is a demand for a reliable QAS to understand and process complex medical queries and validate the quality and relevance of its outcomes. In this study, we develop a medical QAS by integrating SPARQL, retrieval-augmented generation (RAG), and generative pre-trained transformer (GPT)-Neo models. Using this strategy, we generate a synthetic dataset to train and validate the proposed model, addressing the limitations of the existing QASs. The proposed QAS was generalized on the MEDQA dataset. The findings revealed that the model achieves a generalization accuracy of 87.26% with a minimal hallucination rate of 0.16. The model outperformed the existing models by leveraging deep learning techniques to handle complex medical queries. The dynamic responsive capability of the proposed model enables it to maintain the accuracy of medical information in a rapidly evolving healthcare environment. Employing advanced hallucination reduction and query refinement techniques can fine-tune the model’s performance.Keywords
Funding Information
- Deanship of Scientific Research, Vice Presidency for Graduate Studies and Scientific Research, King Faisal University (KFU253047)
This publication has 38 references indexed in Scilit:
- Enhancing knowledge graph interactions: A comprehensive Text-to-Cypher pipeline with large language modelsInformation Processing & Management, 2025
- Real-time tracker of chicken for poultry based on attention mechanism-enhanced YOLO-Chicken algorithmComputers and Electronics in Agriculture, 2025
- A review on persian question answering systems: from traditional to modern approachesArtificial Intelligence Review, 2025
- Tool learning with large language models: a surveyFrontiers of Computer Science, 2025
- cLegal-QA: a Chinese legal question answering with natural language generation methodsComplex & Intelligent Systems, 2024
- Using LLMs and ontologies to extract causal relationships from medical abstractsProcedia Computer Science, 2024
- LLMs for knowledge graph construction and reasoning: recent capabilities and future opportunitiesWorld Wide Web, 2024
- MedExpQA: Multilingual benchmarking of Large Language Models for Medical Question AnsweringArtificial Intelligence in Medicine, 2024
- Bioinformatics and biomedical informatics with ChatGPT: Year one reviewQuantitative Biology, 2024
- Transformer models used for text-based question answering systemsApplied Intelligence, 2022