The invention discloses a
traditional Chinese medicine intelligent inquiry method and
system based on a
knowledge graph and medical case enhancement RAG, and the method comprises the following steps: collecting
traditional Chinese medicine related data from a plurality of sources, and carrying out the data cleaning, formatting and
standardization processing, and constructing a
knowledge graph containing
traditional Chinese medicine symptoms,
disease causes, prescriptions, and the mutual relation of the symptoms, the
disease causes, the prescriptions; expressing a
knowledge structure in the graph in a triple form; searching a local sub-graph related to query based on query
keyword extraction and generalization by utilizing a Leiden
community detection
algorithm; a mixed retrieval strategy is adopted, global search and local search are combined, recalled contents are sorted and scored, global and local retrieval results are fused, and a large
language model is uniformly output. The
system aims at improving the intelligent level and individuation ability of traditional Chinese
medicine diagnosis, firstly, a
knowledge graph covering entities such as traditional Chinese
medicine theories, symptoms,
pathogenesis and prescriptions and relationships of the entities is constructed,
mass traditional Chinese
medicine data are systematically integrated, deep understanding and
semantic association of traditional Chinese medicine complex diagnosis and treatment logic are ensured, and the traditional Chinese medicine diagnosis and treatment efficiency is improved. Through deep combination of the structured
knowledge base and the generated model, the diagnosis and treatment accuracy is improved, and the model
fine tuning and updating cost is reduced.