Clinical decision and prescription generation for diarrhea in traditional Chinese medicine based on large language model

To develop a clinical decision and prescription generation system (CDPGS) specifically for diarrhea in traditional Chinese medicine (TCM), utilizing a specialized large language model (LLM), Qwen-TCM-Dia, to standardize diagnostic processes and prescription generation. Two primary datasets were constructed: an evaluation benchmark and a fine-tuning dataset consisting of fundamental diarrhea knowledge, medical records, and chain-of-thought (CoT) reasoning datasets. After an initial evaluation of 16 open-source LLMs across inference time, accuracy, and output quality, Qwen2.5 was selected as the base model due to its superior overall performance. We then employed a two-stage low-rank adaptation (LoRA) fine-tuning strategy, integrating continued pre-training on domain-specific knowledge with instruction fine-tuning using CoT-enriched medical records. This approach was designed to embed the clinical logic (symptoms → pathogenesis → therapeutic principles → prescriptions) into the model’s reasoning capabilities. The resulting fine-tuned model, specialized for TCM diarrhea, was designated as Qwen-TCM-Dia. Model performance was evaluated for disease diagnosis and syndrome type differentiation using accuracy, precision, recall, and F1-score. Furthermore, the quality of the generated prescriptions was compared with that of established open-source TCM LLMs. Qwen-TCM-Dia achieved peak performance compared to both the base Qwen2.5 model and five other open-source TCM LLMs. It achieved 97.05% accuracy and 91.48% F1-score in disease diagnosis, and 74.54% accuracy and 74.21% F1-score in syndrome type differentiation. Compared with existing open-source TCM LLMs (BianCang, HuangDi, LingDan, TCMLLM-PR, and ZhongJing), Qwen-TCM-Dia exhibited higher fidelity in reconstructing the “symptoms → pathogenesis → therapeutic principles → prescriptions” logic chain. It provided complete prescriptions, whereas other models often omitted dosages or generated mismatched prescriptions. By integrating continued pre-training, CoT reasoning, and a two-stage fine-tuning strategy, this study establishes a CDPGS for diarrhea in TCM. The results demonstrate the synergistic effect of strengthening domain representation through pre-training and activating logical reasoning via CoT. This research not only provides critical technical support for the standardized diagnosis and treatment of diarrhea but also offers a scalable paradigm for the digital inheritance of expert TCM experience and the intelligent transformation of TCM.

Authors

Institutions

Publication Details

Journal
Digital Chinese Medicine
Published
2026-03-01
DOI
https://doi.org/10.1016/j.dcmed.2026.02.003
Primary Topic
Traditional Chinese Medicine Studies
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Clinical decision and prescription generation for diarrhea in traditional Chinese medicine based on large language model

Wu Jiaze Wu Jiaze, Rui Hongliang, Dai Haoran, Liu Baoli et al.
Digital Chinese Medicine
Traditional Chinese Medicine Studies
article

Clinical decision and prescription generation for diarrhea in traditional Chinese medicine based on large language model

Wu Jiaze Wu Jiaze, Rui Hongliang, Dai Haoran, Liu Baoli, Liang Hao
article en

Abstract

To develop a clinical decision and prescription generation system (CDPGS) specifically for diarrhea in traditional Chinese medicine (TCM), utilizing a specialized large language model (LLM), Qwen-TCM-Dia, to standardize diagnostic processes and prescription generation. Two primary datasets were constructed: an evaluation benchmark and a fine-tuning dataset consisting of fundamental diarrhea knowledge, medical records, and chain-of-thought (CoT) reasoning datasets. After an initial evaluation of 16 open-source LLMs across inference time, accuracy, and output quality, Qwen2.5 was selected as the base model due to its superior overall performance. We then employed a two-stage low-rank adaptation (LoRA) fine-tuning strategy, integrating continued pre-training on domain-specific knowledge with instruction fine-tuning using CoT-enriched medical records. This approach was designed to embed the clinical logic (symptoms → pathogenesis → therapeutic principles → prescriptions) into the model’s reasoning capabilities. The resulting fine-tuned model, specialized for TCM diarrhea, was designated as Qwen-TCM-Dia. Model performance was evaluated for disease diagnosis and syndrome type differentiation using accuracy, precision, recall, and F1-score. Furthermore, the quality of the generated prescriptions was compared with that of established open-source TCM LLMs. Qwen-TCM-Dia achieved peak performance compared to both the base Qwen2.5 model and five other open-source TCM LLMs. It achieved 97.05% accuracy and 91.48% F1-score in disease diagnosis, and 74.54% accuracy and 74.21% F1-score in syndrome type differentiation. Compared with existing open-source TCM LLMs (BianCang, HuangDi, LingDan, TCMLLM-PR, and ZhongJing), Qwen-TCM-Dia exhibited higher fidelity in reconstructing the “symptoms → pathogenesis → therapeutic principles → prescriptions” logic chain. It provided complete prescriptions, whereas other models often omitted dosages or generated mismatched prescriptions. By integrating continued pre-training, CoT reasoning, and a two-stage fine-tuning strategy, this study establishes a CDPGS for diarrhea in TCM. The results demonstrate the synergistic effect of strengthening domain representation through pre-training and activating logical reasoning via CoT. This research not only provides critical technical support for the standardized diagnosis and treatment of diarrhea but also offers a scalable paradigm for the digital inheritance of expert TCM experience and the intelligent transformation of TCM.

Digital Chinese MedicineVol. 9(1)
Hunan University of Traditional Chinese Medicine (CN), Beijing University of Chinese Medicine (CN), Capital Medical University (CN), Hunan Academy of Traditional Chinese Medicine (CN), Institute of Laboratory Animal Science (CN), Beijing Hospital of Traditional Chinese Medicine (CN)
Peace, Justice and strong institutions
Openalex Percentile: Top 4%
Traditional Chinese Medicine Studies
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.