Multi-agent thinking chain multi-round dialogue traditional Chinese medicine inquiry system
Through the multi-agent thinking chain and multi-round dialogue TCM consultation system, combined with large language models and TCM rules, the time, space and doctor experience problems of traditional TCM consultation are solved, efficient and accurate TCM diagnosis is achieved, and the system's generalization ability and flexibility are improved.
Patent Information
- Application Number
- CN202510461808.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-14
- Publication Date
- 2025-07-18
AI Technical Summary
Traditional Chinese medicine consultation methods are limited by doctors’ time and energy, differences in doctor experience, space and time limitations for face-to-face consultation, and the reduction in diagnostic accuracy of the existing technology in the description of complex conditions, and the existing system has insufficient generalization capabilities, maintenance costs and flexibility.
Multi-agent thinking chain and multi-round dialogue TCM consultation system are adopted, including hybrid expert model construction module, thinking chain construction module, thinking chain scoring module, dialogue termination module and optimization module. Multiple thinking chains are built through multiple rounds of dialogue, combined with large language models and traditional Chinese medicine rules for diagnosis, dynamically adjust the consultation strategy, and update the knowledge base in real time.
It improves the accuracy and efficiency of traditional Chinese medicine consultation, expands the scope of application, overcomes the limitations of traditional Chinese medicine methods, provides more efficient and broader traditional Chinese medicine services, and has the prospect of modernization and informatization.
Smart Images

Figure CN120340825A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of traditional Chinese medicine, and particularly to a multi-agent thinking chain multi-round dialogue traditional Chinese medicine interrogation system. Background Art
[0002] In the field of traditional Chinese medicine, the traditional interrogation method mainly relies on the face-to-face communication between doctors and users. Specifically, doctors comprehensively observe the user's complexion, tongue coating, and pulse condition, listen to the user's voice, inquire about the condition and living habits, and feel the pulse through the four diagnostic methods of "inspection, auscultation and olfaction, interrogation, and palpation" to comprehensively obtain the user's condition information. This traditional interrogation method occupies an important position in traditional Chinese medicine diagnosis and treatment, but there are also many deficiencies.
[0003] First of all, the traditional interrogation method is limited by the doctor's time and energy. Since the number of users that doctors can receive per day is limited, it is difficult to achieve large-scale and efficient interrogation services, which to a certain extent restricts the popularization and promotion of traditional Chinese medicine services.
[0004] Secondly, there are significant differences in the experience and level of doctors. Different doctors may have different judgments on the same condition, resulting in inconsistent diagnostic results and affecting the stability and reliability of treatment effects.
[0005] Furthermore, the face-to-face interrogation method has great limitations in terms of time and space. Users need to go to the hospital or clinic in person, which not only increases the user's medical costs and time consumption but also is not conducive to the development of remote medical services.
[0006] In response to the above problems, in recent years, domestic and foreign scholars and technicians have tried to improve the traditional Chinese medicine interrogation system through various technical means. For example, a research has proposed an interrogation system based on large model fine-tuning. The system mainly includes a data preprocessing module, a model training module, and an interrogation interaction module. Its working principle is as follows: First, a large amount of medical data is cleaned and labeled through the data preprocessing module; then, these data are used to fine-tune the pre-trained large model so that it can understand and answer the user's interrogation questions; finally, the dialogue and communication with the user are realized through the interrogation interaction module. However, this system has the problem of insufficient generalization ability in actual applications and is difficult to handle complex and changeable condition descriptions. Especially when facing rare diseases or atypical symptoms, the diagnostic accuracy of the model drops significantly.
[0007] Another study designed a consultation system based on a rule engine. The system consists of a rule base, an inference engine, and a user interface. Its working principle is as follows: through preset medical rules, the inference engine performs logical reasoning based on the input information of the user to obtain a diagnosis result. Although this method improves the accuracy of consultation to a certain extent, the construction and maintenance of the rule base require a large amount of professional knowledge and human input, resulting in high costs; moreover, due to the slow update speed of the rule base and poor flexibility, it is difficult to adapt to the constantly updated medical knowledge and clinical practice.
[0008] In addition, some studies have tried to apply technologies such as deep learning and natural language processing to the traditional Chinese medicine consultation system, but they all have problems to varying degrees, such as limited generalization ability, strong data dependence, and poor model interpretability.
[0009] Although the above technical means have improved the performance of the traditional Chinese medicine consultation system to a certain extent, they still have not completely solved the core problems such as limited generalization ability, high maintenance cost, and poor flexibility. Summary of the Invention
[0010] The purpose of the present invention is to propose a multi-agent thinking chain multi-round dialogue traditional Chinese medicine consultation system to solve the problems existing in the above-mentioned prior art.
[0011] To achieve the above purpose, the present invention provides the following solutions:
[0012] A multi-agent thinking chain multi-round dialogue traditional Chinese medicine consultation system includes: a hybrid expert model construction module, a thinking chain construction module, a thinking chain scoring module, a dialogue termination module, an output module, and an optimization module;
[0013] The hybrid expert model construction module is used to construct a hybrid expert model for traditional Chinese medicine consultation of users;
[0014] The thinking chain construction module is used to conduct multi-round dialogues with users based on the hybrid expert model and construct multiple thinking chains based on the content of the multi-round dialogues; among them, the thinking chain includes: consultation questions and reasoning processes;
[0015] The thinking chain scoring module is used to score the multiple constructed thinking chains;
[0016] The dialogue termination module is used to terminate the dialogue of the thinking chain construction module based on termination conditions and obtain the thinking chain with the highest score;
[0017] The output module is used to output the thinking chain with the highest score to the user or doctor;
[0018] The optimization module is used to optimize the consultation system according to user feedback.
[0019] Optionally, the mixture of experts model construction module includes: a general Chinese medicine expert unit and a specialist expert unit;
[0020] The general Chinese medicine expert unit is responsible for initial medical inquiries and collection of basic information;
[0021] The specialist expert unit is used to conduct in-depth medical inquiries and specialist diagnoses based on the results of the initial medical inquiries by the general Chinese medicine expert unit.
[0022] Optionally, the thought chain construction module includes: a multi-round dialogue unit, an information collection unit, and a construction unit;
[0023] The multi-round dialogue unit is used to conduct multi-round dialogues with the user based on the mixture of experts model, and control the rhythm and direction of the dialogue through a preset dialogue template and dynamic adjustment strategy;
[0024] The information collection unit is used to collect the user's symptoms and medical history information in real time during the dialogue process; adopt natural language processing methods to extract and structure the user's answers;
[0025] The construction unit is used to construct multiple thought chains based on the information collected by the information collection unit.
[0026] Optionally, the thought chain scoring module adopts the scoring results of the comprehensive large language model processing unit and the Chinese medicine rule processing unit, conducts comprehensive scoring using the weighted average method, and selects the optimal thought chain as the diagnostic basis; among them, the scoring basis includes: the logic of the thought chain, the matching degree with the user information, and Chinese medicine rules.
[0027] Optionally, the large language model processing unit adopts a multi-task learning strategy to optimize multiple tasks such as medical inquiries, diagnoses, and treatment recommendations simultaneously, improving the generalization ability of the model in different tasks; during the training process of the large language model, multi-dimensional Chinese medicine data is introduced to ensure that the model can comprehensively understand and process complex problems in Chinese medicine medical inquiries.
[0028] Optionally, a Chinese medicine knowledge base is set in the Chinese medicine rule processing unit, and the Chinese medicine knowledge base is used to store Chinese medicine diagnostic rules and knowledge for the thought chain construction module and the thought chain scoring module to call; the Chinese medicine knowledge base includes etiology, pathogenesis, syndrome types, and treatment methods.
[0029] Optionally, the termination conditions in the dialogue termination module include: all necessary information of the user has been collected, and the score of a certain thought chain reaches a preset threshold.
[0030] Optionally, the optimization module includes: a user feedback and optimization unit and a dynamic knowledge graph and incremental learning unit;
[0031] The user feedback and optimization unit is used to collect the user's feedback on the diagnosis results, and the feedback information is used to adjust the parameters of the traditional Chinese medicine rule processing unit and the large language model processing unit;
[0032] The dynamic knowledge graph and incremental learning unit is used to update the traditional Chinese medicine knowledge base in real time. Combining the incremental learning mechanism, it dynamically adjusts the content of the traditional Chinese medicine knowledge base according to new clinical data, and adjusts the parameters of the large language model. The dynamic knowledge graph and incremental learning unit can query and reason about traditional Chinese medicine knowledge in real time, providing comprehensive knowledge support for the interrogation.
[0033] The beneficial effects of the present invention are:
[0034] The present invention first constructs the general traditional Chinese medicine expert module and the specialist expert module in the system through the hybrid expert model construction module; then uses the thought chain construction module to conduct multiple rounds of conversations between each intelligent agent and the user, and constructs multiple thought chains based on the content of the multiple rounds of conversations; then scores the multiple constructed thought chains through the thought chain scoring module; secondly, uses the dialogue termination module to terminate the conversation of the thought chain construction module through preset termination conditions, and obtains the thought chain with the highest score; finally, outputs the thought chain with the highest score.
[0035] Through the thought chain technology, the system of the present invention can record and analyze the user's answers, dynamically adjust the interrogation strategy, ensure the coherence and accuracy of the interrogation process, and comprehensively summarize the patient information by combining different thought chains. Combining the large language model and traditional Chinese medicine rules, it scores the thought chains, improves the thought chains, conducts multiple rounds of conversations, and terminates the conversation through the intelligent interrogation information and termination algorithm under the conditions of meeting a certain number of rounds and collecting sufficient information to obtain the interrogation result, thereby significantly improving the accuracy of the interrogation and the user experience.
[0036] This system not only overcomes the deficiencies of the traditional interrogation method in terms of time, space, and doctor's experience level, but also brings higher diagnostic efficiency and a wider scope of application through multi-agent collaboration and thought chain technology, providing a new solution for the modernization and informatization of traditional Chinese medicine, and having broad application prospects and social value. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required to be used in the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0038] Figure 1 It is the overall architecture diagram of a multi-agent thought chain multi-round conversation traditional Chinese medicine interrogation system according to an embodiment of the present invention;
[0039] Figure 2 It is the flowchart of the specific operation steps of the embodiment of the present invention;
[0040] Figure 3 It is the COT diagnosis flowchart of the general practitioner agent and the specialist agent in the embodiment of the present invention;
[0041] Figure 4 It is the optimized system architecture diagram of the embodiment of the present invention. Detailed implementation manners
[0042] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0043] To make the above objects, features, and advantages of the present invention more obvious and understandable, the present invention will be further described in detail below in conjunction with the drawings and specific implementation manners.
[0044] This embodiment proposes a multi-agent thinking chain multi-round dialogue traditional Chinese medicine interrogation system, including: a hybrid expert model construction module, a thinking chain construction module, a thinking chain scoring module, a dialogue termination module, an output module, and an optimization module;
[0045] The hybrid expert model construction module is used to construct a hybrid expert model to conduct traditional Chinese medicine interrogation on users;
[0046] The thinking chain construction module is used to conduct multi-round dialogues with users based on the hybrid expert model, and construct multiple thinking chains based on the content of the multi-round dialogues; wherein, the thinking chain includes: interrogation questions and reasoning processes;
[0047] The thinking chain scoring module is used to score the multiple constructed thinking chains;
[0048] The dialogue termination module is used to terminate the dialogue of the thinking chain construction module based on the termination condition, and obtain the thinking chain with the highest score;
[0049] The output module is used to output the thinking chain with the highest score to the user or the doctor;
[0050] The optimization module is used to optimize the interrogation system according to user feedback.
[0051] Specifically, in this embodiment, a Mixture of Experts (MOE) model construction module is provided. The MOE model construction module is used to construct a general Chinese medicine expert module and a specialist expert module. Each module is equipped with an independent knowledge base and decision-making model to adapt to different types of consultation needs. The general medicine expert module is responsible for the initial consultation and basic information collection, while the specialist expert module conducts in-depth consultation and specialist diagnosis based on the results of the initial consultation. Chinese medicine general medicine expert module: Responsible for the initial consultation, collecting basic information of patients, and conducting preliminary analysis and diagnosis. This module uses deep learning algorithms to train models containing common diseases and basic diagnostic knowledge, and can identify and process the initial symptom descriptions of patients. Chinese medicine specialist expert module: Based on the preliminary diagnosis results of the general medicine expert module, conduct in-depth consultation and specialist analysis. For different Chinese medicine specialties (such as internal medicine, surgery, gynecology, etc.), dedicated models are trained respectively to ensure the specialty and accuracy of the diagnosis.
[0052] Furthermore, the thought chain construction module includes: a multi-round dialogue unit, an information collection unit, and a construction unit;
[0053] The multi-round dialogue unit is used to conduct multi-round conversations with the user based on the Mixture of Experts model, and control the rhythm and direction of the conversation through preset dialogue templates and dynamic adjustment strategies;
[0054] The information collection unit is used to collect the user's symptoms and medical history information in real time during the conversation; adopt natural language processing methods to extract and structure the user's answers;
[0055] The construction unit is used to construct multiple thought chains based on the information collected by the information collection unit.
[0056] Furthermore, the natural language processing method in the information collection unit is: using a large language model;
[0057] The large language model is used to understand and generate natural language, improving the naturalness and accuracy of the conversation; the large language model is pre-trained using specific data in the Chinese medicine field.
[0058] Specifically, in this embodiment, the thought chain construction module: is used to generate and manage the thought chains of different agents, ensuring the information flow and collaborative work among agents. Adopt graph database technology to record and manage the generation and evolution process of thought chains, ensuring the consistency and integrity of information.
[0059] The thought chain construction module constructs multiple possible diagnostic thought chains based on the user's initial information and multi-round conversation content. Each thought chain represents a possible diagnostic path, including a series of consultation questions and reasoning processes.
[0060] The multi-round dialogue unit gradually collects detailed user information by conducting multi-round dialogues with the user. The dialogue content is processed by a large language model to ensure the naturalness and accuracy of the language; and through preset dialogue templates and dynamic adjustment strategies, the rhythm and direction of the dialogue are controlled.
[0061] The information collection unit, during the dialogue process, collects information such as the user's symptoms and medical history in real time. Using natural language processing technology, it extracts and structures the user's answers for subsequent analysis and diagnosis.
[0062] Specifically, in this embodiment, the large language model and traditional Chinese medicine rule combination module:
[0063] Large language model: used to understand and generate natural language, enhancing the naturalness and accuracy of the dialogue. Using a pre-trained large language model, it is fine-tuned with specific data in the field of traditional Chinese medicine to enhance the model's performance in the traditional Chinese medicine consultation scenario.
[0064] Traditional Chinese medicine rule base: contains the basic rules and experiences of traditional Chinese medicine diagnosis, used to guide the diagnosis process. Collecting traditional Chinese medicine classic literature and expert experiences to build the rule base to ensure the authority and scientificity of the diagnosis.
[0065] Furthermore, the thought chain scoring module adopts the scoring results of the comprehensive large language model processing unit and the traditional Chinese medicine rule processing unit, uses the weighted average method for comprehensive scoring, and selects the optimal thought chain as the diagnosis basis; among them, the scoring basis includes: the logic of the thought chain, the matching degree with the user information, and the traditional Chinese medicine rules.
[0066] Specifically, in this embodiment, the thought chain scoring module scores multiple constructed thought chains based on the large language model and the traditional Chinese medicine rule base. The scoring basis includes the logic of the thought chain, the matching degree with the user information, the compliance with the traditional Chinese medicine rules, etc.
[0067] The large language model processing adopts a multi-task learning strategy, simultaneously optimizing multiple tasks such as consultation, diagnosis, and treatment recommendation, improving the model's generalization ability in different tasks; during the training process of the large language model, the system will introduce multi-dimensional traditional Chinese medicine data to ensure that the model can comprehensively understand and process complex problems in traditional Chinese medicine consultation. The multi-task learning strategy can improve the comprehensive performance of the model and make it perform well in different scenarios.
[0068] The traditional Chinese medicine knowledge base is used to store traditional Chinese medicine diagnosis rules and knowledge for the thought chain construction module and the thought chain scoring module to call; the traditional Chinese medicine knowledge base includes etiology, pathogenesis, syndrome types, and treatment methods.
[0069] Furthermore, the termination conditions in the dialogue termination module include: all necessary user information has been collected, and the score of a certain thought chain reaches a preset threshold.
[0070] Specifically, in this embodiment, the multi-round dialogue termination module automatically terminates the dialogue when sufficient information is collected and certain conditions are met. The termination conditions include, but are not limited to: all necessary information of the user has been collected, the score of a certain thought chain reaches a preset threshold, etc.
[0071] Information sufficiency judgment sub-module: Judge whether sufficient user information has been collected. Set an information collection threshold, and when the amount of information collected reaches the threshold, it is determined that the information is sufficient.
[0072] Condition satisfaction judgment sub-module: Judge whether the necessary conditions for traditional Chinese medicine diagnosis are met. Set a diagnosis condition threshold, and when the threshold condition is met, it is determined that the diagnosis condition is satisfied.
[0073] The multi-round dialogue inquiry system can automatically collect key points in the inquiry thought chain in a limited number of rounds of dialogue through the "intelligent dynamic inquiry information collection and termination" algorithm, and automatically terminate the dialogue based on the current inquiry thought chain when specific conditions are met. This algorithm can dynamically adjust the inquiry strategy according to the patient's answers to ensure the efficiency and accuracy of information collection. The system evaluates whether the termination conditions are met after each round of dialogue, avoiding unnecessary inquiry steps and improving the inquiry efficiency.
[0074] Furthermore, the optimization module includes: a user feedback and optimization unit and a dynamic knowledge graph and incremental learning unit;
[0075] The user feedback and optimization unit is used to collect the user's feedback on the diagnosis result, and the feedback information is used to adjust the parameters of the traditional Chinese medicine rule processing unit and the large language model processing unit;
[0076] The dynamic knowledge graph and incremental learning unit is used to update the traditional Chinese medicine knowledge base in real time, combine the incremental learning mechanism, dynamically adjust the content of the traditional Chinese medicine knowledge base according to new clinical data, and adjust the parameters of the large language model; the dynamic knowledge graph and incremental learning unit can query and reason about traditional Chinese medicine knowledge in real time to provide comprehensive knowledge support for the inquiry.
[0077] Specifically, the user feedback and optimization unit collects the patient's feedback on the diagnosis result to optimize the system performance. The feedback information will be used to adjust the parameters of the traditional Chinese medicine rule processing module and the large language model processing module to further improve the accuracy of the system and the user experience. The system can automatically adjust the inquiry strategy and diagnosis logic according to the feedback information to achieve self-optimization.
[0078] The dynamic knowledge graph module is used to update the traditional Chinese medicine knowledge base in real time, combine the incremental learning mechanism, and dynamically adjust the content of the knowledge base according to new clinical data to adapt to the changing traditional Chinese medicine theory and clinical practice. The dynamic knowledge graph module can query and reason about traditional Chinese medicine knowledge in real time to provide comprehensive knowledge support for the inquiry. The incremental learning mechanism ensures that the system remains efficient and accurate in the face of new clinical problems.
[0079] Furthermore, the framework design of the traditional Chinese medicine interrogation system in this embodiment is as follows:
[0080] 1. Current symptom summary
[0081] During the interrogation process, the system gradually collects and summarizes the patient's medical information by having multiple rounds of conversations with the patient. Let the current conversation round be (t), and the conversation content be (C_t = {(Q_0,A_0),(Q_1,A_1),......,(Q_t,A_t)}), where (Q_i) and (A_i) represent the question and answer in the (i)-th round respectively. The system uses a large language model (LLM) as a case summary assistant, and combines the conversation content and a preset prompt (promptrm) to generate the current medical summary (RMed_t) of the patient:
[0082] [RMed_t = AGENTmed_rep(C_t,promptrm)]
[0083] This part of the summary covers the patient's symptoms, medical history, and other relevant information, providing a basis for subsequent interrogation and diagnosis.
[0084] 2. Construction of the traditional Chinese medicine expert team
[0085] To construct an accurate interrogation thought chain, the system selects experts related to the patient's condition from a traditional Chinese medicine expert database covering multiple fields. Suppose the patient's chief complaint is (M), and each traditional Chinese medicine expert in a certain field (e_{di}) has their professional background knowledge (K_{edi}). The large language model (LLM) selects a set of experts (SD) closely related to the patient's chief complaint according to the patient's chief complaint (M), the expert background knowledge, and the prompt promptsd through a mapping function (f_{LLM}):
[0086] [SD = f_{LLM}(M,K_{ed1},......,K_{edm},promptsd]
[0087] Among them, (SD = {e_{di}}) represents the set of domain experts related to the patient's chief complaint (M). In addition, the system will also assign a general practitioner of traditional Chinese medicine to each expert team, denoted as (GD = {g_d}). Therefore, the composition of the expert team can be expressed as:
[0088] [Team(M) = (SD,GD)]
[0089] Among them, (f_{LLM}(M) = SD). This construction method not only ensures the professionalism and pertinence of the interrogation, but also guarantees the comprehensiveness of the interrogation through the participation of general practitioners of traditional Chinese medicine.
[0090] 3. Construction of the Inquiry Thought Chain
[0091] The traditional Chinese medicine expert team generates the thought chain for subsequent inquiries based on the current multi-round conversation Ct with the user, explains the reasons, and provides a theoretical basis and direction for subsequent inquiries. Specifically, for the current multi-round conversation Ct of the user, the specialist traditional Chinese medicine expert edi uses a large language model (LLM) combined with their professional background knowledge Kedi and specific prompt words promptqa to generate the subsequent inquiry thought chain and analysis qai related to the user's condition:
[0092] qati = AGENTedi(Ct, Kedi, promptqa)
[0093] At the same time, the general practitioner traditional Chinese medicine expert gd combines the general knowledge base Kga to generate a comprehensive inquiry thought chain and analysis ga based on the user's overall condition:
[0094] gat = AGENTga(Ct, Kga, promptga)
[0095] These inquiry thought chains together constitute the inquiry thought chain TCoTt of the expert team, which includes the inquiry thought chains QAt = {qati} of each specialist traditional Chinese medicine expert and the comprehensive inquiry thought chain GAt = {gat} of the general practitioner traditional Chinese medicine expert:
[0096] TCoTt = (QAt, GAt)
[0097] This thought chain lays the foundation for the subsequent inquiry process. In the following steps, the expert team revises and optimizes TCoTt in multiple rounds to further improve the pertinence and comprehensiveness of the inquiry.
[0098] 4. Summary and Scoring of the Inquiry Thought Chain
[0099] In the stage of summarizing and scoring the inquiry thought chain, we attempt to synthesize the inquiry thought chains and analysis TCoTt from different experts. Based on the current user's condition information RMedt and TCoTt, using a large language model as a thought chain summary assistant, integrating various thought chains provided by the expert team, and combining with the traditional Chinese medicine knowledge scoring rules, the process of scoring the inquiry questions in the summarized thought chain can be expressed as:
[0100] RCoTt0 = AGENTrep(TCoTt, RMedt, promptr).
[0101] 5. Optimization and Improvement of the Collaborative Inquiry Thought Chain
[0102] This stage is based on the previously generated comprehensive inquiry thought chain and its score RCoTt0, and is further revised by consulting the opinions of the expert team. During the consultation process, the experts will feedback whether they agree with the report. If the experts do not agree with the report, they will select the questions with lower scores according to the scores of different questions in the inquiry thought chain, and put forward modification suggestions and reasons. The report is revised according to the experts' feedback. Specifically, through j rounds of discussion, the experts' modification opinions are recorded as Modj, and the report is updated accordingly. The discussion will continue until all experts agree with the report, or the maximum threshold of the number of discussion rounds is reached, obtaining RCoTtf:
[0103] RCoTtj = AGENTrep(RCoTt(j - 1), Modtj, RMedt, promptr)
[0104] 6. Multi-round inquiry
[0105] Based on the previously generated final inquiry thought chain and the current multi-round conversation, the large language model is required to act as a traditional Chinese medicine inquiry expert, simulate a real inquiry scenario, and construct multiple gentle and polite inquiry questions to collect information related to the user's condition:
[0106] (Qt+1, Qt+2,..., Qt+kt) = AGENTconsu(RCoTtf, promptq, Ct)
[0107] Among them, kt is the number of inquiry questions included in RCoTtf. When all experts believe that the inquiry is completed, or the maximum number of inquiries is reached, the large language model acts as a case expert, and based on the multi-round conversation content Cf, summarizes the user case RMedf that conforms to traditional Chinese medicine theory, providing a basis for subsequent syndrome differentiation and treatment.
[0108] Process description of the dynamic knowledge graph and incremental learning mechanism:
[0109] Dynamic knowledge graph update:
[0110] Working principle:
[0111] The dynamic knowledge graph module ensures that the system can make diagnoses according to the latest traditional Chinese medicine theory and clinical practice by updating the traditional Chinese medicine knowledge base in real time. The knowledge graph stores traditional Chinese medicine knowledge in the form of nodes and edges, where nodes represent traditional Chinese medicine concepts (such as causes of diseases, pathogenesis, syndrome types, treatment methods, etc.), and edges represent the relationships between these concepts. In this way, the knowledge graph can efficiently represent and reason about traditional Chinese medicine knowledge, providing comprehensive knowledge support for the inquiry process.
[0112] Technical implementation:
[0113] Knowledge extraction: Using natural language processing techniques (such as named entity recognition, relation extraction, etc.), extract knowledge from traditional Chinese medicine literature and expert experience, and transform it into a graph structure for storage.
[0114] Real-time update: The system extracts knowledge from new clinical data and research results regularly through an incremental learning mechanism, and dynamically updates the knowledge graph. The update process includes adding new nodes, updating node attributes, and adjusting the relationships between nodes.
[0115] Knowledge reasoning: During the interrogation process, the system queries the knowledge graph through graph database technology, combines the patient's symptoms and medical history information, and conducts reasoning and analysis to provide a basis for diagnosis.
[0116] Technical tools: Adopt a graph database (such as Neo4j) to store and manage the knowledge graph, and use deep learning frameworks (such as PyTorch or TensorFlow) to implement knowledge extraction and update algorithms.
[0117] Process description:
[0118] Let the current knowledge graph be KG, the new clinical data be D(new), and the updated knowledge graph be KG'. Extract knowledge entities and relationships from D(new) through natural language processing technology to generate the knowledge graph update content ΔKG. Then, integrate ΔKG into the current knowledge graph KG to obtain the updated knowledge graph KG': KG' = KG ∪ ΔKG.
[0119] Incremental learning mechanism:
[0120] Working principle:
[0121] The incremental learning mechanism is a key technology for the system to adapt to new knowledge and new data. This mechanism allows the system to dynamically adjust model parameters according to new clinical data without retraining the entire model. In this way, the system can quickly adapt to new traditional Chinese medicine theories and clinical practices, and improve the accuracy and generalization ability of diagnosis.
[0122] Technical implementation:
[0123] Data preprocessing: Clean, annotate, and preprocess the new clinical data to extract useful features and information.
[0124] Model update: Use incremental learning algorithms (such as online learning, fine-tuning, etc.) to gradually integrate new data into the existing model. During the model update process, the system adjusts weights and parameters according to new data to optimize model performance.
[0125] Performance evaluation: Regularly evaluate the updated model to ensure that its performance on new data meets expectations. Evaluation metrics include accuracy, recall rate, and F1 score, etc.
[0126] Technical tools: Implement incremental learning algorithms using deep learning frameworks (such as PyTorch or TensorFlow), and combine automated machine learning tools (such as AutoML) to optimize the model update process.
[0127] Process description:
[0128] Let the current model be M, the new clinical data be D(new), and the updated model be M'. First, preprocess D(new) to generate training data D(train). Then, use the incremental learning algorithm to fine-tune M to obtain the updated model M': M' = IncrementalLearning[M, D(train)].
[0129] Through the dynamic knowledge graph module and the incremental learning mechanism, the present invention can not only update the traditional Chinese medicine knowledge base in real time, but also dynamically adjust the model parameters according to new clinical data, further improving the intelligence level and adaptability of the system.
[0130] Simulation of the dynamic inquiry thinking chain of traditional Chinese medicine based on the mixture of experts (MOE)
[0131] After in-depth study of the traditional Chinese medicine inquiry process, it is found that senior traditional Chinese medicine experts usually preset 1-2 subsequent inquiry questions based on the known conditions of the user and flexibly adjust them during the communication with the user. Inspired by this, in this embodiment, the dynamic inquiry thinking chain (CoT) of traditional Chinese medicine is innovatively integrated into the multi-Agent system to better simulate the actual inquiry process.
[0132] In this embodiment, a team consisting of traditional Chinese medicine experts in different specialties and general practice is constructed to meet the needs of different users. Each expert preferentially proposes 1-2 inquiry questions according to the user's situation and the key points of the department, rather than setting all questions at once. This way makes the inquiry process more refined and targeted. The thinking chain summary assistant integrates the thinking chains of different experts to form a comprehensive inquiry thinking chain.
[0133] To optimize the inquiry thinking chain constructed by the expert team, a thinking chain evaluation mechanism is introduced to score the comprehensiveness and pertinence of the questions to ensure the inquiry quality. During the scoring process, the traditional Chinese medicine "Ten Inquiry Songs" is used as the basis for scoring the comprehensiveness of the questions. The traditional Chinese medicine "Ten Inquiry Songs" is a classic framework widely used in traditional Chinese medicine inquiries, which helps experts evaluate the condition from multiple dimensions (such as cause, location, nature of the disease, etc.). By matching the questions in the "Ten Inquiry Songs" with the questions in the expert's thinking chain, the comprehensiveness of the questions is evaluated to ensure that the main aspects of the disease diagnosis are covered.
[0134] At the same time, the department's key concerns (TCM experts in different departments will focus on the characteristics of symptoms and key points of diagnosis and treatment related to the department based on their professional fields and clinical experience) and the user's existing medical information are used as the basis for targeted scoring. By calculating the similarity between the questions in the thinking chain and the "Ten Questions Song" and the department's key issues and the user's known medical conditions, the items with the highest matching degree are selected as the comprehensive and targeted scores respectively. Finally, the comprehensive score is the sum of the two. For specific methods, see the diagnostic COT scoring algorithm.
[0135] Based on the scoring results, the expert team will adjust and optimize the consultation thinking chain. Through this feedback mechanism, the TCM expert team ensures that the thinking chain is both comprehensive and can accurately diagnose the individual differences of users. Finally, when all experts agree that the consultation thinking chain is ready, the consultation experts will interact with the users. After each consultation, the expert team updates the consultation thinking chain based on the new condition information until it is considered that it is ready to enter the TCM dialectical stage.
[0136] Intelligent dynamic medical consultation information collection and termination algorithm
[0137] After generating the inquiry thinking chain, in order to achieve efficient dialogue with users, an "intelligent dynamic inquiry information collection and termination algorithm" is proposed. The algorithm automatically collects the key points in the inquiry thinking chain through a limited number of rounds of dialogue, and automatically terminates the dialogue based on this inquiry thinking chain when specific conditions are met. Based on the relevant knowledge of Chinese medicine consultation, the key points are divided into four categories: symptom information, medical history information, lifestyle information and other information, which helps to systematically extract key information. The algorithm input includes the maximum inquiry round, user input and inquiry thinking chain. Through these inputs, a set of key points is generated and the dialogue is promoted. Finally, the algorithm outputs a set of collected condition information points.
[0138] The core logic of the algorithm ensures that the conversation proceeds through an infinite loop until the termination condition is met. To ensure effective collection of diagnostic information, the algorithm maintains a set of disease information points and updates the set according to the progress of the conversation to determine whether to terminate the conversation. In addition, the algorithm defines two auxiliary algorithms: one for deriving the set of key points to be collected, and the other for updating the set of information points based on user input. The two auxiliary algorithms are completed by defining the Agent through prompt words.
[0139] Example 1: Diagnostic COT scoring algorithm:
[0140]
[0141] Example 2: The COT diagnosis process of general agent and specialist agent is as follows Figure 3 As shown; Example 3: "Intelligent dynamic medical consultation information collection and termination" algorithm:
[0142]
[0143] Through the above technical solution, this embodiment can achieve efficient and accurate traditional Chinese medicine (TCM) consultations, improve the quality of medical services, and provide users with more accurate and comprehensive TCM diagnosis services.
[0144] As Figure 1 shown, the multi-round dialogue TCM consultation system based on the Mixture of Experts (MOE) model in this embodiment mainly includes the following parts:
[0145] 1. Mixture of Experts (MOE) model construction module (101)
[0146] The Mixture of Experts (MOE) model construction module is responsible for initializing and configuring each expert module in the system. Each expert module has different functions and knowledge bases, including the general TCM expert module (102) and the specialist expert module (103). The general expert module is responsible for preliminary consultations and basic information collection, while the specialist expert module conducts in-depth consultations and specialist diagnoses based on the results of the preliminary consultations.
[0147] 2. Thought chain construction module (104)
[0148] The thought chain construction module constructs multiple possible diagnostic thought chains based on the patient's initial information and multi-round dialogue content. Each thought chain represents a possible diagnostic path and contains a series of consultation questions and reasoning processes. This module combines the knowledge base content provided by the dynamic knowledge graph module (111) to ensure the accuracy and comprehensiveness of the thought chains.
[0149] 3. Multi-round dialogue module (105)
[0150] The multi-round dialogue module gradually collects detailed patient information through multi-round dialogues with the patient. The dialogue content is processed by the large language model (106) to ensure the naturalness and accuracy of the language. This module also combines the knowledge base of the dynamic knowledge graph module (111) to adjust the consultation strategy in real time to ensure the coherence and logic of the consultation.
[0151] 4. Large language model (106)
[0152] The large language model is used to understand and generate natural language, supporting the interaction between the multi-round dialogue module and the patient. The model is pre-trained with TCM domain data and dynamically updated through the incremental learning module (112), enabling it to understand and generate dialogues that conform to TCM terms and logic.
[0153] 5. TCM rule base (107)
[0154] The traditional Chinese medicine rule base stores a large amount of traditional Chinese medicine diagnosis rules and knowledge for the thinking chain construction module and the multi-round dialogue module to call. The rule base includes aspects such as etiology, pathogenesis, syndrome types, and treatment methods. The dynamic knowledge graph module (111) updates the rule base regularly to ensure the timeliness and accuracy of knowledge.
[0155] 6. Thinking Chain Scoring Module (108)
[0156] Based on the large language model (106) and the traditional Chinese medicine rule base (107), the thinking chain scoring module scores multiple constructed thinking chains. The scoring basis includes the logic of the thinking chain, the matching degree with the patient information, the compliance with traditional Chinese medicine rules, etc. This module combines the knowledge base of the dynamic knowledge graph module (111) to further optimize the scoring results.
[0157] 7. Multi-round Dialogue Termination System (109)
[0158] The multi-round dialogue termination system automatically terminates the dialogue when enough information is collected and certain conditions are met. The termination conditions include but are not limited to: all necessary information of the patient has been collected, the score of a certain thinking chain reaches the preset threshold, etc. This system combines the knowledge base of the dynamic knowledge graph module (111) to dynamically adjust the termination conditions to ensure the accuracy and efficiency of the diagnosis.
[0159] 8. Diagnosis Output Module (110)
[0160] The diagnosis output module generates the final diagnosis result according to the thinking chain with the highest score and outputs it to the patient or doctor. This module combines the knowledge base of the dynamic knowledge graph module (111) to ensure the scientificity and authority of the diagnosis result.
[0161] 9. Dynamic Knowledge Graph Module (111)
[0162] The dynamic knowledge graph module is responsible for real-time updating of the traditional Chinese medicine knowledge base. Combining with the incremental learning module (112), it dynamically adjusts the content of the knowledge base according to new clinical data. This module extracts knowledge from new clinical data through natural language processing technology to update the knowledge graph, ensuring that the system can make diagnoses based on the latest traditional Chinese medicine theory and clinical practice.
[0163] 10. Incremental Learning Module (112)
[0164] The incremental learning module dynamically adjusts the model parameters according to new clinical data through incremental learning algorithms. This module combines the dynamic knowledge graph module (111) to regularly extract knowledge from new clinical data to update the large language model (106) and the traditional Chinese medicine rule base (107), further enhancing the generalization ability and adaptability of the system.
[0165] In this embodiment, the traditional Chinese medicine (TCM) diagnosis and treatment process is optimized through intelligent means, significantly improving the accuracy and efficiency of medical history taking. The system includes a hybrid expert model construction module for initializing the general TCM expert module and the specialist expert module. Each module is equipped with an independent knowledge base and decision-making model to meet different types of medical history taking needs. The general TCM expert module is responsible for preliminary medical history taking and basic information collection, while the specialist expert module conducts in-depth medical history taking and specialist diagnosis based on the results of the preliminary medical history taking.
[0166] The system also includes a thought chain construction module that generates multiple diagnostic thought chains based on multi-round conversations and patient information. Each thought chain records the medical history taking questions and the reasoning process to ensure the coherence and accuracy of medical history taking. The scoring module comprehensively scores the thought chains by combining large language models and the TCM rule base, and selects the optimal thought chain as the diagnostic basis. The multi-round conversation termination module automatically terminates the conversation and outputs the diagnostic result when the preset conditions are met.
[0167] In addition, the system introduces a dynamic knowledge graph module and an incremental learning mechanism to update the TCM knowledge base in real time and dynamically adjust the model parameters according to new clinical data, further enhancing the generalization ability and adaptability of the system. The present invention not only overcomes the limitations of traditional medical history taking methods but also optimizes the TCM diagnosis and treatment process through intelligent means, having significant application value and broad development prospects.
[0168] As Figure 2 shown, the specific operation steps of the system in this embodiment are as follows:
[0169] 1. System initialization: The hybrid expert model (MOE) construction module (101) initializes the general TCM expert module (102) and the specialist expert module (103), and loads the large language model (106), the TCM rule base (107), and the dynamic knowledge graph module (111).
[0170] 2. Preliminary medical history taking: The general TCM expert module (102) conducts preliminary medical history taking with the patient through the multi-round conversation module (105) to collect basic information such as symptoms and medical history.
[0171] 3. Thought chain construction: The thought chain construction module (104) constructs multiple possible diagnostic thought chains based on the preliminary medical history taking information and in combination with the knowledge base of the dynamic knowledge graph module (111).
[0172] 4. In-depth medical history taking: The specialist expert module (103) conducts in-depth medical history taking through the multi-round conversation module (105) according to the content of the thought chain to further collect detailed information. The multi-round conversation module (105) adjusts the medical history taking strategy in real time in combination with the knowledge base of the dynamic knowledge graph module (111).
[0173] 5. Thought Chain Scoring: The thought chain scoring module (108) scores each thought chain, evaluates its logic, matching degree with patient information, and compliance with traditional Chinese medicine rules, and further optimizes the scoring results in combination with the knowledge base of the dynamic knowledge graph module (111).
[0174] 6. Dialogue Termination: The multi-round dialogue termination system (109) automatically terminates the dialogue when the termination conditions are met. The conditions include that the necessary patient information has been collected or the score of a certain thought chain reaches the preset threshold, etc. This system dynamically adjusts the termination conditions in combination with the knowledge base of the dynamic knowledge graph module (111).
[0175] 7. Diagnosis Output: The diagnosis output module (110) generates the final diagnosis result according to the thought chain with the highest score and outputs it to the patient or doctor. This module combines the knowledge base of the dynamic knowledge graph module (111) to ensure the scientificity and authority of the diagnosis result.
[0176] 8. Knowledge Update: The dynamic knowledge graph module (111) and the incremental learning module (112) dynamically update the knowledge base and model parameters according to new clinical data to improve the generalization ability and adaptability of the system.
[0177] Through the detailed description of the above embodiments, those skilled in the art can clearly understand and implement the multi-agent thought chain multi-round dialogue traditional Chinese medicine interrogation system of the present invention. Through the collaborative work of multi-agents, the system combines the large language model and traditional Chinese medicine rules to achieve an efficient and accurate traditional Chinese medicine interrogation process.
[0178] On the basis of the above technical solutions, this embodiment further optimizes the performance and user experience of the system.
[0179] Embodiment 2: Single-Agent Multi-Round Dialogue Traditional Chinese Medicine Interrogation System Based on Hybrid Expert Model
[0180] This embodiment proposes a single-agent multi-round dialogue traditional Chinese medicine interrogation system based on a hybrid expert model. The system realizes an efficient and accurate traditional Chinese medicine interrogation process by constructing a hybrid expert model and using the thought chain technology. Its specific structure and working principle are as follows:
[0181] System Structure
[0182] The system includes the following modules: hybrid expert model construction module, thought chain construction module, thought chain scoring module, dialogue termination module, output module, and optimization module.
[0183] 1. Hybrid Expert Model Construction Module: Used to construct a hybrid expert model, which consists of a general traditional Chinese medicine expert unit and a specialist expert unit. The general traditional Chinese medicine expert unit is responsible for preliminary interrogation and basic information collection; the specialist expert unit conducts in-depth interrogation and specialist diagnosis according to the preliminary interrogation results of the general expert unit.
[0184] 2. Thought Chain Construction Module: Conduct multiple rounds of conversations with the user based on the mixture of experts model, and construct multiple thought chains according to the content of the multiple rounds of conversations. The thought chains include inquiry questions and reasoning processes. This module includes a multiple-round conversation unit, an information collection unit, and a construction unit. The multiple-round conversation unit controls the rhythm and direction of the conversation through preset conversation templates and dynamic adjustment strategies; the information collection unit collects the user's symptoms and medical history information in real time during the conversation, and uses natural language processing methods to extract and structure the user's answers; the construction unit constructs multiple thought chains based on the collected information.
[0185] 3. Thought Chain Scoring Module: Score the multiple constructed thought chains. Adopt the scoring results of the comprehensive large language model processing unit and the traditional Chinese medicine rule processing unit, conduct a comprehensive score through the weighted average method, and select the optimal thought chain as the diagnosis basis. The scoring basis includes the logic of the thought chain, the matching degree with the user information, traditional Chinese medicine rules, etc.
[0186] 4. Conversation Termination Module: Terminate the conversation of the thought chain construction module based on the termination conditions, and obtain the thought chain with the highest score. The termination conditions include that all necessary information of the user has been collected, the score of a certain thought chain reaches the preset threshold, etc.
[0187] 5. Output Module: Output the thought chain with the highest score to the user or doctor.
[0188] 6. Optimization Module: Optimize the inquiry system according to user feedback. It includes a user feedback and optimization unit and a dynamic knowledge graph and incremental learning unit. The user feedback and optimization unit collects the user's feedback on the diagnosis results, and the feedback information is used to adjust the parameters of the traditional Chinese medicine rule processing unit and the large language model processing unit; the dynamic knowledge graph and incremental learning unit updates the traditional Chinese medicine knowledge base in real time, combines the incremental learning mechanism, dynamically adjusts the content of the traditional Chinese medicine knowledge base according to new clinical data, and adjusts the large language model parameters, and can query and reason about traditional Chinese medicine knowledge in real time to provide comprehensive knowledge support for the inquiry.
[0189] Working Principle
[0190] 1. System Initialization: The mixture of experts model construction module initializes the general traditional Chinese medicine expert unit and the specialist expert unit, and loads the large language model, the traditional Chinese medicine rule base, and the dynamic knowledge graph module.
[0191] 2. Preliminary Inquiry: The general traditional Chinese medicine expert unit conducts a preliminary inquiry with the user through the multiple-round conversation module, and collects the user's basic information, such as symptoms, medical history, etc.
[0192] 3. Thought Chain Construction: The thought chain construction module constructs multiple possible diagnostic thought chains based on the preliminary inquiry information and combines the knowledge base of the dynamic knowledge graph module.
[0193] 4. In-depth inquiry: Based on the content of the thought chain, the specialist expert unit conducts in-depth inquiries through the multi-round dialogue module to further collect detailed information from the user. The multi-round dialogue module combines the knowledge base of the dynamic knowledge graph module to adjust the inquiry strategy in real time.
[0194] 5. Thought chain scoring: The thought chain scoring module scores each thought chain, evaluates its logic, matching degree with user information, and compliance with traditional Chinese medicine rules, and further optimizes the scoring results in combination with the knowledge base of the dynamic knowledge graph module.
[0195] 6. Dialogue termination: The dialogue termination module automatically terminates the dialogue when the termination conditions are met. The conditions include the completion of collecting necessary user information or the score of a certain thought chain reaching the preset threshold, etc. This module dynamically adjusts the termination conditions in combination with the knowledge base of the dynamic knowledge graph module.
[0196] 7. Diagnostic output: The output module generates the final diagnostic result based on the thought chain with the highest score and outputs it to the user or doctor. This module combines the knowledge base of the dynamic knowledge graph module to ensure the scientificity and authority of the diagnostic result.
[0197] 8. Knowledge update: The dynamic knowledge graph module and the incremental learning module dynamically update the knowledge base and model parameters according to new clinical data, improving the generalization ability and adaptability of the system.
[0198] System optimization
[0199] 1. Enhanced large language model: The large language model is trained with more data in the field of traditional Chinese medicine, further enhancing its ability to understand traditional Chinese medicine terms and logic. At the same time, combined with the incremental learning module, the model can dynamically update parameters according to new clinical data, continuously optimizing the naturalness and accuracy of the dialogue.
[0200] 2. Dynamically adjust the thought chain: The thought chain construction module adds a dynamic adjustment function, which can dynamically adjust the content and order of the thought chain according to the user's real-time feedback and the knowledge support of the dynamic knowledge graph module. This optimization improves the flexibility and adaptability of the inquiry path, ensuring that the system can dynamically optimize the inquiry strategy according to the latest knowledge base content and the user's condition changes.
[0201] 3. Optimize the scoring mechanism: The thought chain scoring module introduces more scoring dimensions. In addition to the original logic, matching degree, and compliance with traditional Chinese medicine rules, it also adds indicators such as the patient's feedback satisfaction and the coherence of the inquiry process. By combining the knowledge base of the dynamic knowledge graph module, the scoring module can more comprehensively and accurately evaluate the rationality of each thought chain, providing a more reliable basis for the diagnostic output module and further enhancing the scientificity and authority of the diagnosis.
[0202] 4. Enhanced Dynamic Knowledge Graph and Incremental Learning: The dynamic knowledge graph module updates the traditional Chinese medicine knowledge base in real time through natural language processing technology, and dynamically adjusts the content of the knowledge graph in combination with new clinical data. The incremental learning module dynamically adjusts the model parameters according to the new clinical data to ensure that the large language model and the traditional Chinese medicine rule base can timely reflect the latest traditional Chinese medicine theories and clinical practices. This dynamic update mechanism improves the generalization ability and adaptability of the system, ensuring that the system always maintains efficient and accurate diagnostic capabilities when facing complex and changing traditional Chinese medicine consultation requirements. The optimized system architecture is as Figure 4 shown.
[0203] Through the above optimizations, this embodiment has made significant improvements in terms of language model performance, thought chain flexibility, comprehensiveness of the scoring mechanism, and dynamic knowledge graph and incremental learning capabilities, making the system more efficient and accurate in traditional Chinese medicine consultations and providing users with better medical services.
[0204] The embodiments described above are only descriptions of the preferred embodiments of the present invention, and do not limit the scope of the present invention. Without departing from the design spirit of the present invention, various deformations and improvements made by those of ordinary skill in the art to the technical solutions of the present invention shall fall within the protection scope determined by the claims of the present invention.
Claims
1. A multi-agent thinking-chain multi-round dialogue traditional Chinese medicine consultation system, characterized in that Including: A mixture of expert model construction module, a chain of thought construction module, a chain of thought scoring module, a dialogue termination module, an output module, and an optimization module; The mixture of expert model construction module is used to construct a mixture of expert models for traditional Chinese medicine consultation of users; The chain of thought construction module is used to conduct multiple rounds of conversations with users based on the mixture of expert models, and construct multiple chains of thought based on the content of the multiple rounds of conversations; among them, the chain of thought includes: consultation questions and reasoning processes; The chain of thought scoring module is used to score the multiple constructed chains of thought; The dialogue termination module is used to terminate the conversation of the chain of thought construction module based on termination conditions, and obtain the chain of thought with the highest score; The output module is used to output the chain of thought with the highest score to the user or doctor; The optimization module is used to optimize the consultation system according to user feedback.
2. The multi-agent thinking chain multi-round dialogue traditional Chinese medicine consultation system according to claim 1, wherein, The mixture of expert model construction module includes: a general practitioner of traditional Chinese medicine expert unit and a specialist expert unit; The general practitioner of traditional Chinese medicine expert unit is responsible for preliminary consultation and basic information collection; The specialist expert unit is used to conduct in-depth consultation and specialist diagnosis based on the preliminary consultation results of the general practitioner of traditional Chinese medicine expert unit.
3. The multi-agent thinking chain multi-round dialogue traditional Chinese medicine interrogation system according to claim 1, characterized in that, The chain of thought construction module includes: a multiple-round dialogue unit, an information collection unit, and a construction unit; The multiple-round dialogue unit is used to conduct multiple rounds of conversations with users based on the mixture of expert models, and control the rhythm and direction of the conversation through a preset dialogue template and dynamic adjustment strategy; The information collection unit is used to collect the symptoms and medical history information of users in real time during the conversation process; adopt natural language processing methods to extract and structure the answers of users; The construction unit is used to construct multiple chains of thought based on the information collected by the information collection unit.
4. The multi-agent thinking-chain multi-round dialogue traditional Chinese medicine consultation system according to claim 3, wherein, The chain of thought scoring module adopts the scoring results of a comprehensive large language model processing unit and a traditional Chinese medicine rule processing unit, and uses the weighted average method for comprehensive scoring, and selects the optimal chain of thought as the diagnosis basis; among them, the scoring basis includes: the logic of the chain of thought, the matching degree with user information, and traditional Chinese medicine rules.
5. The multi-agent thinking chain multi-round dialogue traditional Chinese medicine consultation system according to claim 4, characterized in that, The large language model processing unit adopts a multi-task learning strategy to simultaneously optimize multiple tasks such as consultation, diagnosis, and treatment recommendation, and improve the generalization ability of the model in different tasks; during the training process of the large language model, multi-dimensional traditional Chinese medicine data is introduced to ensure that the model can comprehensively understand and process complex problems in traditional Chinese medicine consultation.
6. The multi-agent thinking chain multi-round dialogue traditional Chinese medicine consultation system according to claim 4, wherein, A traditional Chinese medicine knowledge base is set in the traditional Chinese medicine rule processing unit, and the traditional Chinese medicine knowledge base is used to store traditional Chinese medicine diagnosis rules and knowledge for the chain of thought construction module and the chain of thought scoring module to call; the traditional Chinese medicine knowledge base includes etiology, pathogenesis, syndrome types, and treatment methods.
7. The multi-agent thought-chain multi-round dialogue traditional Chinese medicine consultation system according to claim 1, wherein The termination conditions in the dialogue termination module include: all necessary information of the user has been collected, and the score of a certain chain of thought reaches a preset threshold.
8. The multi-agent thinking-chain multi-round dialogue traditional Chinese medicine interrogation system according to claim 4, wherein The optimization module includes: a user feedback and optimization unit and a dynamic knowledge graph and incremental learning unit; The user feedback and optimization unit is used to collect the feedback of users on the diagnosis results, and the feedback information is used to adjust the parameters of the traditional Chinese medicine rule processing unit and the large language model processing unit; The dynamic knowledge graph and incremental learning unit are used to update the traditional Chinese medicine knowledge base in real time. Combining the incremental learning mechanism, it dynamically adjusts the content of the traditional Chinese medicine knowledge base according to new clinical data and adjusts the parameters of the large language model. The dynamic knowledge graph and incremental learning unit can query and reason about traditional Chinese medicine knowledge in real time, providing comprehensive knowledge support for medical inquiries.
Citation Information
Cited By
Multi-round dialogue sample data generation method, device, equipment and product
CN120541528A