An automatic diagnosis method for adaptive multi-agent cooperation for explainability
By employing a multi-agent cooperation framework and a symptom-disease bidirectional probabilistic network, the interpretability and query efficiency issues of the automatic diagnosis model are resolved, enabling an efficient and transparent medical diagnosis process and improving diagnostic accuracy.
Patent Information
- Application Number
- CN202411507596.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-28
- Publication Date
- 2025-12-26
- Estimated Expiration
- 2044-10-28
AI Technical Summary
Existing automated disease diagnosis models lack interpretability and are inefficient at asking for symptoms, resulting in an opaque and inefficient diagnostic process.
A multi-agent collaborative framework is adopted, including a pre-diagnosis module, a Doctor Agent module, and a Med-Team Agents module. It utilizes a symptom-disease bidirectional probability network and a large discriminative model to simulate single-department and multi-department expert diagnosis scenarios and designs a consultation strategy to improve interpretability and diagnostic efficiency.
It significantly improves the efficiency and accuracy of automated medical diagnosis, provides a transparent diagnostic process, and enhances the trust of patients and doctors.
Smart Images

Figure CN119418907B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the cross field of artificial intelligence science and medicine, and specifically relates to the field of automatic diagnosis, and more specifically, the present application provides an automatic diagnosis method for explainable self-adaptive multi-agent cooperation. BACKGROUND
[0002] Automatic disease diagnosis is both critical and complex in the medical field, and is an important bridge connecting medical professional knowledge and clinical decision-making. Diagnosis tasks usually rely on the patient's chief complaint and the doctor's subsequent inquiry of additional symptoms to predict possible diseases. Doctors should make as accurate a diagnosis as possible within the appropriate number of inquiries to balance efficiency and accuracy.
[0003] Currently, automatic disease diagnosis mainly relies on reinforcement learning (RL) technology. Early pioneering research introduced a symptom examination method based on reinforcement learning. With the advancement of technology, further research has proposed hierarchical reinforcement learning for diagnosis and situational decision-making, using deep Q networks to extract symptom information from patient interactions, and exploring the integration of medical knowledge into the RL strategy learning framework. The development of these technologies, such as two-level hierarchical reinforcement learning, strategy gradient method combined with generative adversarial networks, and RL model optimized through multi-level reward mechanism and dialogue data, has significantly improved the accuracy of diagnosis. However, most of these models are "black boxes" and lack explainability. In the medical field, the transparency of the diagnosis process is crucial to gaining the trust of patients and doctors, so the explainability of such technology has become a pressing problem.
[0004] Large language models (LLM) have shown great potential in the field of automated diagnosis with their strong reasoning and dialogue capabilities combined with extensive knowledge reserves. These models can handle a wide range of diseases and interact efficiently with patients. However, existing research shows that although LLMs have excellent language understanding and reasoning capabilities, they perform poorly when asking about key symptoms related to diseases. How to design a reasonable inquiry strategy to improve the accuracy of diagnosis is still a challenging problem.
[0005] In summary, there is an urgent need to design an efficient medical automatic diagnosis method for explainability to solve the above problems. SUMMARY
[0006] Therefore, the application provides an automatic diagnosis method for adaptive multi-agent cooperation for explainability. First, to solve the problem of lack of explainability of traditional "black box" models, the application models real single department expert diagnosis and multi-department expert consultation from a real diagnosis scene, and proposes a multi-agent cooperation diagnosis framework. Each step of the system has a clear function, and each component can be explained separately. The whole system simulates real diagnosis and can convert the black box decision of diagnosis into an explainable chain. Second, to solve the problem of insufficient efficiency of asking symptoms at the present stage of large models, the application proposes a question diagnosis strategy based on a symptom-disease bidirectional probability network prompt, and a discriminative large model is used for routing to distinguish single expert diagnosis and multi-expert consultation, so as to realize the high efficiency of "asking" and the high accuracy of "diagnosis".
[0007] The application comprises a pre-diagnosis module, a Doctor Agent module and a Med-Team Agents module. The pre-diagnosis module constructs a one-way probability network from symptoms to diseases, calculates the disease weight by comparing the patient's dominant symptoms with known diseases, and judges to enter the Doctor Agent module or the Med-Team Agents module according to the result by a discriminative large model. The Doctor Agent module simulates a single expert diagnosis scene, can combine a medical knowledge base and a bidirectional probability network, and according to a strategy, calls an external knowledge base and a predefined tool to judge whether to make a diagnosis based on the symptoms shown by the patient or to further ask related symptoms to assist in diagnosis. The Med-Team Agents module simulates a consultation scene of multiple disease experts, and constructs a Manager Agent and multiple Disease Agents, which simulate the attending physician and multiple disease experts respectively. The Manager Agent dynamically manages multiple Disease Agents, decides to use which Disease Agent to generate related symptoms according to the patient's symptom information, and finally makes a diagnosis.
[0008] Specifically, the application constructs a directed probability matrix M D-S from diseases to symptoms and a matrix M S-D from symptoms to diseases. Let D=[d1,d2,...,d m ] represent the disease set, and m represent the number of diseases in the disease set; let S=[s1,s2,...,s n ] represent the symptom set, and n represent the number of symptoms in the symptom set. In the automatic diagnosis scene, each patient has only one disease, so the state of the disease is only existence or non-existence. According to the distribution of the data set, the probability of suffering from each disease is calculated, and the probability P(s j |d i ) of the s j th symptom under the assumption that the patient suffers from the specific disease d i is calculated. ij |d i ), construct a disease-to-symptom matrix M D-S :
[0009]
[0010] where M S-D ∈R m×n . In addition, given the symptom state information, the conditional probability of each disease can be obtained as follows:
[0011]
[0012] where
[0013] P(s j )=∑ d∈D P(s j |d i )*P(d i ),
[0014] P(d i |s j ) represents the probability of having disease d j when the patient has s i symptoms, and a symptom-to-disease matrix M S-D is constructed:
[0015]
[0016] where M S-D ∈R n×m .
[0017] In the pre-diagnosis module, a symptom extraction prompt is designed to guide the LLM to extract the patient's symptom information from the patient's natural language statement, and represent it as an n-dimensional vector S o . If the element value in S o is 1, it represents the presence of the symptom; 0 indicates that the symptom is unknown; -1 indicates that the symptom is denied. Subsequently, based on M S-D , the weight list D p of the disease is obtained in the form of a product matrix:
[0018] D p =S o ×M S-D ,
[0019] where D pis a m-dimensional vector, where the value of each element represents the weight of each disease, and the higher the weight, the more similar the patient's symptoms are to the disease. In addition, to achieve an adaptive medical decision framework, a discriminative LLM is designed to determine the complexity of medical diagnosis as a general practitioner. The discriminative LLM acts as a classifier, obtaining information on how to define the complexity of the patient's symptoms, and classifying the patient's subsequent diagnosis into single-specialist diagnosis or multi-specialist consultation according to the complexity.
[0020] The Doctor Agent module simulates a single attending physician consultation scenario with a simple clinical decision path. For a given patient's inquiry record, the Doctor Agent observes the patient's manifested symptoms and, based on the tool call results, makes the following decisions: continue to ask the patient about symptoms and repeat the process, or directly diagnose a certain disease:
[0021] A next = Doctor_Agent(prompt, historytool),
[0022] where A next represents a symptom or a disease, which is autonomously determined by the Doctor Agent based on the prompt and history. Specifically, in the present invention, the LLM is assigned the role of a specialist doctor and combined with an external medical knowledge base to enhance its medical expertise, thereby transforming it into a Doctor Agent. In addition, a M S-D tool1 is used to obtain disease weight ranking, and a M D-S tool2 is used to obtain a list of related symptoms to assist the model in making more accurate symptom selection. In a patient consultation, the Doctor Agent first calls tool1 to obtain disease weight ranking ranked_diseases based on the patient's manifested symptoms, and decides whether a diagnosis can be made based on the disease weight results. If a diagnosis can be made, the consultation ends; otherwise, tool2 is called to obtain the symptom ranking corresponding to the highest weight disease, and the top 20% symptom list symptom_list is returned:
[0023] symptom_list = Top 20% (tool2(Max(ranked_diseases))),
[0024] Doctor Agent can combine its own knowledge and external medical knowledge base to make the best symptom selection, and rewrite the selected symptoms into user-friendly natural language for inquiry, send them to the patient, and wait for the reply. Doctor Agent simulates a single consultation with a specialist, and mainly has the following three capabilities. First, it has the ability to ask and answer, and can ask patients about the retrieved professional symptoms in popular natural language; second, it has the ability to use tools, and can use the symptom-disease bidirectional probability network and external medical knowledge base, which helps to reduce model hallucination and provide certain interpretability; third, it has the ability to make autonomous decisions, and Doctor Agent constantly thinks whether to diagnose the patient or further inquire new symptoms to improve the confidence of diagnosis during the entire consultation process.
[0025] Med-Team Agents module can generate comprehensive and detailed solutions when dealing with more complex consultation scenarios, utilize the collective wisdom of professionals from different disciplines, integrate insights from different specialties, overcome the limitations of single-field range consultation, and achieve accurate diagnosis. Specifically, in Med-Team Agents, a Manager Agent is designed to assume the role of the attending physician, and multiple Disease Agents are designed as disease experts. These Agents share a message queue for storing patient consultation records:
[0026] A next = Med-Team Agents (prompt, memory, Manager Agent, Disease Agents), where Disease Agents can call external knowledge base to enhance their professional ability in this field, and can respond to the call of Manager Agent to return suspected symptoms according to historical diagnosis information. Manager Agent has some functions similar to Doctor Agent, and a M S-D Get disease weight ranking tool1, Manager Agent uses tool1 to get disease weight ranking ranked_diseases according to the patient's symptoms, and decides whether a diagnosis can be made according to the disease weight result. If a diagnosis can be made, the consultation ends; otherwise, Manager Agent should communicate with other Disease Agents to get symptom inquiry suggestions. Specifically, Manager Agent can compare the ranked_diseases of the current round k with the ranked_diseases of the historical round k-1, get the weight value to obtain the increased_diseases list, and get the related symptoms from the corresponding Disease Agents, and ask the intersection symptoms with the highest probability to obtain the feedback of the patient.
[0027] The present application is suitable for various automatic diagnosis tasks, and the positive effects of using the present application are:
[0028] The present application is directed to the field of medical automatic diagnosis, and proposes a novel diagnosis method for explainable multi-agent cooperation, which solves the problem of lack of explainability of traditional "black box" models. In addition, the method effectively simulates the real scene of single department expert diagnosis and multi-department expert consultation, and based on the strategy of symptom-disease bidirectional probability network prompt, can significantly improve the efficiency and accuracy of medical automatic diagnosis. BRIEF DESCRIPTION OF DRAWINGS
[0029] Figure 1 is a principle schematic diagram of the automatic diagnosis method for explainable adaptive multi-agent cooperation of the present application;
[0030] Figure 2 is a flow schematic diagram of the automatic diagnosis method for explainable adaptive multi-agent cooperation of the present application DETAILED DESCRIPTION
[0031] In order to enable the personnel in the technical field to better understand the present application scheme, and to make the above-mentioned purposes, technical solutions and advantages of the present application more obvious and easy to understand, the present application will be further described in detail below in combination with the embodiments and the embodiment drawings.
[0032] Please see Figure 1 , Figure 1The principle schematic diagram of the automatic diagnosis method of the adaptive multi-agent cooperation for explainability is shown. The application is composed of a pre-diagnosis module, a Doctor Agent module and a Med-Team Agents module. The pre-diagnosis module constructs a directed probability network from symptoms to diseases, calculates the disease weight by comparing the patient's dominant symptoms with known diseases, and judges to enter the Doctor Agent module or the Med-Team Agents module according to the result by a discriminant model. The Doctor Agent module simulates a single expert diagnosis scene, can combine a medical knowledge base and a bidirectional probability network, and according to a strategy, calls an external knowledge base and a predefined tool to judge whether to make a diagnosis or further inquire related symptoms to assist in diagnosis based on the symptoms that have appeared in the patient. The Med-Team Agents module simulates a consultation scene of multiple disease specialists, and constructs a Manager Agent and multiple Disease Agents, which simulate the attending physician and multiple disease specialists respectively. The Manager Agent dynamically manages multiple Disease Agents, decides to use which Disease Agent to generate related symptoms according to the patient's symptom information, and finally makes a diagnosis.
[0033] Please refer to Figure 2 , Figure 2 is a flowchart of the automatic diagnosis method of the adaptive multi-agent cooperation for explainability on the light consultation task, and the specific steps include:
[0034] S1, constructing a bidirectional probability matrix of symptoms and diseases based on a light consultation data set; use D=[d1, d2,..., dm] to represent the disease set, where m is the number of diseases in the disease set; use S=[s1, s2,..., sn] to represent the symptom set, where n represents the number of symptoms in the symptom set; according to the distribution of the data set, the probability of suffering from each disease can be obtained m n and the probability P(s j |d i ) of the symptom s j under the assumption that the patient suffers from the disease d i ; thus, the disease-to-symptom matrix can be constructed as follows:
[0035]
[0036] where M S-D ∈R m×n ; in addition, the conditional probability of each disease under the given symptom state information can be obtained as follows:
[0037]
[0038] where
[0039] P(s j )=∑ d∈D P(s j |d i )*P(d i ),
[0040] P(d i |s j ) represents the probability of having disease d i when having symptoms s j , a matrix M S-D is constructed from symptoms to diseases:
[0041]
[0042] where M S-D ∈R n×m ;
[0043] S2, in the pre-diagnosis stage, the patient's symptoms are obtained and the symptom pool is updated, and then a disease weight list is generated based on the known symptoms, and a large model is used to route according to the disease weight list, and to distinguish between single-specialist diagnosis and multi-specialist consultation;
[0044] S21, a pre-designed prompt template is used to guide the LLM to accurately extract symptom entities from the patient's complaint, and then represent them as an n-dimensional vector S o , where if the element value in S o is 1, it represents the existence of the symptom, 0 represents unknown symptoms, and -1 represents denial of the symptom;
[0045] The specific content of the prompt is as follows:
[0046] "Currently you are an outstanding artificial intelligence medical expert. Your task is to extract key symptom information from the content described by the patient, and the extraction should comply with the following regulations:
[0047] 1) Please extract key symptom information useful for diagnosis and treatment;
[0048] 2) Please fill in the "{}" part in the following format
[0049] {'symptom 1': 'exists','symptom 2': 'does not exist'}
[0050] 3) The output can be loaded by the json.loads() function of python
[0051] ## Output:
[0052] {} ";
[0053] S22, utilize the constructed symptom-disease probability network M S-D Calculate the disease weight list corresponding to the patient's symptoms; then based on MS-D, use the product matrix method to obtain the weight value of each disease:
[0054] D p =S o ×M S-D ,
[0055] where D p is an m-dimensional vector, and the element value represents the weight value corresponding to each disease. The higher the weight value, the more similar the patient's symptom performance to the disease;
[0056] S23, design prompt to guide LLM to analyze the patient's disease complexity, and classify the patient's subsequent diagnosis into single expert diagnosis or multi-expert consultation.
[0057] The specific content of the prompt is as follows:
[0058] "Currently you are an outstanding artificial intelligence medical expert. Your task is to analyze the patient's disease complexity from the disease weight list and judge whether to adopt single expert diagnosis or multi-expert diagnosis scheme, and the judgment shall comply with the following provisions:
[0059] 1) If the weight value of a certain disease is outstanding, the complexity is low, and if there is more than one disease with high weight value, the patient's condition is more complex;
[0060] 2) For patients with complex conditions, multi-expert consultation should be adopted, and for patients with relatively simple conditions, single expert should be adopted to improve efficiency;
[0061] 3) Please choose one from [single expert, multi-expert] as your output.
[0062] ## The following is the disease weight that needs to be judged:
[0063] Disease weight: {disease_list}
[0064] Output: ";
[0065] S3, use single agent (Doctor Agent) to further inquire and confirm symptoms. Through prompt guidance, the agent observes the patient's known symptoms, and then makes a decision with the help of tools: continue to ask the patient about related symptoms and cycle the process; or diagnose a certain disease when the conditions are met, and terminate the cycle;
[0066] The specific content of the prompt for DoctorAgent is as follows:
[0067] "You are a medical expert, your name is Doctor. Your task is to call tools to retrieve and ask patients whether they have other symptoms based on the known symptoms provided by the patient, only one symptom per round.
[0068] ##The specific process includes:
[0069] Step 1: Accept the patient's symptoms and add them to the symptom dictionary. Symptoms are key-value pairs of two strings, such as 'egg flower-like stool': 'unknown'.
[0070] Step 2: Use tool tool1 to retrieve possible diseases and their weights based on the patient's symptom dictionary.
[0071] Step 3: Use tool tool2 to retrieve several symptoms and select one from them.
[0072] Step 4: Ask the patient if they have the symptom, referring to the question format: Do you have XX symptom?
[0073] ##Note:
[0074] 1. You need to strictly follow the above process in sequence until you think you can diagnose a certain disease for the patient, referring to the diagnosis format: You may have XX disease.
[0075] 2. Only ask the patient one symptom at a time, and do not reveal the disease when asking the symptom.
[0076] 3. There are three types of symptoms: "unknown", "true", "false". Do not interpret "unknown" as "false" or "false".
[0077] 4. There are three situations for the patient's answer: true, false, unknown. If the patient answers "true", it means the patient has the symptom; if the answer is "false", it means the patient does not have the symptom; if the answer is "unknown", it means the patient does not know whether they have the symptom.
[0078] S31, assign a specialist role to LLM and combine external medical knowledge base to enhance LLM's medical professional ability, making it a Doctor Agent, and bind a M S-D tool1 to get the disease weight ranking and a M D-S tool2 to get the related symptom list;
[0079] The specific content of Agent Tool is defined as follows:
[0080] 1. Agent tool tool1 definition content
[0081] "Retrieve several diseases and probabilities by known symptoms"
[0082] 2. Agent tool tool2 definition content
[0083] "Retrieve several unmanifested symptoms for model selection by known symptoms and a specified disease"
[0084] S32, Doctor Agent obtains patient symptoms and is prompted to call tool1 from the tool pool to obtain disease weight ranking ranked_diseases based on manifested symptoms;
[0085] S33, Doctor Agent makes a decision based on disease weight results, whether a final diagnosis can be made, if a diagnosis can be made, exit the inquiry; otherwise, call tool2 to obtain the symptom ranking corresponding to the highest weight disease and return the top 20% symptom list symptom_list as the tool call result;
[0086] symptom_list = Top 20% (tool2(Max(ranked_diseases)))
[0087] S34, Doctor Agent makes the best symptom selection based on its own knowledge plus external medical knowledge base supplement, and rewrites the selected symptoms into user-friendly natural language questions and sends them to the patient, waiting for the patient's reply.
[0088] S4, use multi-agent (Med-Team Agents) to handle complex inquiry scenarios. In this mode, ManagerAgent is responsible for managing the calling of multiple Disease Agent, and according to the returned results and the patient's known symptom information, executing symptom inquiry or diagnosis.
[0089] The specific content of prompt is as follows:
[0090] 1. Manager Agent prompt:
[0091] "Your identity is a primary physician, your task is to call tools to obtain disease weight list according to the known symptoms provided by the patient, and judge whether the patient can be diagnosed, during which you can combine other disease specialist experts to obtain accurate symptom information to ask the patient.
[0092] ## The specific process includes:
[0093] First step: Accept the patient's symptoms and add them to the symptom dictionary. Symptoms are key-value pairs of two strings, such as 'egg flower-like stool': 'unknown'.
[0094] Second step: Use tool1 to retrieve possible diseases and their weights based on the patient's symptom dictionary.
[0095] Third step: Extract the weight to get the list of diseases and communicate with the relevant disease expert to get the corresponding symptom list.
[0096] Fourth step: Select a symptom from the intersection of the symptom lists corresponding to each disease and ask the patient, using the format: Do you have XX symptom?
[0097] ## Note:
[0098] You can communicate with disease experts [pneumonia specialist, pediatric hand-foot-mouth disease specialist, allergic rhinitis specialist, pediatric diarrhea specialist, upper respiratory tract infection specialist]
[0099] 2. You need to strictly follow the above process in sequence until you think you can diagnose a certain disease for the patient, refer to the diagnosis format: You may have XX disease.
[0100] 3. Only ask the patient one symptom at a time, and do not reveal the disease when asking the symptom.
[0101] 4. There are three types of symptoms: "unknown", "true", "false", and it is prohibited to understand the patient's reply "unknown" as False or "false".
[0102] 5. There are three situations for the patient's answer: true, false, unknown. If the patient answers "true", it means the patient has the symptom; if the answer is "false", it means the patient does not have the symptom; if the answer is "unknown", it means the patient does not know whether they have the symptom.
[0103] 2. Disease Agent prompt:
[0104] "You are a professional pneumonia specialist, your task is to respond to the Manager Agent's call, and based on the known dialogue record, call the tool to retrieve other pneumonia symptoms."
[0105] S41, assign a primary physician role to LLM and bind a M S-DThe tool1 obtaining the disease weight ranking becomes a Manager Agent. All Disease Agents corresponding to the diseases are initialized, the medical professional ability of the Agent is increased in combination with an external medical knowledge base, and the M D-S The tool2 obtaining the related symptom list;
[0106] The specific content defined by the Agent Tool is as follows:
[0107] 1. The content defined by the Agent tool1
[0108] "Through the known symptoms, several diseases and probabilities are retrieved"
[0109] 2. The content defined by the Agent tool2
[0110] "Through the known symptoms and a specified disease, several other symptoms not shown are retrieved for model selection."
[0111] S42, the Manager Agent obtains the patient's symptoms and is prompted to call the tool1 from the tool pool to obtain the disease weight ranking ranked_diseases according to the symptoms shown;
[0112] S43, the Manager Agent compares the ranked_diseases of the current round k with the ranked_diseases of the previous round in history k-1 , obtains the disease list increased_diseases with improved weights;
[0113] S44, the Manager Agent inquires the Disease Agent corresponding to the disease in the increased_diseases, the Disease Agent calls the tool2 to obtain the symptom list symptom_list sorted by probability, and selects the symptoms from the symptom_list as a response based on the knowledge of the Disease Agent and the external medical knowledge base;
[0114] S45, the Manager Agent obtains the related symptoms from the corresponding Disease Agents, and inquires the patient about the symptoms with the highest probability in the intersection.
[0115] In the foregoing, the specific embodiments of the present application are described with reference to the accompanying drawings. However, those skilled in the art can understand that various changes and replacements can be made to the specific embodiments of the present application without departing from the spirit and scope of the present application. These changes and replacements are all within the scope defined by the claims of the present application.
Claims
1. An automatic diagnosis method for explainability-oriented adaptive multi-agent cooperation, characterized by The method comprises the following steps: S1, Constructing the two-way probability matrix of symptoms and diseases based on the dataset, including the following two parts: the probability matrix M S-D from symptoms to diseases, whose each element represents the probability of a patient having disease d j given that he / she shows symptom s i , denoted by P(d i |s j ); and the probability matrix M D-S from diseases to symptoms, whose each element represents the probability of a patient showing symptom s i given that he / she has disease d j , denoted by P(s j |d i ), s j denotes the jth symptom of a patient, and d i denotes the ith disease of a patient; S2, in the pre-diagnosis stage, based on the symptom-to-disease probability matrix M S-D Extracting symptom information from patient complaints, calculating a disease weight list, and submitting it to a discriminant large model for routing based on the disease weight list to distinguish between single-specialist diagnosis and multi-specialist consultation. S3, simulating a single-specialist diagnosis scenario by using a smart agent model Doctor Agent; The Doctor Agent intelligent agent model combines a medical knowledge base and a two-way probability matrix, and according to a strategy, calls an external knowledge base and a predefined tool to determine whether to make a diagnosis based on the symptoms that have appeared in the patient, or to further ask about related symptoms to assist in diagnosis; the predefined tool includes: tool 1 and tool 2, tool 1 can be converted into an n-dimensional state vector through known symptoms, and compared with M S-D Make a product calculation to obtain a disease weight list; tool2 is able to retrieve M D-S and in combination with the knowledge base, obtain a list of symptoms related to the specified disease ordered by probability; S4, simulating a multi-specialist consultation scenario by using a multi-agent model Med-Team Agents; the Med-Team Agents construct a Manager Agent and multiple Disease Agents, which respectively simulate a primary physician and multiple disease specialists; the Disease Agents have professional domain knowledge, can respond to inquiries from the Manager Agent, and return suspected symptoms according to historical dialogue information; the Manager Agent calls an external knowledge base and a predefined tool according to a strategy, judges whether to make a final diagnosis based on the symptoms that have appeared, or inquires the Disease Agents to obtain symptom prompts and makes a symptom selection to assist in diagnosis.
2. The automatic diagnosis method for self-adaptive multi-agent cooperation facing explainability according to claim 1, characterized in that, The step S2 specifically comprises: S21, using a prompt template to guide a large language model to extract symptom entities from a patient complaint and convert them into vector representations; S22, based on M S-D The weight of each disease is obtained by using the product matrix. S23, using a prompt template to guide the large language model to analyze the disease complexity of the patient, and classifying the subsequent diagnosis of the patient into a single-specialist diagnosis or a multi-specialist consultation.
3. The automatic diagnosis method for self-adaptive multi-agent cooperation facing explainability according to claim 1, characterized in that, The step S3 specifically comprises: S31, initialize Doctor Agent, set up the role of the specialist doctor and enhance the professional ability using external medical knowledge base, bind the Doctor Agent with the M S-D Agent tool tool1 to obtain the disease weight ranking, bind the Doctor Agent with the M D-s Agent tool tool2 to obtain the relevant symptom list; S32, using a prompt template to guide the Doctor Agent to obtain patient symptoms, and calling tool1 from a tool pool to calculate disease weight ranking according to the symptoms that have appeared; S33, using a prompt template to guide the Doctor Agent to make a decision according to the disease weight result, judge whether a final diagnosis can be made, if a diagnosis can be made, jump out of the inquiry; otherwise, calling tool2 to obtain a symptom ranking corresponding to the disease with the highest weight and returning the top 20% symptoms as the calling result of the tool; S34, using a prompt template to guide the Doctor Agent to make an optimal symptom selection based on its own knowledge and an external medical knowledge base, and rewrite the selected symptoms into user-friendly natural language inquiries, and wait for the patient's response and then return to execute S2.
4. The automatic diagnosis method for self-adaptive multi-agent cooperation facing explainability according to claim 1, characterized in that, The step S4 specifically comprises: S41, initializing the Med-Team Agents, setting the Manager Agent as a primary physician and setting multiple Disease Agents as disease specialists; binding tool1 for the Manager Agent and binding tool2 for the Disease Agents; S42, using a prompt template to guide the Manager Agent to obtain patient symptoms, and calling tool1 from a tool pool to calculate a disease weight list according to the symptoms that have appeared, recorded as ranked_diseases; S43、Manager Agent compares the ranked_diseases of the current round with the ranked_diseases of the previous round k and obtains the list of diseases that have improved weights, k represents the round k-1 , k represents the round S44, the Manager Agent inquires the Disease Agents corresponding to the disease list, the Disease Agents call tool2 to obtain a suspected symptom list and select 50% of the symptoms as a response based on its own knowledge and an external medical knowledge base; S45. After obtaining relevant symptoms from the corresponding Disease Agents, the Manager Agent takes the symptom with the highest probability of occurrence in the intersection and asks the patient about it.
Citation Information
Patent Citations
Intelligent inquisition method, system, computer equipment and storage medium
CN109192300A
Explanatable inquiry triage method based on multiple rounds of dialogues and related equipment
CN118197572A