Abstract Large Language Models (LLMs) have demonstrated exceptional generalization capabilities across various fields, including their application in Traditional Chinese Medicine (TCM). However, the performance of existing LLMs in TCM-specific tasks remains limited due to the lack of optimization for TCM knowledge during the pre-training phase, insufficient datasets, and the constraints of fine-tuning techniques. To address these challenges, this study constructs the XhTCM dataset by systematically integrating data from three authoritative sources—ShenNongTCMDataset, TCMBank, and TCMIP v2. 0. The dataset includes 100, 000 structured entries, covering classical theories, prescription formulations, herbal pharmacology, and modern clinical practices. Based on this, we present XuanHuGPT, a domain-specific LLM tailored for TCM question answering and inference. By applying Parameter-Efficient Fine-Tuning (PEFT) techniques, we effectively balance model performance and training costs. Furthermore, we establish a comprehensive evaluation framework for TCM LLMs, combining quantitative metrics (BLEU, ROUGE, METEOR, BERTScore, and Embedding Distance) with expert qualitative assessments. Experimental results show that XuanHuGPT significantly outperforms both general-purpose LLMs and some existing TCM-specific models in accuracy, coverage, fluency, consistency, sensitivity, and safety. This study presents a reproducible paradigm for building intelligent TCM Q&A systems, contributing to the digital transformation, intelligent development, and global dissemination of TCM knowledge.
Tong et al. (Wed,) studied this question.