Maintenance Notice

Due to necessary scheduled maintenance, the JMIR Publications website will be unavailable from Wednesday, July 01, 2020 at 8:00 PM to 10:00 PM EST. We apologize in advance for any inconvenience this may cause you.

Who will be affected?

Currently accepted at: JMIR Formative Research

Date Submitted: May 15, 2025
Open Peer Review Period: May 16, 2025 - Jul 11, 2025
Date Accepted: Apr 2, 2026
(closed for review but you can still tweet)

This paper has been accepted and is currently in production.

It will appear shortly on 10.2196/72604

The final accepted version (not copyedited yet) is in this tab.

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

  • Saeyoun Choi; 
  • Donghyun Kim; 
  • Ji-Hwan Jeon; 
  • Minji Kim; 
  • Dong Hun Lee; 
  • DaeHwan Ahn; 
  • Eu Sun Lee; 
  • Yoon Ji Kim; 
  • Hyun Youk

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

Please cite as:

Choi S, Kim D, Jeon JH, Kim M, Lee DH, Ahn D, Lee ES, Kim YJ, Youk H

Implementation and Performance Comparison Study of a Retrieval-Augmented Generation (RAG)-based Chatbot for Korean Medical Consultation

JMIR Preprints. 15/05/2025:72604

DOI: 10.2196/preprints.72604

URL: https://preprints.jmir.org/preprint/72604

Download PDF


Request queued. Please wait while the file is being generated. It may take some time.

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