GastroTCM: a large language model assistant for gastroenterology in traditional Chinese medicine
摘要
Large language models (LLMs) show promise for supporting Traditional Chinese Medicine (TCM) practice, but their clinical utility is limited by domain-specific knowledge gaps, hallucinations, and weak multi-turn reasoning. We present GastroTCM, a specialised LLM assistant for TCM gastroenterology that we built by fine-tuning a Llama3-8B model and augmenting it with a Retrieval-Augmented Generation (RAG) and an agent framework. GastroTCM targets key shortcomings in current TCM diagnostic support through three components: (1) a dedicated TCM gastroenterology vector database for efficient retrieval of high-value, peer-reviewed knowledge; (2) ShareGPT-style multi-turn dialogue optimisation to preserve clinical context across rounds; and (3) an intelligent agent that dynamically adapts its responses to evolving symptom profiles and user intent.
GastroTCM was trained on approximately 20 million tokens of de-identified clinical records, guideline-based content, and expert-curated TCM question–answer pairs and evaluated against strong Chinese LLM baselines (ChatGLM-6B, Qwen-2). In automatic evaluations, GastroTCM outperformed all baselines in single-turn dialogue (BLEU: 0.334 vs. 0.172–0.246) and multi-turn consultations, where it achieved a substantially higher rate of proactive, clinically appropriate interactions (27/60 vs. ≤ 2/60 cases). Expert review by TCM gastroenterologists further confirmed higher diagnostic accuracy and safety, with the RAG module markedly reducing unsupported or hallucinated statements. These findings suggest that domain-specific, retrieval-enhanced LLMs can meaningfully augment—rather than replace—TCM practitioners in gastroenterology, with the potential to improve access to high-quality, explainable decision support in real-world settings.