Currently submitted to: JMIR Formative Research
Date Submitted: May 15, 2025
Open Peer Review Period: May 16, 2025 - Jul 11, 2025
(closed for review but you can still tweet)
NOTE: This is an unreviewed Preprint
Warning: This is a unreviewed preprint (What is a preprint?). Readers are warned that the document has not been peer-reviewed by expert/patient reviewers or an academic editor, may contain misleading claims, and is likely to undergo changes before final publication, if accepted, or may have been rejected/withdrawn (a note "no longer under consideration" will appear above).
Peer review me: Readers with interest and expertise are encouraged to sign up as peer-reviewer, if the paper is within an open peer-review period (in this case, a "Peer Review Me" button to sign up as reviewer is displayed above). All preprints currently open for review are listed here. Outside of the formal open peer-review period we encourage you to tweet about the preprint.
Citation: Please cite this preprint only for review purposes or for grant applications and CVs (if you are the author).
Final version: If our system detects a final peer-reviewed "version of record" (VoR) published in any journal, a link to that VoR will appear below. Readers are then encourage to cite the VoR instead of this preprint.
Settings: If you are the author, you can login and change the preprint display settings, but the preprint URL/DOI is supposed to be stable and citable, so it should not be removed once posted.
Submit: To post your own preprint, simply submit to any JMIR journal, and choose the appropriate settings to expose your submitted version as preprint.
Warning: This is an author submission that is not peer-reviewed or edited. Preprints - unless they show as "accepted" - should not be relied on to guide clinical practice or health-related behavior and should not be reported in news media as established information.
Implementation and Performance Comparison Study of a Retrieval-Augmented Generation (RAG)-based Chatbot for Korean Medical Consultation
ABSTRACT
Background:
This study focuses on the development of a GPT-4-based chatbot specifically designed for health consultations in Korean. The chatbot is implemented using the Retrieval-Augmented Generation (RAG) technique alongside Metadata Filtering to enhance its performance.
Objective:
The objective of this research is to analyze and compare the performance of the RAG-based chatbot against other leading language models in the context of Korean health consultations.
Methods:
We developed a Korean medical consultation system integrating Retrieval-Augmented Generation (RAG) with GPT-4o. Medical consultation data were collected from open-source Korean medical resources and public health databases, then preprocessed through cleaning, terminology standardization, de-identification, and classification. The chatbot was fine-tuned for Korean medical dialogues and enhanced with context retention, structured conversation flows, and image-based information extraction. For retrieval, a Korean embedding model (upskyy/bge-m3-korean) and Elastic Search were employed to semantically retrieve relevant medical documents. Metadata Filtering and optimized document chunking improved query precision and retrieval efficiency. Model performance was evaluated using expert-created reference answers, with assessments based on medical accuracy, relevance, and clarity, alongside qualitative clinical validation by medical professionals.
Results:
The proposed model achieved the highest scores in accuracy, relevance, consistency, response time, and cultural appropriateness compared to other models. It showed particularly strong performance in accuracy (4.4) and relevance (4.8), significantly outperforming competing models. In clarity, it also led with a score of 4.9. In qualitative evaluation by medical experts, the model received an 89% approval rate, indicating high trust and reliability in medical consultations. A real-time web service was successfully implemented using an NVIDIA A100 GPU and tools such as Streamlit, Langchain, and Langsmith, enabling fast and accurate health consultations for both the general public and healthcare professionals.
Conclusions:
This study demonstrates that a RAG-based GPT-4 health chatbot with Metadata Filtering improves the accuracy, relevance, and cultural alignment of Korean medical consultations. The model showed superior performance and clinical validity, though limitations remain in complex reasoning and coverage of lifestyle-related topics. Future efforts should enhance metadata extraction, optimize Korean prompts, and broaden the knowledge base to support more comprehensive healthcare applications.
Citation
Request queued. Please wait while the file is being generated. It may take some time.
Copyright
© The authors. All rights reserved. This is a privileged document currently under peer-review/community review (or an accepted/rejected manuscript). Authors have provided JMIR Publications with an exclusive license to publish this preprint on it's website for review and ahead-of-print citation purposes only. While the final peer-reviewed paper may be licensed under a cc-by license on publication, at this stage authors and publisher expressively prohibit redistribution of this draft paper other than for review purposes.