Medical information multi-agent expert thinking chain collaborative reasoning method and system
By adopting a collaborative reasoning method for multi-agent expert thinking chain based on large language models in the field of medicine, the problem of efficient extraction and reasoning in medical information processing is solved, and a more accurate and interpretable medical information processing effect is achieved.
Patent Information
- Application Number
- CN202510052177.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-14
- Publication Date
- 2025-04-22
- Estimated Expiration
- 2045-01-14
AI Technical Summary
There is a large amount of data in the field of medicine. It is still difficult to efficiently extract valuable information and conduct efficient and interpretable medical professional reasoning. Traditional methods are not effective in the face of unstructured medical texts and complex information reasoning.
The multi-agent expert thinking chain collaborative reasoning method of medical information based on large language models is adopted. By constructing multiple sub-agent agents with different medical professional backgrounds, combining the natural language processing capabilities of the large language model and the advantages of the collaborative work of the multi-agent system, multi-angle analysis and complex reasoning of medical information are realized.
It improves the accuracy and interpretability of medical information processing, can take into account the complex factors in medical information processing more comprehensively, and is suitable for complex medical information reasoning scenarios that require a combination of multiple information sources and professional knowledge.
Smart Images

Figure CN119864177A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of medical information processing, and specifically relates to a medical information multi-agent expert thinking chain collaborative reasoning method and system based on a large language model. Background Art
[0002] There are a large number of information resources such as literature, clinical guidelines, case reports, etc. in the medical field. It is still difficult to efficiently extract valuable information from these massive data and perform efficient and explainable medical professional reasoning for complex problems in medical information. Traditional artificial intelligence methods based on rules or small models, and due to the lack of understanding of context, often cannot accurately parse unstructured medical texts or fuzzy expressions with implicit meanings; and the use of large language models alone for medical information processing also has limitations. It is difficult to directly use large language models to analyze medical professional field information from multiple angles. When faced with complex medical information reasoning scenarios that require comprehensive analysis of information from different sources to draw conclusions, it is difficult to directly use large language models to solve problems such as missing key information analysis, low fidelity of the reasoning process, homogeneous output results, and output hallucinations. Summary of the invention
[0003] In response to the above problems, the present invention proposes a medical information multi-agent expert thinking chain collaborative reasoning method and system, focusing on using advanced large language model reasoning technology to improve the accuracy and interpretability of medical information processing. This method combines the powerful natural language processing capabilities of the large language model with the collaborative working advantages of the multi-agent system. Multiple sub-expert agents with different medical professional backgrounds are designed to collaborate with each other and jointly participate in the processing of medical information and the reasoning tasks of complex medical problems. By simulating the working mode of a multidisciplinary medical team in the real world, the present invention can more comprehensively consider various complex factors in medical information processing, thereby achieving more accurate and interpretable processing of complex medical problems. In addition, the application of a large language model enables the system to understand and process a large amount of medical literature and clinical cases, further enhancing its applicability and reliability in medical information processing. The present invention is particularly suitable for complex medical information reasoning scenarios that require the integration of multiple information sources and professional knowledge, and aims to promote the development of the field of accurate processing of medical information and interpretable reasoning of complex medical problems.
[0004] In order to solve the above technical problems, the technical solution of the present invention is:
[0005] A medical information multi-agent expert thinking chain collaborative reasoning method includes the following steps:
[0006] S1. Construct sub-expert agents based on the large language model. Each sub-expert agent can call an external medical knowledge base to process medical information and output results. The sub-expert agents include a test and examination analysis sub-expert agent, an imaging report analysis sub-expert agent, and a medical record and history analysis sub-expert agent.
[0007] S2. Construct a summarizer agent based on the large language model. The summarizer agent receives the output results of each sub-expert agent and uses the text summarization and generalization capabilities of the large language model to obtain the processing conclusions of the medical information.
[0008] S3. Based on the large language model, an evaluator agent is constructed. The evaluator agent extracts the time series state in the medical information to be processed and reconstructs the time series characteristics of the medical indicators of the medical information to be processed based on the time series state. By using the context understanding and text generation capabilities of the large language model, the large language model generates the medical conflict judgment strategy of the evaluator agent based on the initial value of the time series characteristics of the medical indicators through prompt word engineering, and performs medical information conflict evaluation on the output of each sub-expert agent and summarizer agent and determines whether it exceeds the set medical conflict threshold.
[0009] S4. Using the contextual understanding ability of the large language model, the evaluator agent's medical conflict judgment strategy is iterated. The evaluator agent splits the medical information into N medical information nodes arranged in chronological order according to the temporal characteristics of medical indicators. Each medical information node stores medical information within a time span. Each medical information node is used as the input value and verification value of the evaluator agent's medical conflict judgment strategy in turn. The medical conflict judgment strategy is adjusted based on the deviation between the medical conflict judgment generated by the evaluator agent and the verification value until the evaluator agent completes the verification of all medical information nodes and generates the final medical conflict judgment strategy.
[0010] S5. When the evaluator agent determines that the conclusion output of the summarizer agent exceeds the set medical conflict threshold, the multi-agent debate mechanism is activated to output whether the conclusion is credible. The multi-agent debate mechanism re-inputs the conclusion output to each sub-expert agent through the prompt word template, requires each sub-expert agent to judge the output results of other sub-expert agents, and conducts up to t rounds of point-to-point dynamic questioning and debate between sub-expert agents based on the context understanding generation capability of the large language model, and re-inputs the debate output of each sub-expert agent to the summarizer agent, and generates a new conclusion output.
[0011] S6. Construct a coordinator agent based on a large language model. The role function prompt word template of the coordinator agent stipulates that the coordinator agent can obtain the name list of all sub-expert agents and the name list of uncalled sub-expert agents, and can call the output results of all sub-expert agents.
[0012] S7. Using the decision-making and planning capabilities of the large language model, the coordinator agent will autonomously select multiple sub-expert agents and summarizer agents to be called based on the input medical information to be processed and plan the calling sequence. The forward reasoning thinking chain tasks of each defined sub-expert agent and summarizer agent will be called in sequence according to the order planned by the coordinator agent to build a multi-agent medical information processing forward reasoning thinking chain. The coordinator agent can plan the calling schemes of multiple sub-expert agents at the same time, that is, generate multiple forward reasoning thinking chains for medical information processing.
[0013] S8. The names and outputs of all sub-expert agents and summarizer agents in the forward reasoning thinking chain will be added to the backward reflective agent stack in the order of the coordinator agent's call. When the forward reasoning thinking chain completes the processing of medical information and gives the forward reasoning thinking chain output, the coordinator agent calls the evaluator agent to evaluate whether the forward reasoning thinking chain output exceeds the set medical conflict threshold.
[0014] S9. When the evaluator agent evaluates that the output of the forward reasoning thinking chain exceeds the set medical conflict threshold, the backward reflection mechanism is activated, and the output processing conclusion is iteratively updated until it is lower than the medical conflict threshold. The evaluator agent will evaluate the output of each sub-expert agent and summarizer agent in the stack one by one in the order of the backward reflection agent stack to see if it exceeds the set medical conflict threshold. After finding the agent that exceeds the medical conflict threshold, it will generate targeted modification opinions for each sub-expert agent based on the final medical conflict judgment strategy, and require the agent that exceeds the medical conflict threshold to iterate the output results until it can pass the medical conflict judgment evaluation of the evaluator agent or reaches the maximum number of output iterations.
[0015] Preferably, in step S1, the method for constructing a sub-expert agent based on a large language model is:
[0016] In the medical information multi-agent expert thinking chain collaborative reasoning framework, each sub-expert agent is constructed into a test and examination analysis sub-expert agent, an imaging report analysis sub-expert agent, and a medical record and history analysis sub-expert agent based on the prompt word engineering of the large language model. Each sub-expert agent is constructed by the following four steps:
[0017] S1-1. The prompt word engineering based on the large language model defines the forward reasoning thinking chain task in each sub-expert agent. The forward reasoning thinking chain task includes the name of the sub-expert agent and the functional prompt word template. The output content, output format and basic specifications of the evidence-based medicine professional output of the forward reasoning thinking chain are clearly defined in the functional prompt word template of each sub-expert agent.
[0018] S1-2, allow each sub-expert agent to autonomously access an external medical knowledge base before outputting the forward reasoning thinking chain, and perform Top-k search on the knowledge base based on the input medical information to be processed. The retrieved text will be provided to the sub-expert agent as a reference text for medical information processing. This operation is autonomously selected by the sub-expert agent, depending on the complexity of the medical information to be processed and the relevance of the external medical knowledge base.
[0019] S1-3. During the forward reasoning thinking chain output process of the sub-expert agent, the sub-expert agent can also autonomously choose to call the forward reasoning thinking chain output results of other sub-expert agents as reference texts for medical information processing, and give critical medical judgments and detailed suggestions. The purpose is to make the communication between the sub-expert agents more constructive. And check the reasoning process and results of medical information with each other.
[0020] The prompt word engineering based on the large language model defines a backward reflection mechanism template for each sub-expert agent. The backward reflection mechanism template includes the original medical information to be processed, the output set of other sub-expert agents, the summary processing output of the summarizer agent, and the text description of the medical conflict exceeding the threshold generated by the evaluator agent, and defines the instructions for the sub-expert agent to iterate its own output. When the backward reflection mechanism is activated, the sub-expert agent will regenerate the medical information processing results based on its own backward reflection mechanism template.
[0021] Preferably, in step S2, the method for constructing a summarizer agent based on a large language model is:
[0022] Based on the large language model prompt word project, the role function prompt word template of the summarizer agent is constructed. The summarizer agent can obtain the output of each sub-expert agent. The summarizer agent is set by the prompt word project to focus on the key points of summary in medical information processing, including the extraction of medical professional terms, the extraction and sorting of professional term relationships, and is strictly required to output the upper limit of the number of words. Based on the functional settings of the above prompt word project, the text summarization and generalization capabilities of the large language model are used to obtain the processing conclusions of medical information.
[0023] Preferably, in step S3, the method for constructing an evaluator agent based on a large language model is:
[0024] Based on the large language model prompt word engineering, the role function prompt word template of the evaluator agent is constructed. The evaluator agent first extracts the temporal state of the medical information to be processed according to the time label in the medical information, and reconstructs the temporal characteristics of the medical indicators of the medical information to be processed based on the temporal state. Utilizing the context understanding and text generation capabilities of the large language model, the prompt word engineering enables the large language model to generate the initial medical conflict judgment strategy of the evaluator agent based on the initial value of the temporal state. The initial medical conflict judgment strategy will be customized and generated for each sub-expert agent and summarizer agent respectively. The prompt word engineering constrains the initial medical conflict judgment strategy to set a medical conflict threshold for the analysis field of each sub-expert agent. Then, based on the initial medical conflict judgment strategy, the evaluator agent evaluates the medical information conflict of the output of each sub-expert agent and summarizer agent and determines whether it exceeds the set medical conflict threshold.
[0025] Preferably, in step S4, the method for the assessor agent to iterate the medical conflict judgment strategy is:
[0026] The context understanding ability of the large language model is used to iterate the medical conflict judgment strategy of the evaluator agent. The evaluator agent splits the medical information into N medical information nodes arranged in chronological order according to the temporal characteristics of medical indicators. Each medical information node stores medical information within a time span. Each medical information node is used as the input value and verification value of the medical conflict judgment strategy of the evaluator agent in turn. The medical conflict judgment strategy for each sub-expert agent and summarizer agent is adjusted based on the deviation between the medical conflict judgment generated by the evaluator agent and the verification value. The adjustment of the medical conflict judgment strategy is iteratively constrained by the prompt word engineering of the large language model. The deviation between the medical conflict judgment and the verification value is analyzed based on the long- and short-term medical time dependence, the relationship between multiple medical variables, the medical feature selection method and the data sparsity. The new medical conflict judgment strategy is iteratively generated until the evaluator agent completes the verification of all medical information nodes and generates the final medical conflict judgment strategy.
[0027] Preferably, in step S5, the method of the multi-agent debate mechanism based on the large language model is:
[0028] S5-1. The evaluator agent determines whether the treatment conclusion exceeds the set medical conflict threshold based on the medical conflict assessment method. If it exceeds the set medical conflict threshold, the multi-agent debate mechanism is activated. The context understanding ability of the large language model is used to disassemble the core medical information processing contradictions to be solved, and the iteration limit of the debate round is specified to build a meta-prompt template framework for the multi-agent debate mechanism. There are N sub-agents in the multi-agent debate mechanism. Participate in the debate framework. In each debate iteration, speak in order and express your own views based on the previous debate history H, that is, D i (H) = h.
[0029] S5-2. The evaluator agent will combine all debate history information to conduct medical conflict assessment for each round of debate results, and judge the consensus reached and the decision mechanism for terminating the debate based on the medical conflict threshold. That is, in this round of debate, after all sub-expert agents have completed the debate, the evaluator agent decides whether the correct output result can be obtained; or if the output result that does not exceed the medical conflict threshold is not obtained in the limited rounds, the debate result is set as an untrusted result in the output set, and the coordinator agent and the sub-expert agent will be informed that the output result is untrustworthy when trying to call the result as a reference for the medical information reasoning process. The forward reasoning thinking chain contained in the multi-agent debate mechanism that exceeds the evaluator agent's medical conflict threshold output result will inevitably activate the backward reflection mechanism.
[0030] Preferably, in step S6, the method for constructing a coordinator agent based on a large language model is:
[0031] Based on the large language model prompt word project, the role function prompt word template of the coordinator agent is constructed. The role function prompt word template of the coordinator agent stipulates that the coordinator agent can obtain the name list of all sub-expert agents and the name list of uncalled sub-expert agents, and can call the output results of all sub-expert agents. After initializing the coordinator agent, using the decision-making planning ability of the large language model, the coordinator agent will autonomously choose to call each sub-expert agent and the summarizer agent based on the input medical information to be processed. When each sub-expert agent outputs, the coordinator agent synchronously updates the medical information processing output results of the sub-expert agent, and integrates the prompt words of the output results of other sub-expert agents to obtain a new output result set. This process can not only ensure that each decision of the coordinator agent is based on the latest and most comprehensive information, but also gradually optimize the performance of the entire system by continuously accumulating information, especially when facing complex medical information reasoning problems, it can provide more accurate and explainable medical reasoning processes and results.
[0032] Preferably, in step S7, the method for constructing a multi-agent medical information forward reasoning thinking chain based on a large language model is:
[0033] Using the decision-making planning capabilities of the large language model, the coordinator intelligence plans the call sequence based on the new output result set, that is, the forward reasoning chain. The forward reasoning chain is a sequential decision-making process in which the set of sub-expert agents is regarded as an action space, the medical information to be processed is defined as P, and a set of predefined sub-expert agents is defined as Where n is the total number of sub-expert agents, φ i represents the configuration of the i-th sub-expert agent, Represents the i-th sub-expert agent. Each sub-expert agent is associated with an optional knowledge base and a prompt template. The forward reasoning thinking chain tasks of the defined sub-expert agents and summarizer agents are called in sequence according to the order planned by the coordinator agent to construct a multi-agent medical information processing forward reasoning thinking chain. The coordinator agent can simultaneously plan the calling schemes of multiple sub-expert agents, that is, generate multiple forward reasoning thinking chains for medical information processing.
[0034] Preferably, in step S8, the method for evaluating the output result of the forward reasoning thinking chain based on the large language model is:
[0035] The names and outputs of the sub-expert agents and summarizer agents in all forward reasoning chains will be added to the backward reflection agent stack in the order of the coordinator agent's call. After the forward reasoning chain completes the processing of medical information and gives the forward reasoning chain output, the coordinator agent calls the evaluator agent to evaluate whether the forward reasoning chain output exceeds the set medical conflict threshold. When multiple forward reasoning chains exist at the same time, the evaluator agent will be given priority to complete the evaluation of the output results of all forward reasoning chains. If the output of a forward reasoning chain does not exceed the set medical conflict threshold, the output result of the forward reasoning chain will be directly used as the final output result; if the output of all forward reasoning chains exceeds the set medical conflict threshold, the backward reflection mechanism will be activated for each forward reasoning chain one by one. The forward reasoning chain containing the untrusted result in the S4 multi-agent debate will be placed at the end of all forward reasoning chains to activate the backward reflection mechanism.
[0036] Preferably, in step S9, the method for constructing a backward reflection mechanism based on a large language model is:
[0037] When the evaluator agent evaluates that the output result of a forward reasoning thinking chain exceeds the set medical conflict threshold, the backward reflection mechanism of the forward reasoning thinking chain is activated. The evaluator agent will evaluate whether the output of each sub-expert agent and summarizer agent in the stack exceeds the set medical conflict threshold one by one in the order of the S8 backward reflection agent stack. After finding the sub-expert agent that exceeds the medical conflict threshold, it generates targeted modification opinions for the sub-expert agent based on the final medical conflict judgment strategy, and requires the sub-expert agent that exceeds the medical conflict threshold to iterate the output results according to the final medical conflict judgment strategy until it can pass the medical conflict judgment evaluation of the evaluator agent or reach the maximum number of output iterations. The sub-expert agent that exceeds the medical conflict threshold will use the defined sub-expert agent backward reflection mechanism template to iterate the output results until it can pass the medical conflict threshold evaluation of the evaluator agent or reach the maximum number of output iterations. When a forward reasoning thinking chain activates the backward reflection mechanism, the backward reflection mechanisms of all other forward reasoning thinking chains will enter a blocked state. When the output result of the backward reflection mechanism of a forward reasoning thinking chain is lower than the medical conflict threshold of the evaluator agent within the maximum number of iterations, the output result is taken as the final output result.
[0038] A medical information multi-agent expert thinking chain collaborative reasoning system, including the following modules:
[0039] The conclusion output module constructs sub-expert agents and summarizer agents based on the large language model. The sub-expert agents call the external medical knowledge base to process the medical information, and the summarizer agent uses the text summarization and generalization capabilities of the large language model to output the processing conclusions of the medical information.
[0040] The evaluation module builds an evaluator agent based on the large language model, conducts medical information conflict evaluation on the outputs of each sub-expert agent and summarizer agent, determines whether the medical conflict threshold is exceeded, and generates a medical conflict judgment strategy.
[0041] Coordination module: builds a coordinator agent based on a large language model, autonomously selects multiple sub-expert agents and summarizer agents to be called based on the input medical information to be processed and plans the calling order, generating multiple forward reasoning thinking chains.
[0042] Furthermore, the evaluation module also includes: when it is judged that the conclusion output of the summarizer intelligent agent exceeds the medical conflict threshold, the multi-agent debate mechanism is activated to output whether the processing conclusion is credible; the evaluator intelligent agent evaluates whether the output of the forward reasoning thinking chain exceeds the medical conflict threshold, the backward reflection mechanism is activated, and the output processing conclusion is iteratively updated.
[0043] Beneficial effects of the present invention: The medical information multi-agent expert thinking chain collaborative reasoning method provided by the present invention can achieve the same and more flexible medical information reasoning and decision-making functions as the decision-making agent without any model parameter training. In the field of medical information processing, the expert selection strategy constructed by the present invention can efficiently and accurately call the expert knowledge in the relevant field according to the type of medical information, so that the large language model can effectively call and integrate the professional knowledge from multiple sub-expert agents. In the construction of the medical information reasoning framework, the present invention provides a forward reasoning thinking chain and a backward reflection mechanism. This method can parse complex problems in medical information processing problems, and realize the evaluation of the intermediate process of reasoning through a multi-agent debate mechanism, which can significantly improve the accuracy and explainability of reasoning. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0045] Figure 1 It is a flow chart for the implementation of the present invention;
[0046] Figure 2 This is a diagram of the collaborative reasoning framework of multi-agent expert thinking chain in medical information. DETAILED DESCRIPTION
[0047] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments can be combined with each other. In the description of the present invention, it should be understood that the orientation or position relationship indicated by the terms "center", "longitudinal", "lateral", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", etc. is based on the orientation or position relationship shown in the drawings, which is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation of the present invention. In addition, the terms "first", "second", etc. are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, the features defined as "first", "second", etc. may explicitly or implicitly include one or more of the features. In the description of the present invention, unless otherwise specified, the meaning of "multiple" is two or more.
[0048] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood by specific circumstances.
[0049] The present invention provides a medical information multi-agent expert thinking chain collaborative reasoning method based on a large language model, such as Figure 1 and Figure 2 As shown, the following steps are included:
[0050] S1: In the medical multi-agent collaborative reasoning framework, each sub-expert agent is assigned a medical information processing role, namely the test report analysis sub-agent, the imaging report analysis sub-agent, and the medical record analysis sub-agent, which are constructed based on the following four steps. The main approach is:
[0051] S1-1. The prompt word engineering based on the large language model defines the forward reasoning thinking chain task in each sub-expert agent. The forward reasoning thinking chain task includes the name of the sub-expert agent and the functional prompt word template. The output content, output format and basic specifications of the evidence-based medicine professional output of the forward reasoning thinking chain are clearly defined in the functional prompt word template of each sub-expert agent.
[0052] S1-2, allow each sub-expert agent to autonomously access an external medical knowledge base before outputting the forward reasoning thinking chain, and perform Top-k search on the knowledge base based on the input medical information to be processed. The retrieved text will be provided to the sub-expert agent as a reference text for medical information processing. This operation is autonomously selected by the sub-expert agent, depending on the complexity of the medical information to be processed and the relevance of the external medical knowledge base.
[0053] S1-3. During the process of forward reasoning thought chain output by the sub-expert agent, the sub-expert agent can also autonomously choose to call the output results of the forward reasoning thought chain of other sub-expert agents as reference texts for medical information processing, and give critical medical judgments and detailed suggestions. The purpose is to make the communication between the sub-expert agents more constructive. And to check the reasoning process and results of medical information with each other.
[0054] S1-4, based on the large language model, the prompt word engineering defines a backward reflection mechanism template for each sub-expert agent. The backward reflection mechanism template includes the original medical information to be processed, the output set of other sub-expert agents, the summary processing output of the summarizer agent, and the text description of the medical conflict exceeding the threshold generated by the evaluator agent, and defines the instructions for the sub-expert agent to iterate its own output. When the backward reflection mechanism is activated, the sub-expert agent will regenerate the medical information processing results based on its own backward reflection mechanism template.
[0055] The following is a specific design template for the prompt words of the medical examination report analysis sub-expert agent based on the large language model:
[0056] "You are an expert in analyzing medical test reports. Based on the medical texts and test analysis reports provided, you provide professional medical information opinions.
[0057] The following external medical information and guidelines can be used as reference:
[0058] Based on the problem description Pr, give your opinion on medical information processing to help solve this problem. The judgments C given by other medical experts are as follows, please refer to them carefully.
[0059] Your professional analysis based on the medical test report is:
[0060] S2: The main approach to building a summarizer agent based on a large language model is:
[0061] The role of the summarizer subagent is to summarize the summaries of all medical judgments provided by the selected sub-expert agents, and to carefully analyze the medical judgments and generate a final answer. The prompt template of the summarizer subagent may vary depending on the specific type of final answer required. The following is an example of a prompt template for a summarizer subagent when the goal is to obtain a procedure:
[0062] The following is a specific design template for the prompt words of the summarizer sub-agent based on the large language model:
[0063] “You need to summarize all medical information judgments and opinions of the expert and generate a summary that incorporates the insights and recommendations provided by the selected expert. The questions related to medical information are as follows:
[0064] The expert's opinion and medical judgment C are as follows:
[0065] Based on professional methods of medical information processing, the opinions of experts are efficiently summarized:"
[0066] S3: The main approach to building an evaluator agent based on a large language model is:
[0067] Based on the large language model prompt word engineering, a role function prompt word template for the evaluator agent is constructed. The evaluator agent can call the external medical knowledge base, and based on the external medical knowledge base and the set medical conflict judgment method, perform medical information conflict evaluation on the output of each sub-expert agent and summarizer agent and judge whether it exceeds the medical conflict threshold.
[0068] The following is a specific prompt word design template for the evaluator sub-agent based on a large language model:
[0069] “You are a medical informatics expert who will be responsible for analyzing the core medical information in the text passages and comparing them with entries in external medical knowledge bases to assess the conflicts in the medical information.
[0070] You will receive a text containing medical information. Please first extract the time status of the medical information according to the time tag in the information, and output it strictly in JSON format. Use this time status as the Key value and the medical information under the corresponding time tag as the Value value to organize and reconstruct the medical information.
[0071] The following are the medical expert agents you will evaluate: sub-expert agent E;
[0072] Please generate initial medical conflict judgment strategies for their medical sub-fields;
[0073] Your output is:"
[0074] S4: The evaluator agent iterates the medical conflict judgment strategy based on the large language model. The main approach is:
[0075] The evaluator agent splits the medical information into N medical information nodes arranged in chronological order according to the temporal characteristics of medical indicators. Each medical information node stores medical information within a time span. Each medical information node is used as the input value and verification value of the evaluator agent's medical conflict judgment strategy in turn. The medical conflict judgment strategy for each sub-expert agent and summarizer agent is adjusted based on the deviation between the medical conflict judgment generated by the evaluator agent and the verification value.
[0076] The following is a specific prompt word design template for the evaluator sub-agent iterative medical conflict judgment strategy:
[0077] "You are a medical information evaluation expert who is good at evaluating the degree of medical conflicts in medical texts. Now you need to make a medical conflict judgment based on the analysis of sub-expert agent E. The medical conflict judgment strategy JP you used before n The judgment J at the previous medical information node is as follows:
[0078] If there is a deviation from the verification value V, please analyze the cause of the deviation from the aspects of long-term and short-term medical time dependence, multi-medical variable relationship, medical feature selection method and data sparsity, and iteratively generate a new medical conflict judgment strategy JP n+1 ”
[0079] S5: Construct a multi-agent medical professional debate mechanism based on a large language model. The main approach is:
[0080] Construct a system meta-prompt template. Use meta-prompts to analyze the core medical information conflicts to be resolved, the sub-expert agents participating in the debate mechanism, the debate round iteration restrictions and other requirements. The high-level arbitrator agent will combine all the debate history information to arbitrate the results of each round of debate. It is given a judgment mechanism to judge the consensus reached and terminate the debate. That is, in this iteration, after all experts have completed the debate, the high-level arbitrator agent decides whether the correct solution can be obtained; or if a medical consensus with sufficient confidence cannot be obtained in the limited rounds, the debate result is placed at a low priority in the forward reasoning thinking chain. The following is a specific prompt word design template for the arbitrator agent in the medical professional debate mechanism:
[0081] "You are the arbitrator of this debate. The following experts will participate in this debate on medical information processing. They will present their arguments and engage in heated discussions. Please first analyze and introduce the core differences and medical conflicts of this debate based on the content and historical information of each round of debate. And make a comprehensive judgment based on the opinions of other expert agents and medical expertise.
[0082] The following are external medical information and guidelines that can be used as reference.
[0083] The judgment C given by other medical experts is as follows.
[0084] What is your analysis of the conflicts and contradictions in this medical information?
[0085] S6: The main approach of the language model construction coordinator agent is:
[0086] The strategy of the coordinator agent is modeled, and the sub-expert agents are selected based on the agent strategy function. The sub-expert agent selection strategy can be transformed into the design of the prompt template, and the optimal strategy is implemented based on the prompt word engineering. The coordinator high-level agent is the core of the entire reasoning framework, which requires more complex prompt design compared to other sub-expert agents. The following is a specific coordinator high-level agent prompt word design template:
[0087] "You are the leader and coordinator of a team of medical information processing experts. Now, you need to coordinate all the experts you manage so that they can work together to solve the problem. Next, you will get specific medical texts and various medical information. First, you need to coordinate the entity information recognition, entity relationship extraction, and implicit relationship extraction of medical texts. After that, your task is to select the expert you think is most suitable to seek professional insights and suggestions from various medical departments. The description of the problem is presented as follows:
[0088] Based on the capabilities of different experts and the current state of the problem-solving process, you need to decide which expert to consult next. The capabilities of the experts are described as follows:
[0089] Experts who have expressed their opinions include:EL You must select from the list of experts above. Please note that you need to complete the entire workflow in the remaining Rs steps. Now, think carefully about your choice and give your reasons. "
[0090] S7: The main approach to constructing a forward reasoning chain of medical information based on a large language model is:
[0091] Forward medical information reasoning thinking construction. In this stage, the coordinator high-level intelligent body will select sub-expert intelligent bodies in turn to make medical judgments and express opinions. Forward reasoning thinking construction is expressed as a sequential decision-making process, in which the expert set is regarded as an action space, and the input problem description is defined as P, and a set of predefined experts is defined as Where n is the total number of sub-expert agents, φ i Denotes the i-th sub-expert agent. Each sub-expert agent is associated with an optional knowledge base and a prompt template. Denote the medical judgment set of the t-th reasoning step as Ct, and define the state in the following formula:
[0092] S8: The main approach to evaluating the output of the forward reasoning chain based on the large language model is:
[0093] The names and outputs of the sub-expert agents and summarizer agents in all forward reasoning chains will be added to the backward reflection agent stack in the order of the coordinator agent's call. After the forward reasoning chain completes the processing of medical information and gives the forward reasoning chain output, the coordinator agent calls the evaluator agent to evaluate whether the forward reasoning chain output exceeds the set medical conflict threshold. When multiple forward reasoning chains exist at the same time, the evaluator agent will be given priority to complete the evaluation of the output results of all forward reasoning chains. If the output of a forward reasoning chain does not exceed the set medical conflict threshold, the output result of the forward reasoning chain will be directly used as the final output result; if the output of all forward reasoning chains exceeds the set medical conflict threshold, the backward reflection mechanism will be activated for each forward reasoning chain one by one. The forward reasoning chain containing the untrusted result in the S5 multi-agent debate will be placed at the end of all forward reasoning chains to activate the backward reflection mechanism.
[0094] S9: The main approach to building a backward reflection mechanism for medical information based on a large language model is:
[0095] The backward reflective reasoning mechanism in the expert thinking chain enables the system to utilize external feedback and adjust the collaboration between sub-expert agents and evaluate the results of problem solving based on their feedback. The trajectory of the sub-expert agents selected in sequence is defined as where i t represents the index of the expert selected in step t. The backward reflective reasoning process receives external feedback r raw Initially, this feedback is usually provided by the program execution environment. This process can be expressed as The initial signal is obtained from the evaluation of the original external feedback (r 0 ,sr 0 )←evaluate(r raw ), where r 0 is a Boolean signal indicating whether the backward reflection process needs to continue, sr 0 A natural language summary of the feedback used to locate errors in the backward reflection process. is correct, then r 0 is set to false, the whole reasoning process terminates. Otherwise, the expert thinking chain starts the backward self-reflective reasoning mechanism to update the output.
[0096] After the backward reflection mechanism obtains the output of the forward reasoning, an evaluator sub-agent collects feedback and converts it into natural language feedback to evaluate its correctness. If the solution is considered incorrect, the system enters the backward reflection stage. In this stage, the sub-expert agents are iteratively questioned in reverse order by removing them from the stack. After finding the agent that exceeds the medical conflict threshold, targeted modification opinions are generated for each sub-expert agent based on the final medical conflict judgment strategy. The steps of iterative improvement of forward thinking construction and backward reflection are repeated until a satisfactory solution is obtained or the maximum number of iterations T is reached. The output includes the reasoning process and results of the disassembly and analysis of complex medical information problems.
[0097] A medical information multi-agent expert thinking chain collaborative reasoning system, including a conclusion output module, an evaluation module and a coordination module:
[0098] The conclusion output module constructs sub-expert agents and summarizer agents based on the large language model. The sub-expert agents call the external medical knowledge base to process the medical information, and the summarizer agent uses the text summarization and generalization capabilities of the large language model to output the processing conclusions of the medical information.
[0099] The evaluation module builds an evaluator agent based on the large language model, conducts medical information conflict evaluation on the outputs of each sub-expert agent and summarizer agent, determines whether the medical conflict threshold is exceeded, and generates a medical conflict judgment strategy.
[0100] Coordination module: builds a coordinator agent based on a large language model, autonomously selects multiple sub-expert agents and summarizer agents to be called based on the input medical information to be processed and plans the calling order, generating multiple forward reasoning thinking chains.
[0101] Furthermore, the evaluation module also includes: when it is judged that the conclusion output of the summarizer intelligent agent exceeds the medical conflict threshold, the multi-agent debate mechanism is activated to output whether the processing conclusion is credible; the evaluator intelligent agent evaluates whether the output of the forward reasoning thinking chain exceeds the medical conflict threshold, the backward reflection mechanism is activated, and the output processing conclusion is iteratively updated.
[0102] The embodiments of the present invention are described in detail above with reference to the accompanying drawings, but the present invention is not limited to the described embodiments. For those skilled in the art, various changes, modifications, substitutions and variations of these embodiments including components are made without departing from the principles and spirit of the present invention, and still fall within the scope of protection of the present invention.
Claims
1. A medical information multi-agent expert thinking chain collaborative reasoning method, characterized in that: The following steps are involved: S1. Construct sub-expert agents and summarizer agents based on the large language model. The sub-expert agents process the medical information, and the summarizer agent outputs the processing conclusion of the medical information. S2. Build an evaluator agent based on the large language model, conduct medical information conflict assessment on the outputs of each sub-expert agent and summarizer agent, determine whether the medical conflict threshold is exceeded, and generate the final medical conflict judgment strategy through iteration; S3, when the evaluator agent determines that the conclusion output of the summarizer agent exceeds the medical conflict threshold, the multi-agent debate mechanism is activated to output whether the conclusion is credible; S4. Build a coordinator agent based on the large language model, select the sub-expert agents and summarizer agents to be called, plan the calling sequence, and generate multiple forward reasoning thinking chains; S5. The evaluator agent evaluates whether the output of the forward reasoning thinking chain exceeds the medical conflict threshold, and iteratively updates the output processing conclusion.
2. According to claim 1, a medical information multi-agent expert thinking chain collaborative reasoning method is characterized by: The specific implementation process of step S1 is as follows: S1-1. Based on the large language model prompt word project, a forward reasoning thinking chain task is defined in each sub-expert agent. The forward reasoning thinking chain task includes the name of the sub-expert agent and the functional prompt word template. The output content of the forward reasoning thinking chain is clearly defined in the functional prompt word template of each sub-expert agent. S1-2, each sub-expert agent autonomously accesses an external medical knowledge base before outputting the forward reasoning thinking chain, and performs a Top-k search on the knowledge base based on the input medical information to be processed. The retrieved text will be provided to the sub-expert agent as a reference text for medical information processing; S1-3. During the process of the sub-expert agent outputting the forward reasoning thinking chain, the sub-expert agent can also autonomously choose to call the output results of the forward reasoning thinking chain of other sub-expert agents that have already outputted as reference text for medical information processing, and give medical judgments and suggestions; S1-4. Construct a role function prompt word template for the summarizer agent based on the large language model prompt word engineering. The summarizer agent can obtain the output of each sub-expert agent. The summarizer agent is set by the prompt word engineering to focus on the key points of summary in medical information processing, including the extraction of medical professional terms, the extraction and sorting of professional term relationships.
3. A medical information multi-agent expert thinking chain collaborative reasoning method according to claim 2, characterized in that: The specific implementation process of the assessor agent in step S2 is as follows: Based on the large language model prompt word engineering, the role function prompt word template of the assessor agent is constructed. The assessor agent first extracts the time sequence state in the medical information to be processed according to the time label in the medical information, and uses the large language model through the prompt word engineering to make the large language model generate the initial medical conflict judgment strategy of the assessor agent based on the initial value of the time sequence state. The initial medical conflict judgment strategy constrains each sub-expert agent and summarizer agent through prompt word engineering, and sets a medical conflict threshold for the analysis field of each sub-expert agent; then the evaluator agent conducts medical information conflict evaluation on the output of each sub-expert agent and summarizer agent based on the initial medical conflict judgment strategy, and determines whether it exceeds the set medical conflict threshold.
4. A medical information multi-agent expert thinking chain collaborative reasoning method according to claim 3, characterized in that: The specific implementation of the final medical conflict judgment strategy is as follows: The context understanding ability of the large language model is used to iterate the medical conflict judgment strategy of the evaluator agent. The evaluator agent splits the medical information into N medical information nodes arranged in chronological order according to the temporal characteristics of medical indicators. Each medical information node stores medical information within a time span. Each medical information node is used as the input value and verification value of the medical conflict judgment strategy of the evaluator agent in turn, and the medical conflict judgment strategy for each sub-expert agent and summarizer agent is adjusted based on the deviation between the medical conflict judgment generated by the evaluator agent and the verification value; medicine The adjustment of the conflict judgment strategy is iteratively constrained through the prompt word engineering of the large language model. The deviation between the medical conflict judgment and the verification value is analyzed based on the medical long- and short-term time dependencies, the relationship between multiple medical variables, the medical feature selection method and data sparsity, and a new medical conflict judgment strategy is iteratively generated until the evaluator agent completes the verification of all medical information nodes and generates the final medical conflict judgment strategy.
5. A medical information multi-agent expert thinking chain collaborative reasoning method according to claim 4, characterized in that: The specific implementation process of the multi-agent debate mechanism is as follows: S5-1, the evaluator agent determines whether the treatment conclusion exceeds the set medical conflict threshold based on the medical conflict assessment method. If it exceeds the set medical conflict threshold, the multi-agent debate mechanism is activated; The context understanding ability of the large language model is used to disassemble the contradiction problem of medical information processing to be solved, stipulate the iteration limit of debate rounds, and construct the meta-prompt template framework of the multi-agent debate mechanism; There are N sub-agents in the multi-agent debate mechanism Participate in the debate framework; in each debate iteration, speak in order and express your own opinions based on the previous debate history H, that is, D i (H) = h; S5-2. The evaluator agent combines all debate history information to conduct medical conflict assessment for each round of debate results, and determines the consensus reached and the judgment mechanism for terminating the debate based on the medical conflict threshold. That is, in this round of debate, after all sub-expert agents have completed the debate, the evaluator agent decides whether the correct output result can be obtained; or if the output result that does not exceed the medical conflict threshold is not obtained in the limited rounds, the debate result is set as an untrusted result in the output set, and the coordinator agent and the sub-expert agent are informed that the output result is untrustworthy when trying to call it as a reference for the medical information reasoning process; the forward reasoning thinking chain contained in the multi-agent debate mechanism that exceeds the evaluator intelligent medical conflict threshold output result will inevitably activate the backward reflection mechanism.
6. A medical information multi-agent expert thinking chain collaborative reasoning method according to claim 5, characterized in that: The coordinator agent is specifically implemented as follows: A role function prompt word template of the coordinator agent is constructed based on the large language model. The role function prompt word template of the coordinator agent stipulates that the coordinator agent can obtain the name list of all sub-expert agents and the name list of uncalled sub-expert agents, and call the output results of all sub-expert agents; after initializing the coordinator agent, the coordinator agent autonomously chooses to call each sub-expert agent and the summarizer agent based on the input medical information to be processed; when each sub-expert agent outputs, the coordinator agent synchronously updates the medical information processing output result of the sub-expert agent, and integrates the prompt words of the output results of other sub-expert agents to obtain a new output result set.
7. A medical information multi-agent expert thinking chain collaborative reasoning method according to claim 6, characterized in that: The specific implementation process of generating multiple forward reasoning thinking chains is as follows: Using the decision-making planning ability of the large language model, the coordinator intelligence plans the calling sequence based on the new output result set, that is, the forward reasoning chain; the forward reasoning chain is a sequential decision-making process in which the set of sub-expert agents is regarded as the action space, the medical information to be processed is defined as P, and a set of predefined sub-expert agents is defined as Where n is the total number of sub-expert agents, φ i represents the configuration of the i-th sub-expert agent, represents the i-th sub-expert agent; each sub-expert agent is associated with a knowledge base and a prompt template; the forward reasoning thinking chain tasks of the defined sub-expert agents and summarizer agents are called in sequence according to the order planned by the coordinator agent to construct a multi-agent medical information processing forward reasoning thinking chain; The coordinator agent simultaneously plans the calling plans of multiple sub-expert agents and generates multiple forward reasoning thinking chains to process medical information.
8. A medical information multi-agent expert thinking chain collaborative reasoning method according to claim 7, characterized in that: The specific implementation process of step S5 is as follows: The names and outputs of the sub-expert agents and summarizer agents in all forward reasoning chains are added to the backward reflective agent stack in the order of the coordinator agent's call. After the forward reasoning chain completes the processing of medical information and gives the forward reasoning chain output, the coordinator agent calls the evaluator agent to evaluate whether the forward reasoning chain output exceeds the set medical conflict threshold. When multiple forward reasoning chains exist at the same time, the evaluator agent takes priority to complete the evaluation of the output results of all forward reasoning chains. If the output of a forward reasoning chain does not exceed the set medical conflict threshold, the output result of the forward reasoning chain is directly used as the final output result. If the outputs of all forward reasoning chains exceed the set medical conflict threshold, the backward reflection mechanism will be activated for each forward reasoning chain one by one; the forward reasoning chain containing untrusted results in the multi-agent debate will be placed at the end of all forward reasoning chains to activate the backward reflection mechanism.
9. A medical information multi-agent expert thinking chain collaborative reasoning method according to claim 8, characterized in that: The specific implementation process of the backward reflection mechanism is as follows: The backward reflection mechanism template includes the original medical information to be processed, the output set of other sub-expert agents, the summary processing output of the summarizer agent and the text description of the medical conflict exceeding the threshold generated by the evaluator agent, and defines the instructions for the sub-expert agent to iterate its own output; when the backward reflection mechanism is activated, the sub-expert agent regenerates the medical information processing results based on its own backward reflection mechanism template; When the evaluator agent evaluates that the output result of a forward reasoning thinking chain exceeds the set medical conflict threshold, the backward reflection mechanism of the forward reasoning thinking chain is activated; the evaluator agent will evaluate whether the output of each sub-expert agent and summarizer agent in the stack exceeds the set medical conflict threshold one by one in the order of the backward reflection agent stack; after finding the sub-expert agent that exceeds the medical conflict threshold, it generates targeted modification opinions for the sub-expert agent based on the final medical conflict judgment strategy, and requires the sub-expert agent that exceeds the medical conflict threshold to iteratively output the result according to the final medical conflict judgment strategy until it can pass the medical conflict judgment evaluation of the evaluator agent or reaches the maximum number of output iterations; The sub-expert agent that exceeds the medical conflict threshold uses the defined sub-expert agent backward reflection mechanism template to iterate the output results until it can pass the medical conflict threshold evaluation of the evaluator agent or reaches the maximum output iteration number; When a forward reasoning thinking chain activates the backward reflection mechanism, the backward reflection mechanisms of all other forward reasoning thinking chains will enter a blocked state; when the output result of the backward reflection mechanism of a forward reasoning thinking chain is lower than the medical conflict threshold of the evaluator agent within the maximum number of iterations, the output result will be used as the final output result.
10. A medical information multi-agent expert thinking chain collaborative reasoning system, used to implement the reasoning method described in any one of claims 1 to 9, characterized in that: Includes the following modules: Conclusion output module, which builds sub-expert agents and summarizer agents based on the large language model. The sub-expert agents call the external medical knowledge base to process the medical information, and the summarizer agent uses the text summarization and generalization capabilities of the large language model to output the processing conclusion of the medical information. The evaluation module builds an evaluator agent based on the large language model, evaluates the medical information conflict of the output of each sub-expert agent and summarizer agent, determines whether it exceeds the medical conflict threshold, and generates a medical conflict judgment strategy; Coordination module; A coordinator agent is constructed based on a large language model. Based on the input medical information to be processed, it autonomously selects multiple sub-expert agents and summarizer agents to be called and plans the calling order, generating multiple forward reasoning thinking chains.
11. A medical information multi-agent expert thinking chain collaborative reasoning system according to claim 10, characterized in that: The evaluation module also includes: when it is judged that the conclusion output of the summarizer intelligent agent exceeds the medical conflict threshold, the multi-agent debate mechanism is activated to output whether the processing conclusion is credible; the evaluator intelligent agent evaluates whether the output of the forward reasoning thinking chain exceeds the medical conflict threshold, the backward reflection mechanism is activated, and the output processing conclusion is iteratively updated.
Citation Information
Patent Citations
Multi-agent collaborative knowledge reasoning framework and system based on large language model
CN117744795A
Multi-role collaborative information processing method and device based on large language model
CN118136231A
Multi-agent collaboration method, device and equipment based on large language model and medium
CN118551751A
Multi-agent thinking chain negotiation enhancement generation method
CN118821834A
Computer based inference engine device and method thereof for integrating backward chaining and forward chaining reasoning
US5119470A
Cited By
Course document understanding method based on multi-agent logical reasoning
CN120163165A
Complex event analysis processing method and device for multi-agent cooperative game
CN120509413A
Treatment scheme planning method and system based on multi-Agent cooperation
CN120544776A
Intelligent transaction decision-making method and system based on hierarchical multi-round confrontation debate
CN120807154A
Intelligent transaction decision-making method and system based on hierarchical multi-round adversarial debate
CN120807154B