This study was conducted in accordance with institutional ethical standards and was approved by the Ethics Committee of the General Hospital of Eastern Theater Command (Approval No. DZQH-KYLLFS-25-38). Written informed consent was obtained from all participants prior to inclusion. All patient data were anonymized and de-identified to ensure privacy protection. The research tools for this protocol have been listed in the Table of Materials.
1. Knowledge graph construction
The knowledge graph was constructed using a multi-source data integration strategy. Data collection and annotation were performed by trained personnel with formal education in Traditional Chinese Medicine (TCM) and acupuncture. Data sources included classical acupuncture texts, Chinese-language literature from CNKI, English-language literature from the Web of Science Core Collection, clinical data from reproductive centers at tertiary hospitals, and standardized knowledge bases (The detailed list of classical texts is available in Supplementary File 1). These sources were selected to ensure both historical depth and contemporary clinical relevance. A total of 400 clinical cases were included to support the identification of diagnostic and therapeutic patterns. The overall workflow of knowledge graph construction is illustrated in Figure 1.

Figure 1: Knowledge graph construction workflow. Overview of the data collection, extraction, and integration process used to construct the knowledge graph. Please click here to view a larger version of this figure.
Inclusion criteria required that all data be directly related to acupuncture diagnosis and treatment, with complete and clearly structured content suitable for entity and relationship extraction. Classical texts were required to be critically collated and free of obvious errors, while modern literature was limited to peer-reviewed publications or documents issued by authoritative institutions. Clinical data were required to be de-identified and ethically approved. Exclusion criteria included duplicate records, incomplete text fragments, content unrelated to acupuncture diagnosis and treatment, and unsupported or erroneous statements.
A hybrid knowledge extraction approach was implemented, combining manual annotation and automated extraction. Approximately 30% of the data, including classical texts and semantically complex content, was manually annotated by domain experts using a standardized annotation platform. The remaining 70% of the data were processed using large language models (LLMs) for automated extraction, including entity recognition, relationship extraction, and terminology normalization. All automatically generated results were reviewed and corrected by experts to ensure accuracy and consistency.
Automated extraction was performed using structured prompt templates designed to guide LLM behavior (Template examples are presented in Supplementary File 2). These templates defined the model role as a domain-specific knowledge extraction expert and incorporated few-shot learning examples in JSON triplet format to improve extraction performance. Preprocessed literature abstracts were submitted through application programming interfaces (APIs), and parallel processing strategies were implemented to improve computational efficiency. Extraction outputs were parsed and validated using JSON validation tools to ensure structural integrity. Validated knowledge triplets were serialized into independent JSON files, named according to their source documents to maintain traceability.
The finalized knowledge graph was stored in a graph database and implemented using Python-based frameworks. Visualization was performed using built-in graph database tools to support inspection and validation.
Entities in the knowledge graph were categorized into seven types: diseases, symptoms, syndrome patterns, acupoints, meridians, treatment methods, and effector substances and biological mechanisms. Relationships between entities were constructed to reflect clinical diagnostic and therapeutic logic, supporting multi-hop reasoning and structured inference. The ontology and relationship structure are illustrated in Figure 2. The detailed knowledge graph schema and examples of relationship constraints are provided in Supplementary File 3 and Supplementary File 4.

Figure 2: Knowledge graph ontology and relationship model. Schematic representation of entity types and relationships within the knowledge graph. Core entities include disease, symptom, syndrome, acupoint, and treatment method, and they illustrate diagnostic and therapeutic relationships.
Please click here to view a larger version of this figure.
2. Application system development
The application system was developed based on the constructed knowledge graph to enable clinical decision support. The system processes user input data and performs structured analysis through natural language processing and knowledge graph reasoning.
Natural language understanding was implemented using the BiLSTM-CRF model for named entity recognition and entity linking; the model architecture is shown in Figure 3. The model architecture consisted of an embedding layer trained on domain-specific corpora, a bidirectional long short-term memory layer to capture contextual information, and a conditional random field layer to ensure optimal sequence labeling. The model was trained on manually annotated clinical and literature data, with annotation performed independently by domain experts. Inter-annotator agreement was assessed using Cohen’s kappa coefficient, with a threshold of ≥0.85. Discrepancies were resolved through expert consensus.

Figure 3: BiLSTM-CRF model architecture. Schematic diagram of the BiLSTM-CRF model used for named entity recognition, including embedding, BiLSTM, and CRF layers.
Please click here to view a larger version of this figure.
During inference, the model extracted structured entities, including symptoms, diseases, and syndrome patterns, from clinical input data. These entities were mapped to standardized nodes in the knowledge graph using terminology normalization, cosine similarity-based vector matching, and contextual disambiguation.
Knowledge retrieval was performed using a dual-mode strategy that combined keyword and semantic-based approaches. Keyword retrieval utilized full-text indexing for precise matching of structured entities, while semantic retrieval employed vector representations to identify relevant unstructured knowledge. Retrieved results were merged, deduplicated, and structured for downstream processing. A multi-dimensional ranking strategy was applied to prioritize results based on exact matching, semantic similarity, and keyword relevance, with weighting adjusted for gynecological and DOR-related contexts.
The system generated diagnostic and treatment outputs using natural language generation techniques, converting structured knowledge into clinically interpretable responses.
3. Clinical application and evaluation
The developed system was applied in a clinical setting to evaluate its practical performance. Study participants were patients diagnosed with diminished ovarian reserve at a tertiary hospital in Nanjing who consented to receive acupuncture treatment.
Participants were eligible if they were aged 20 to 40 years and met diagnostic criteria for diminished ovarian reserve according to the 2016 POSEIDON criteria and the 2020 Chinese Expert Consensus. Diagnostic indicators included reduced anti-Müllerian hormone levels and antral follicle count < 5. Patients were excluded if they had conditions affecting fertility, serious comorbidities, or had received acupuncture treatment for fertility within the previous three months. The patient inclusion and exclusion flowchart is shown in Figure 4.

Figure 4: Patient inclusion and exclusion flowchart. Flowchart showing patient selection. A total of 127 patients met inclusion criteria, and 90 patients were included after applying exclusion criteria and accounting for incomplete data. Please click here to view a larger version of this figure.
Patient data, including demographic and clinical information, were collected and recorded in a structured format. Participants completed standardized questionnaires to capture symptom and clinical information (the detailed questionnaire is provided in Supplementary File 5). The system generated diagnostic outputs and acupuncture prescriptions based on the input data.
System performance was evaluated using diagnostic accuracy and treatment appropriateness. Diagnostic accuracy was assessed by comparing system-generated syndrome differentiation results with those provided by three senior gynecological TCM physicians, who served as the reference standard. The diagnostic agreement rate was calculated as the proportion of consistent cases among all cases.
Treatment appropriateness was evaluated by a panel of three senior acupuncturists with at least five years of clinical experience and senior professional titles. Experts independently assessed system-generated prescriptions using a 5-point Likert scale. Inter-rater agreement was evaluated using Kendall’s coefficient of concordance (W).