ChatCM-RAG: A deep learning-based natural language processing pipeline for analysing ChatGPT applications in medicine using BERTopic and transformer-based retrieval-augmented generation

IF 3.1
Cheng Zhang, Ning Wang, Guoming Chen, Yibin Feng
{"title":"ChatCM-RAG: A deep learning-based natural language processing pipeline for analysing ChatGPT applications in medicine using BERTopic and transformer-based retrieval-augmented generation","authors":"Cheng Zhang,&nbsp;Ning Wang,&nbsp;Guoming Chen,&nbsp;Yibin Feng","doi":"10.1002/ctd2.70136","DOIUrl":null,"url":null,"abstract":"<div>\n \n \n <section>\n \n <h3> Background</h3>\n \n <p>The rapid adoption of ChatGPT in healthcare has generated extensive literature. However, systematic analysis of this emerging field using artificial intelligence (AI)-powered tools remains challenging due to the volume and diversity of publications and the risk of AI-generated hallucinations that compromise factual accuracy.</p>\n </section>\n \n <section>\n \n <h3> Objective</h3>\n \n <p>We developed ChatCM-RAG, a deep learning pipeline integrating BERTopic with transformer-based retrieval-augmented generation to analyse ChatGPT applications in the Medicine literature.</p>\n </section>\n \n <section>\n \n <h3> Methods</h3>\n \n <p>We processed 904 peer-reviewed articles (2022–2025) using a multi-stage pipeline: BERTopic for topic modelling with UMAP dimensionality reduction and HDBSCAN clustering, Facebook AI Similarity Search for semantic retrieval, and transformer models (T5/GPT) for answer generation. The system was evaluated using representative medical queries across retrieval accuracy, generation quality, and system efficiency metrics.</p>\n </section>\n \n <section>\n \n <h3> Results</h3>\n \n <p>ChatCM-RAG identified four distinct topic clusters: general medical AI applications (46.2%), performance evaluation (13.9%), clinical applications and patient care (12.6%), and chatbot implementations (6.0%), with 21.2% unclustered documents. To reduce hallucination and ensure citation authenticity, the generation module is constrained to a curated corpus of 904 PubMed-indexed documents and only permits PMID citations that exist in the retrieval set. In our pilot evaluation on eight representative medical queries, we observed 0 fabricated PMIDs and 0 non-existent citations in generated answers. The system achieved an average response time of 1.73 s, an answer quality score of 0.81, and demonstrated topic-aware retrieval with a 0.90 relevance score, where 73% of retrieved documents originated from topically appropriate clusters. The ChatCM-RAG model has been open-sourced at https://huggingface.co/fc28/ChatCM-RAG. Additional reproducible analyses were performed using the released dataset (<i>n</i> = 904) and code to quantify topic interpretability and retrieval robustness without requiring external LLM calls. Using an 80/20 held-out title-query evaluation, topic-filtered lexical retrieval (TF‑IDF within predicted cluster) improved Cluster-agreement@5 from 0.599 ± 0.309 (global TF‑IDF) to 0.862 ± 0.345. Top TF-IDF terms were identified for each cluster, and retrieval performance was assessed using a held-out evaluation.</p>\n </section>\n \n <section>\n \n <h3> Conclusions</h3>\n \n <p>ChatCM-RAG effectively synthesises large-scale medical literature, revealing that ChatGPT applications in medicine are dominated by exploratory studies with an emerging focus on clinical decision support. The open-source pipeline provides researchers with powerful tools for understanding AI integration in traditional medicine.</p>\n </section>\n </div>","PeriodicalId":72605,"journal":{"name":"Clinical and translational discovery","volume":"6 2","pages":""},"PeriodicalIF":3.1000,"publicationDate":"2026-03-30","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"https://onlinelibrary.wiley.com/doi/epdf/10.1002/ctd2.70136","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Clinical and translational discovery","FirstCategoryId":"1085","ListUrlMain":"https://onlinelibrary.wiley.com/doi/10.1002/ctd2.70136","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

Abstract

Background

The rapid adoption of ChatGPT in healthcare has generated extensive literature. However, systematic analysis of this emerging field using artificial intelligence (AI)-powered tools remains challenging due to the volume and diversity of publications and the risk of AI-generated hallucinations that compromise factual accuracy.

Objective

We developed ChatCM-RAG, a deep learning pipeline integrating BERTopic with transformer-based retrieval-augmented generation to analyse ChatGPT applications in the Medicine literature.

Methods

We processed 904 peer-reviewed articles (2022–2025) using a multi-stage pipeline: BERTopic for topic modelling with UMAP dimensionality reduction and HDBSCAN clustering, Facebook AI Similarity Search for semantic retrieval, and transformer models (T5/GPT) for answer generation. The system was evaluated using representative medical queries across retrieval accuracy, generation quality, and system efficiency metrics.

Results

ChatCM-RAG identified four distinct topic clusters: general medical AI applications (46.2%), performance evaluation (13.9%), clinical applications and patient care (12.6%), and chatbot implementations (6.0%), with 21.2% unclustered documents. To reduce hallucination and ensure citation authenticity, the generation module is constrained to a curated corpus of 904 PubMed-indexed documents and only permits PMID citations that exist in the retrieval set. In our pilot evaluation on eight representative medical queries, we observed 0 fabricated PMIDs and 0 non-existent citations in generated answers. The system achieved an average response time of 1.73 s, an answer quality score of 0.81, and demonstrated topic-aware retrieval with a 0.90 relevance score, where 73% of retrieved documents originated from topically appropriate clusters. The ChatCM-RAG model has been open-sourced at https://huggingface.co/fc28/ChatCM-RAG. Additional reproducible analyses were performed using the released dataset (n = 904) and code to quantify topic interpretability and retrieval robustness without requiring external LLM calls. Using an 80/20 held-out title-query evaluation, topic-filtered lexical retrieval (TF‑IDF within predicted cluster) improved Cluster-agreement@5 from 0.599 ± 0.309 (global TF‑IDF) to 0.862 ± 0.345. Top TF-IDF terms were identified for each cluster, and retrieval performance was assessed using a held-out evaluation.

Conclusions

ChatCM-RAG effectively synthesises large-scale medical literature, revealing that ChatGPT applications in medicine are dominated by exploratory studies with an emerging focus on clinical decision support. The open-source pipeline provides researchers with powerful tools for understanding AI integration in traditional medicine.

Abstract Image

ChatCM-RAG:一个基于深度学习的自然语言处理管道,用于分析ChatGPT在医学中的应用,使用BERTopic和基于变压器的检索增强生成
背景ChatGPT在医疗保健领域的迅速采用已经产生了广泛的文献。然而,使用人工智能(AI)驱动的工具对这一新兴领域进行系统分析仍然具有挑战性,因为出版物的数量和多样性以及人工智能产生的幻觉的风险会损害事实的准确性。我们开发了ChatCM-RAG,这是一个将BERTopic与基于变压器的检索增强生成集成在一起的深度学习管道,用于分析ChatGPT在医学文献中的应用。方法使用多阶段管道处理904篇同行评议文章(2022-2025):BERTopic用于使用UMAP降维和HDBSCAN聚类进行主题建模,Facebook AI相似度搜索用于语义检索,变压器模型(T5/GPT)用于生成答案。使用代表性医疗查询对系统进行评估,包括检索准确性、生成质量和系统效率指标。结果ChatCM-RAG识别出四个不同的主题聚类:一般医疗人工智能应用(46.2%)、性能评估(13.9%)、临床应用和患者护理(12.6%)和聊天机器人实现(6.0%),其中21.2%的文档未聚类。为了减少幻觉并确保引文真实性,生成模块被限制为904个pubmed索引文档的精选语料库,并且只允许检索集中存在的PMID引文。在我们对8个代表性医学问题的试点评估中,我们观察到0个虚构的pmid和0个不存在的引用在生成的答案中。该系统的平均响应时间为1.73 s,答案质量得分为0.81,主题感知检索的相关性得分为0.90,其中73%的检索文档来自主题合适的聚类。ChatCM-RAG模型已经在https://huggingface.co/fc28/ChatCM-RAG上开源。使用发布的数据集(n = 904)和代码执行额外的可重复分析,以量化主题可解释性和检索稳健性,而不需要外部LLM调用。使用80/20的保留标题查询评估,主题过滤的词汇检索(预测簇内的TF - IDF)将Cluster-agreement@5从0.599±0.309(全局TF - IDF)提高到0.862±0.345。为每个集群确定了Top TF-IDF术语,并使用hold -out评估了检索性能。ChatCM-RAG有效地综合了大量医学文献,揭示了ChatGPT在医学中的应用以探索性研究为主,临床决策支持正在兴起。开源管道为研究人员提供了强大的工具,以了解人工智能在传统医学中的整合。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
CiteScore
1.00
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信
小红书