Intelligent agent-based medical health question and answer method, equipment and medium
Through an agent-based medical health question-answering method, using query understanding, master control, answer synthesis and credibility calibration agents, we solved the problems of evidence conflict and insufficient static risk assessment in complex medical queries, and realized a personalized, credible and secure medical question-answering system.
Patent Information
- Application Number
- CN202511290911.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-10
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2045-09-10
AI Technical Summary
Existing medical question-answering systems tend to ignore conflicts of evidence between different knowledge sources when processing complex medical queries, and static risk assessment strategies lead to insufficient confidence assessments, especially in high-risk scenarios such as chronic disease management and emergency triage, where there is a risk of misleading recommendations.
An agent-based medical and health question-answering method is adopted. The query understanding agent analyzes the user's intention, the master agent's collaborative instructions drive the professional agent to retrieve information, the answer synthesis agent integrates the answer fragments, and the credibility calibration agent performs evidence conflict analysis and dynamic risk assessment, generating diversified disposal instructions to ensure the credibility and security of the answers.
It achieves the accuracy and credibility of personalized medical questions and answers, ensures the authenticity, reliability and compliance of information, and reduces the risk of misleading advice through dynamic risk assessment strategies.
Smart Images

Figure CN120804272A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of artificial intelligence medical question and answer, and in particular relates to a medical health question and answer method based on an agent, a device and a medium. BACKGROUND
[0002] With the in-depth application of artificial intelligence technology in the field of medical health, the question and answer system based on natural language processing has gradually become an important tool for assisting medical information retrieval and health management. Traditional medical health question and answer systems mostly use end-to-end deep learning models, such as pre-training language models based on the Transformer architecture, to realize question analysis and answer generation through large-scale medical text training. Such systems usually rely on a single model to complete tasks such as intent recognition, entity extraction and answer generation. The training data of the single model is mostly derived from structured medical knowledge bases or unstructured electronic health records. In recent years, in order to improve the accuracy of answers, some systems have introduced retrieval augmented generation (RAG) technology, which enhances the context information through external knowledge base retrieval, and reduces the model hallucination phenomenon. In addition, some systems attempt to process professional medical terms through rule engines or semantic template matching methods to improve the accuracy of entity recognition and intent classification. The existing technology has shown efficient information processing capability in specific scenarios, especially in the standardized fields of common disease consultation and drug information query.
[0003] The existing technology still faces the challenges of medical answer credibility and dynamic risk control. When a user query involves complex symptoms or multiple disease intersections, the answer generated by a single model may ignore the evidence conflicts between different knowledge sources, or may not fully consider the key information (such as allergy history, medication records) in the user's historical dialogue, resulting in insufficient confidence assessment of the answer. In addition, the existing system mostly adopts a static risk assessment strategy, which is difficult to dynamically adjust the answer generation strategy according to the real-time dialogue state, and may produce misleading suggestions. These problems are particularly prominent in high-risk scenarios such as chronic disease management and emergency triage, and an urgent solution is needed that can integrate multi-agent collaboration and dynamic risk perception. SUMMARY
[0004] In view of the above existing problems, the present application is proposed.
[0005] Therefore, the present application provides a medical health question and answer method based on an agent to solve the problem of insufficient confidence assessment caused by evidence conflict neglect and static risk strategy in processing complex medical queries.
[0006] To solve the above technical problems, the present application provides the following technical solutions: In a first aspect, the present application provides an intelligent agent-based medical health question and answer method, which comprises receiving a user-input medical health question, parsing the medical health question by using a query understanding intelligent agent, identifying medical entities and judging user query intention, and generating an intention analysis report; Receiving the intention analysis report by using a master intelligent agent, accessing a dynamic dialogue context pool, generating intelligent agent cooperation instructions according to the intention analysis report and the state of the dynamic dialogue context pool; Driving each professional intelligent agent by using the intelligent agent cooperation instructions, retrieving information from a corresponding medical knowledge base and generating preliminary answer segments, and fusing all the preliminary answer segments by using an answer synthesis intelligent agent to generate a preliminary medical answer report; Evaluating the preliminary medical answer report for credibility by using a credibility calibration intelligent agent, generating a confidence score and an evidence conflict level, and performing multi-dimensional weighted fusion and risk pattern recognition by using a dynamic risk assessment strategy to generate diversified disposal instructions; when the diversified disposal instructions are allowed to be released, performing a security compliance check on the preliminary medical answer report to generate a compliant medical answer.
[0007] As a preferred scheme of the intelligent agent-based medical health question and answer method, the medical health question comprises disease-related questions, symptom consultation, examination and medication questions, health management and preventive healthcare questions.
[0008] As a preferred scheme of the intelligent agent-based medical health question and answer method, the parsing of the medical health question by using the query understanding intelligent agent, the identification of medical entities and the judgment of user query intention, and the generation of the intention analysis report comprise the following specific steps, Performing denoising, word segmentation processing and syntax analysis on the medical health question, removing irrelevant information, punctuation marks and redundant words, and outputting standardized text data; Performing medical entity identification and intention classification on the standardized text data by using the query understanding intelligent agent, obtaining medical entities, and labeling medical entity categories; judging user query intention by using a classification algorithm according to user context and medical entity categories, obtaining structured medical entity data and user query intention; Performing semantic matching on the structured medical entity data and user query intention, and combining user context to infer user specific requirements, and generating an intention analysis report.
[0009] As a preferred scheme of the intelligent agent-based medical health question and answer method, the receiving of the intention analysis report by using the master intelligent agent, the accessing of the dynamic dialogue context pool, and the generation of the intelligent agent cooperation instructions according to the intention analysis report and the state of the dynamic dialogue context pool comprise the following specific steps, The main control agent receives an intention analysis report, accesses a dynamic dialogue context pool through an interface, obtains dialogue history and user health data related to the current query, and obtains dynamic dialogue context information; The structured medical entity data in the intention analysis report is combined and analyzed with the dynamic dialogue context information to determine the current specific needs of the user and obtain a comprehensive demand analysis result. According to the comprehensive demand analysis result, the core demand of the user query is identified, the query processing task target is determined, the query processing task is decomposed into multiple subtasks, and an intelligent agent cooperation instruction is generated.
[0010] As a preferred scheme of the medical health question and answer method based on intelligent agents, wherein: the intelligent agent cooperation instruction is used to drive each professional intelligent agent to retrieve information from the corresponding medical knowledge base and generate a preliminary answer segment, and the specific steps are as follows, The intelligent agent cooperation instruction drives each professional intelligent agent to retrieve information from the corresponding medical knowledge base for different types of medical health problems, and obtains medical retrieval result data. The medical retrieval result data is sorted and filtered to obtain a preliminary medical information set. The preliminary medical information set is supplemented and integrated using structured medical entity data, and the structured medical entity data is matched with the user's specific needs according to the user's query intention to generate an initial answer segment. The expression of the initial answer segment is optimized through a semantic understanding model, and the deep semantic is further enhanced to obtain a structured answer segment. The structured answer segment is verified for relevance, completeness and accuracy to generate a preliminary answer segment.
[0011] As a preferred scheme of the medical health question and answer method based on intelligent agents, wherein: the answer synthesis intelligent agent performs fusion processing on all preliminary answer segments to generate a preliminary medical answer report, and the specific steps are as follows, The answer synthesis intelligent agent accepts all preliminary answer segments and performs unified processing of the preliminary answer segments on the syntax and semantic levels, generates an optimized answer segment set through weighted fusion and structured adjustment, and generates a preliminary medical answer report. The optimized answer segment set is structured to generate a preliminary medical answer report.
[0012] As a preferred scheme of the medical health question and answer method based on intelligent agents, wherein: the credibility calibration intelligent agent performs credibility evaluation on the preliminary medical answer report to generate a confidence score and an evidence conflict level, and uses a dynamic risk assessment strategy for multi-dimensional weighted fusion and risk pattern recognition to generate diversified disposal instructions, and the specific steps are as follows, The credibility calibration agent receives a preliminary medical answer report, matches each preliminary answer fragment with an evidence source, verifies the data consistency and accuracy of the preliminary answer fragment, and outputs the verified preliminary answer fragment and evidence source information; The conflict degree between evidence sources is extracted from the evidence source information, and an evidence conflict level is generated for each preliminary answer fragment based on the conflict analysis; According to the evidence quality, data consistency and evidence conflict level, the confidence score of each verified preliminary answer fragment is calculated; By weighting and fusing the numerical results of the confidence score and the evidence conflict level, a comprehensive credibility score of each preliminary answer fragment is generated; Using a dynamic risk assessment strategy, the comprehensive credibility score is multi-dimensionally weighted and fused, and through risk pattern recognition, a risk score of each preliminary answer fragment is generated; According to the risk score, different diversified disposal instructions are generated for each preliminary answer fragment.
[0013] As a preferred scheme of the medical health question and answer method based on the agent, wherein: the diversified disposal instructions are divided into pending instructions, prohibited release instructions and allowed release instructions according to the risk score; When the diversified disposal instruction is pending, the preliminary medical answer report is not released, and the preliminary medical answer report is marked as pending; When the diversified disposal instruction is prohibited release, the preliminary medical answer report is prohibited to release, and the reason or risk warning is recorded; When the diversified disposal instruction is allowed to release, the legality, medical accuracy and potential risk of the content in the preliminary medical answer report are verified item by item, and after verification, a disclaimer is automatically added to the preliminary medical answer report to generate a compliant medical answer.
[0014] In a second aspect, the present application provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and wherein the computer program is executed by the processor to implement any step of the medical health question and answer method based on the agent according to the first aspect of the present application.
[0015] In a third aspect, the present application provides a computer readable storage medium having a computer program stored thereon, wherein the computer program is executed by a processor to implement any step of the medical health question and answer method based on the agent according to the first aspect of the present application.
[0016] The application has the beneficial effects that: the intelligent agent is combined with the dynamic dialogue context to generate the intelligent agent cooperation instruction, the accurate task decomposition and answer generation based on individual differences are realized, the continuity and individualization of the question and answer results are ensured; meanwhile, the evidence source matching and conflict analysis of the preliminary answer are realized by the credibility calibration intelligent agent, and the diversified disposal instruction is generated by combining the dynamic risk assessment strategy, the credibility and safety of the medical answer are multi-dimensionally controlled, and finally the beneficial effects that the personalized medical question and answer can be provided and the information authenticity and reliability and compliance safety can be ensured are achieved. BRIEF DESCRIPTION OF DRAWINGS
[0017] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0018] Fig. 1 The flow chart of the intelligent agent-based medical health question and answer method.
[0019] Fig. 2 The query understanding intelligent agent workflow chart.
[0020] Fig. 3 The answer synthesis intelligent agent workflow chart.
[0021] Fig. 4 The credibility calibration intelligent agent workflow chart. DETAILED DESCRIPTION
[0022] In order to make the above-mentioned purposes, features and advantages of the present application more apparent and easy to understand, the specific embodiments of the present application will be described in detail below with reference to the drawings of the specification.
[0023] In the following description, many specific details are set forth in order to provide a thorough understanding of the present application, but the present application can also be implemented in other ways different from those described herein, and those skilled in the art can make similar generalizations without departing from the connotation of the present application, therefore the present application is not limited to the specific embodiments disclosed below.
[0024] Secondly, the "one embodiment" or "embodiment" referred to herein means that the specific features, structures or characteristics can be included in at least one implementation of the present application. "In one embodiment" appearing in different places in the specification does not mean the same embodiment, nor is it an independent or alternative embodiment that excludes other embodiments.
[0025] REFERENCE Figs. 1-4For an embodiment of the present application, the embodiment provides an intelligent agent-based medical health question and answer method, comprising the following steps: S1, receiving a user input medical health question, using a query understanding intelligent agent to analyze the medical health question, identifying medical entities and judging user query intent, and generating an intent analysis report.
[0026] It should be noted that the medical health question includes disease-related questions, symptom consultation, examination and medication questions, health management and preventive health questions.
[0027] It should be noted that the "query understanding intelligent agent" is responsible for converting the user's original inquiry into a structured representation that can be processed by a machine, including noise removal / tokenization / syntax analysis, medical entity recognition (NER), entity type labeling and intent classification, output structured medical entities and intent labels for subsequent processing; By collecting and cleaning medical field corpus (de-sensitized paragraphs of electronic medical records, question and answer pairs, clinical guidelines and terminology tables), annotating by entity and intent to build a training set, building a text preprocessing pipeline (noise filtering, tokenization / subwordization, syntax analysis, standardization and medical terminology mapping), selecting and fine-tuning a pre-trained model based on a bidirectional encoder (such as Clinical-BERT / general BERT fine-tuning) for named entity recognition (NER) and intent classification, while building a rule / dictionary layer (ICD, SNOMED mapping table, synonym table) in parallel to improve recall, using hybrid reasoning (model output + rule post-processing) to output structured entity-attribute pairs and intent vectors, using cross-validation and F1 / precision / recall evaluation and deploying as a microservice that can be called through API, to actively learn and correct errors in a closed loop to continuously expand the annotation set and correct bias to obtain the query understanding intelligent agent.
[0028] S1.1, noise removal, tokenization and syntax analysis are performed on the medical health question to remove irrelevant information, punctuation and redundant words, and output standardized text data.
[0029] It should be noted that the web page tags, emoticons, repeated spaces, format abnormal characters and advertising or polite language irrelevant to the meaning of the medical health question are removed and standardized, and the character encoding is unified, the full-width and half-width are unified, the punctuation marks are removed, and the clean text data is generated; The clean text data is segmented according to the commonly used method of Chinese word segmentation, the boundaries of the words related to medical entities are kept complete, and the obviously broken proper noun phrases are merged, and the word segmentation annotated text is output; Based on the dependency relationship and component boundary recognition, the subject, predicate, object, modifying component, negation word, and the position and association of time and quantity expression in the word segmentation annotated text are annotated, the grammar relationship between words is established, and the ambiguous expression is eliminated to generate standardized text data.
[0030] S1.2, using a query understanding agent to perform medical entity recognition and intent classification on the standardized text data, obtaining medical entities, and annotating medical entity categories.
[0031] It should be noted that the standardized text data generated by denoising, word segmentation processing and syntax analysis is input into the query understanding agent, and the query understanding agent encodes the sub-word level features of the standardized text data through the general BERT fine-tuning model to generate context-aware semantic vectors for each word in the text; Using the context-aware semantic vectors of each word, the potential medical entities in the text are recognized, and medical entities such as disease names, symptom descriptions, examination items, medication information, health management and prevention and health-related terms are identified; Using entity type annotation rules, each identified medical entity is annotated as the corresponding category, for example, "high blood pressure" is annotated as a disease category, "headache" is annotated as a symptom category, "blood routine" is annotated as an examination category, "aspirin" is annotated as a medication category, and "health examination plan" is annotated as a health management category, ensuring that the identified medical entities are consistent with the original semantics in the standardized text data. It should also be noted that the training steps of the general BERT fine-tuning model are as follows: using the annotated medical entity categories as a supervision signal, inputting the standardized text data into the general BERT fine-tuning model for fine-tuning training, adjusting the parameters of the general BERT fine-tuning model to enable the general BERT fine-tuning model to accurately predict on the medical entity recognition and intent classification task, while evaluating the performance of the general BERT fine-tuning model using cross-validation, and optimizing the general BERT fine-tuning model according to the F1 value, precision and recall.
[0032] S1.3, according to the user's context and medical entity category, the user's query intent is determined by a classification algorithm, and structured medical entity data and user query intent are obtained.
[0033] It should be noted that the medical entities and annotated medical entity categories are integrated with the user's context information, and the user's historical questions, answers in the current session, and related disease, symptom, examination and medication information in the health record are associated with the identified medical entities to construct a comprehensive feature vector containing context semantic features and entity features. The comprehensive feature vector is input into the classification algorithm, and the classification algorithm calculates a matching score for each intent category according to the word context information, medical entity category, entity position, dependency relationship and user context information contained in the comprehensive feature vector, and the expression is: ; In the formula, is the matching score of the intent category , which is a dimensionless real number, used to represent the matching degree of the category with the comprehensive feature vector; is the weight vector corresponding to the intent category , which has the same dimension as , ensuring that the dimension of the inner product is consistent, is the transpose operation; is the bias term of the intent category , which is a dimensionless real number, used to adjust the baseline of the matching score; is the comprehensive feature vector, which is a dimensionless real number vector; is the index of the intent category; The scores of all intent categories are compared, and the intent category with the highest score is selected as the user query intent, which is matched with the medical entity and the labeled medical entity category to output the corresponding structured medical entity data; It should be noted that the user context refers to the semantic information related to medical and health problems generated by the user in the current session and historical interactions, including the user's previous questions, received answers, disease records, symptom descriptions, test results and medication information in the health profile; The semantic information is obtained through a dynamic dialogue context pool, which collects and updates the user's historical dialogue records, health profile and query content and interaction status in the current session in real time, and integrates all related information to obtain the structured representation containing context semantic features and entity features. It should be noted that the dynamic dialogue context pool is formed by collecting and updating the user's historical dialogue records, health profile (such as disease, symptoms, tests and medication information) and query content and interaction status in the current session in real time, and integrating to form a structured representation containing context semantic features and entity features.
[0034] S1.4, the structured medical entity data is semantically matched with the user query intent, and the user's specific needs are inferred by combining the user context, and an intent analysis report is generated.
[0035] It should be noted that the disease name, symptom, test item, medication information and health management related terms in the structured medical entity data are semantically aligned with the user query intent to form a preliminary matching relationship; The user's specific needs in the current session are inferred by using the user's context before and after the text, and a comprehensive matching table is generated; The comprehensive matching table is structured and sorted according to the intent category and medical entity category, and an intent analysis report is generated for subsequent processing.
[0036] S2, the master intelligent agent receives the intent analysis report and accesses the dynamic dialogue context pool, and generates intelligent agent cooperation instructions according to the intent analysis report and the state of the dynamic dialogue context pool.
[0037] It should be noted that the "master intelligent agent" is responsible for integrating the intent analysis result and the dialogue context into task planning and scheduling instructions, and undertakes the responsibilities of task decomposition, cooperation instruction generation and context management; By defining the task decomposition semantic framework and subtask template (such as retrieval, verification, generation and compliance check), collecting historical dialogue and user health records as context storage and accessing state machine / dialogue context pool interface, using rule judgment logic to ensure safety compliance boundaries and priority constraints, training a lightweight strategy network (small Transformer or sequence to sequence model) on annotated dialogue-task decomposition pairs to learn how to split high-level intent into subtasks, task dispatching logic is responsible for instruction serialization and dispatching, error recovery strategy and timeout processing, end-to-end evaluation based on simulation scenarios (task completion rate, instruction accuracy and failure recovery ability) is adopted, and the master control logic is deployed as an auditable orchestration service, which is continuously refined through strategy playback, offline / online testing and security sandbox, and the master control intelligent agent is obtained; It should be noted that the rule judgment logic is a logical judgment and screening of safety compliance boundaries, priority constraints and strategy constraints before task decomposition, which is used to guide the generation and dispatching of subsequent subtasks; Task dispatching logic refers to the rules and processes of organizing, serializing and distributing subtasks generated by the master intelligent agent according to execution order, priority and safety compliance constraints, which is obtained by logical judgment of task decomposition results, context state and strategy constraints; Master logic is the executable task decomposition and dispatching strategy formed by integrating high-level intent, intent analysis report and dynamic dialogue context through rule judgment, strategy network and scheduling strategy; By defining the task decomposition semantic framework → establishing rule judgment constraints → training strategy network on annotated dialogue-task decomposition pairs → task serialization combined with scheduler → end-to-end verification through simulation scenarios and artificial review → deployment as an auditable master control service, the master logic is formed.
[0038] S2.1, receive the intent analysis report by the master agent, access the dynamic dialogue context pool through the interface, obtain the dialogue history and user health data related to the current query, and obtain the dynamic dialogue context information.
[0039] It should be noted that the intent analysis report is input to the master agent, and the master agent accesses the dynamic dialogue context pool through the interface; Retrieve all relevant interaction records of the user in the current session and historical sessions from the dynamic dialogue context pool, including historical questions and answers, disease records in the health record, symptom descriptions, test results, and medication information, as well as the query content and interaction status in the current session; Integrate and format the retrieved dialogue history and health record information to form dynamic dialogue context information that can represent the user's context semantics and state.
[0040] S2.2, combine and analyze the structured medical entity data in the intent analysis report with the dynamic dialogue context information to determine the user's current specific needs and obtain the comprehensive demand analysis result.
[0041] It should be noted that the structured medical entity data in the intent analysis report and the historical questions, historical answers, health record records and current session state contained in the dynamic dialogue context information are compared one by one at the semantic level, combined with the meaning of the words and the context of the user's context, the semantic closeness is obtained, the content is determined to be most relevant to the user's current expression, and the medical problem that the user focuses on in the current session is identified; According to the intent category and the medical entity category, the matching results are classified, summarized and prioritized, the specific needs of the user in the current session are inferred, and the comprehensive demand analysis result is output, including the intent category corresponding to each medical entity, the user's focus, the semantic matching degree and the associated information with the context; It should be noted that the meaning of the words is obtained according to the medical entities (diseases, symptoms, drugs, etc.) extracted in the intent analysis report and the keywords and terms in the dialogue context.
[0042] S2.3, according to the comprehensive demand analysis result, by identifying the user's query core demand, determining the query processing task target, and decomposing the query processing task into multiple sub-tasks, generating agent collaboration instructions.
[0043] It should be noted that according to the intent category and semantic closeness of each medical entity in the comprehensive demand analysis result, the medical entity and intent category combination is represented as a feature, for example, each combination contains disease name, symptom, test or medication information and corresponding intent weight; Use sorting algorithm or rules to prioritize and sort medical entities and intent category combinations according to user attention, historical interaction frequency and context relevance; Identify the core medical issues that users are most concerned about in the current session through sorting results, and use this to clarify the query processing task objectives, such as obtaining disease diagnosis and treatment information, symptom relief suggestions, or medication guidance; Based on the query processing task objectives, the query processing task is divided into independently executable subtasks according to its function and processing flow, including operations such as information retrieval, evidence verification, preliminary answer generation, and answer integration. Each subtask clearly defines the input-output relationship and execution order; The decomposed subtasks and their execution order, required medical entities and intention information are integrated to generate agent collaboration instructions.
[0044] S3. Use the agent collaboration instructions to drive each professional agent to retrieve information from the corresponding medical knowledge base and generate preliminary answer fragments. The answer synthesis agent will fuse all the preliminary answer fragments to generate a preliminary medical answer report.
[0045] It should be noted that the "Answer Synthesis Agent" is the aggregation layer responsible for semantic fusion, conflict resolution, and unified expression of the preliminary answer fragments returned by each professional agent, and outputs a structured and readable preliminary medical answer report; By defining a standardized representation of answer fragments (text, structured fields, source identifiers, timestamps, and initial confidence values), the preliminary answer fragments are semantically vectorized, and a two-layer retrieval structure is constructed in combination with keyword matching rules. The preliminary answer fragments are scored for relevance and re-ranked (dense retriever + lexical re-ranker). Conflict detection and clustering algorithms are used to merge similar preliminary answer fragments and mark inconsistencies. Rules / templates are used to complete structured merging and traceability aggregation. If necessary, a fine-tuned generative model (RAG or seq2seq) is used to perform natural language fusion and rewriting on verified evidence to improve readability. At the same time, fact completion and consistency verification are performed to obtain an answer synthesis intelligent entity.
[0046] S3.1. The agent collaboration instructions drive each professional agent to search for information from the corresponding medical knowledge base for different types of medical and health problems and obtain medical search result data.
[0047] It should be explained that the subtask information, involved medical entities and query processing task goals specified in the agent collaboration instructions should be passed to each professional agent; Each professional agent determines the corresponding medical knowledge base based on the type of medical and health problem it is responsible for, such as a disease diagnosis and treatment knowledge base, a symptom analysis knowledge base, an examination and testing knowledge base, or a medication guidance knowledge base; Each professional agent uses structured query methods or semantic retrieval methods to locate relevant information in the corresponding medical knowledge base. During the retrieval process, medical entity names, intent categories, and contextual keywords are used for precise matching. At the same time, information such as time and source is combined to filter the retrieval results. Each professional agent organizes and outputs medical search result data including text description, source identification, timestamp and preliminary confidence.
[0048] S3.2. Organize and filter the medical search result data to obtain a preliminary medical information set.
[0049] It should be explained that the medical search result data is screened, deduplicated and structured according to the medical entity matching, information integrity, source credibility and time relevance to generate a preliminary medical information set.
[0050] S3.3. Use structured medical entity data to supplement and integrate the preliminary medical information set, and match the structured medical entity data with the user's specific needs based on the user's query intent to generate an initial answer fragment.
[0051] It should be explained that the structured medical entity data is semantically aligned with the text content in the preliminary medical information set and the fields are completed to ensure that each piece of information covers the relevant medical entity attributes, resulting in the supplemented medical information set; Identify user focus points from user query intent, such as disease name, symptom type, examination items, or medication requirements, and vectorize these user focus points; For each piece of information in the supplemented medical information set, the corresponding medical entity, keyword, and context features are extracted, and the semantic similarity with the user's focus is calculated. The expression is: ; Where, It is the first in the supplemented medical information set. Messages With the User focus The semantic similarity between them is in the range of [0,1]; It is the first in the supplemented medical information set. Messages Semantic vector of It is the first in the supplemented medical information set. User focus Semantic vector of It is the first in the supplemented medical information set. Messages The two-norm of the semantic vector; It is the first in the supplemented medical information set. User focus point the two-norm of the semantic vector; is an index of information; is an index of user focus points; According to the semantic similarity, the content highly related to the user query intention is screened out, and the related medical entities and intention categories are labeled to obtain a screening and labeling result; The screening and labeling result is organized into a structured initial answer fragment according to the related medical entities, intention categories and semantic similarity.
[0052] S3.4, the expression of the initial answer fragment is optimized by the semantic understanding model, and the deep semantic is further enhanced to obtain a structured answer fragment.
[0053] It should be noted that the initial answer fragment is input into the semantic understanding model, the semantic understanding model performs word-by-word semantic vector analysis on each initial answer fragment, identifies the deep semantic information and context logical relationship in the initial answer fragment, and optimizes and reorganizes the medical entities, keywords and modifiers. Through semantic similarity calculation and context association enhancement, the parts with unclear expression or repeated information are merged and adjusted, while the consistency of medical entity categories and user query intention is maintained, and a structured answer fragment is output; It should also be noted that the training process of the semantic understanding model is as follows: by collecting medical question and answer pairs, clinical guideline texts and electronic medical record desensitization paragraphs, the text is segmented, standardized and medical entity labeled, the mapping relationship between the input text and the target semantic label is constructed, the loss between the input text features and the target label is calculated using supervised learning method, and the semantic representation parameters are iteratively adjusted through optimization algorithm, so that the semantic understanding model can capture the medical entities, context logic and deep semantic information in the text.
[0054] S3.5, the relevance, completeness and accuracy of the structured answer fragment are verified, and a preliminary answer fragment is generated.
[0055] It should be noted that according to the structured medical entity data and user query intention, the medical entities, keywords and semantic information contained in each structured answer fragment are compared with the preliminary medical information set, and the structured answer fragments that do not match the user query intention or have serious information missing are excluded; Each retained structured answer fragment is checked for medical knowledge, and the medical entity attributes, medication recommendations, examination or symptom descriptions are checked against verified clinical guidelines and medical literature, and the verification results and suspicious items are labeled; All structured answer fragments that pass the verification and cover the core needs of the user query are integrated to output a preliminary answer fragment.
[0056] S3.6, The answer synthesis intelligent agent accepts all preliminary answer fragments and performs unified processing on the preliminary answer fragments at the syntax and semantic levels. Through weighted fusion and structured adjustment, an optimized answer fragment set is generated.
[0057] It should be noted that the syntax level unification of each preliminary answer fragment includes unifying term expression, sentence structure and punctuation standard to ensure consistent text expression; The semantic level unification of each preliminary answer fragment adjusts the expression order and logical relationship by analyzing medical entities, intent categories and context association information to make the preliminary answer fragments internally and between them semantically coherent; The content of the preliminary answer fragments is integrated through a weighted fusion method, which integrates the importance, coverage and matching degree with the user query intent of each preliminary answer fragment to generate a fused structured content; The fused structured content is adjusted in structure, including classification and labeling of medical entities, keywords and intent categories, to form an optimized answer fragment set.
[0058] S3.7, The optimized answer fragment set is structured and processed to generate a preliminary medical answer report.
[0059] It should be noted that the optimized answer fragments in the optimized answer fragment set are unified and arranged into standardized fields. Optimized answer fragments with similar or repetitive content from different sources are merged, and parts with differences are marked for conflict and consistency verification. The optimized answer fragments are grouped and sorted according to intent categories to ensure logical coherence of the answers. The results are integrated into structured documents with strong readability and complete semantics under the premise of maintaining traceability information, and output as a preliminary medical answer report.
[0060] S4, Use the credibility calibration intelligent agent to evaluate the credibility of the preliminary medical answer report, generate a confidence score and evidence conflict level, and use a dynamic risk assessment strategy for multi-dimensional weighted fusion and risk pattern recognition to generate diversified disposal instructions.
[0061] It should be noted that the "credibility calibration intelligent agent" is responsible for verifying the evidence chain of each fragment in the preliminary medical answer, calculating the confidence level and risk stratification, and outputting the confidence score, evidence conflict level and diversified disposal instructions to determine whether to publish or enter manual review; By collecting the source information, content integrity and historical verification records of the preliminary medical answer report, a traceable evidence comparison table is established, and according to the reliability of the source, the integrity and consistency of the information of each preliminary answer fragment, the evaluation index is set to weight and grade the elements, the scores are aggregated according to the weighted rules, the confidence score is generated, the contradictions and uncertainties between the answer fragments are identified according to the preset conflict level standard, the elements such as source reliability, semantic consistency and context relevance are weighted and fused in multiple dimensions, and the risk assessment result is formed. The calibration and optimization are carried out through simulation test labeling data, and the credibility calibration intelligent agent is obtained; It should be noted that the evaluation index is set according to the source reliability, information integrity and information consistency of each preliminary answer fragment; The conflict level standard is set by comparing the information consistency and conflict points between different preliminary answer fragments.
[0062] S4.1, the credibility calibration intelligent agent receives the preliminary medical answer report, and matches the evidence source of each preliminary answer fragment, verifies the data consistency and accuracy of the preliminary answer fragment, and outputs the verified preliminary answer fragment and evidence source information.
[0063] It should be noted that the medical entities, keywords and related information are extracted from the preliminary answer fragment, and the corresponding original evidence is located in the multi-source medical information through the retriever, such as electronic medical record desensitization paragraph, clinical guideline, drug instruction or inquiry and answer pair. In the matching process, the evidence is classified and scored according to the source type, peer review / guideline level and release date; The matched evidence is compared with the medical entity information in the preliminary answer fragment to verify the accuracy and consistency of the disease, symptom, examination item, drug information and health management terms described in the preliminary answer fragment, including examination entity name, attribute, relationship and logical rationality; The verification result is labeled to determine the corresponding evidence source and verification state of each preliminary answer fragment, and the verified preliminary answer fragment and evidence source information are output.
[0064] S4.2, the conflict degree between the evidence sources is extracted from the evidence source information, and the evidence conflict level is generated for each preliminary answer fragment according to the conflict analysis.
[0065] It should be noted that all the evidence sources matched by each verified preliminary answer fragment are analyzed one by one, and the disease name, symptom description, examination item, drug information and health management term involved in each evidence source are compared; The comparison operation includes checking the attribute values, logical relationships, time information, and upper and lower concepts of each medical entity to determine whether there are inconsistent descriptions, attribute conflicts, or logical contradictions between the corresponding medical entities in different evidence sources; By using a conflict quantification method, the comparison results are converted into a numerical value that can represent the conflict intensity, and the conflict intensity value is output, for example, by calculating the proportion of attribute inconsistency or the degree of semantic mismatch; Associating a conflict intensity value with each verified preliminary answer fragment, and dividing the conflict degree of the evidence source into different levels through the conflict intensity threshold; It should also be explained that the conflict intensity threshold is determined by comparing the attributes, logic and semantic consistency of multiple evidence sources matched to each historical answer fragment, recording the conflict situations and number of conflicts between different evidence sources for each answer fragment, and collating the conflict distribution of all historical answer fragments, and analyzing the relationship between conflict frequency and answer fragment reliability.
[0066] S4.3. Calculate a confidence score for each validated preliminary answer segment based on the quality of evidence, data consistency, and level of evidence conflict.
[0067] It should be stated that the quality of evidence is obtained through a comprehensive assessment of the source reliability, information completeness, contextual relevance, and publication time of the matched evidence sources; Integrate the evidence quality, data consistency, and evidence conflict level to form a feature vector for each preliminary answer fragment; The feature vector set is input into the confidence calibrator to generate a quantitative confidence score for each verified preliminary answer fragment, which is expressed as: ; Where, It is The confidence score of the verified preliminary answer fragment is dimensionless and its value range can be normalized to [0, 1]. is the weight coefficient of the comprehensive evidence quality score; It is The comprehensive evidence quality score of each verified preliminary answer fragment is dimensionless and can be obtained by, for example, combining the source type, peer review level, guideline authority, and publication date; is the weight coefficient of data consistency score; It is The data consistency score of the verified preliminary answer segment is dimensionless and is calculated by checking the consistency of the entity, symptom, examination item and medication description of the preliminary answer segment with the evidence source; is the weight coefficient of the evidence conflict level; It is The evidence conflict level of the preliminary answer segment after verification is dimensionless, and can be represented by low, medium, and high levels corresponding to 0, 0.5, and 1. is an index of the preliminary answer segment after verification.
[0068] S4.4. The comprehensive credibility score of each preliminary answer segment is generated by weighted fusion of the numerical results of the confidence score and the evidence conflict level.
[0069] It should be noted that the confidence score of each preliminary answer segment is weighted according to the preset confidence weighting coefficient, so that the evidence quality and data consistency of different preliminary answer segments are reflected in the comprehensive evaluation; the evidence conflict level is numerically weighted, so that the preliminary answer segment with high conflict degree is automatically reduced in credibility in the comprehensive evaluation. The confidence score adjusted by the confidence weighting coefficient is combined with the evidence conflict level in order, so that each preliminary answer segment after verification obtains a comprehensive credibility score matching the evidence quality, data consistency, and conflict degree. It should be noted that the confidence weighting coefficient is obtained by analyzing the contribution of evidence quality, data consistency, and conflict level to the accuracy of the answer in historical verification data, and by calculating the relative importance ratio through statistics of the proportion and influence of each feature in successful answer segments.
[0070] S4.5. The comprehensive credibility score is weighted and fused in multiple dimensions using a dynamic risk assessment strategy, and the risk score of each preliminary answer segment is generated through risk pattern recognition.
[0071] It should be noted that the comprehensive credibility score of each preliminary answer segment is received, and the comprehensive credibility score is adjusted according to the weight relationship of different risk dimensions in the dynamic risk assessment strategy, so that the comprehensive credibility score reflects the correlation between evidence consistency, evidence conflict level, and comprehensive credibility in each risk dimension. The adjusted comprehensive credibility score is classified using risk pattern recognition rules, the preliminary answer segment with high comprehensive credibility score and good evidence consistency is marked as low risk, and the preliminary answer segment with low comprehensive credibility score or high evidence conflict level is marked as high risk, and the corresponding risk comprehensive credibility score of each preliminary answer segment is output.
[0072] S4.6. Different diversified disposal instructions are generated for each preliminary answer segment according to the risk score.
[0073] It should be noted that different diversified disposal instructions are assigned to each preliminary answer segment according to the high, medium, and low levels of the risk score of each preliminary answer segment.
[0074] S5. When the diversified disposition instruction is to allow release, a security compliance check is performed on the preliminary medical answer report, and a compliant medical answer is generated.
[0075] S5.1. The diversified disposition instruction is divided into pending instructions, prohibited release instructions, and allowed release instructions according to the risk score.
[0076] It should be noted that the risk score of each preliminary answer segment is sorted from low to high, and compared with the upper threshold and the lower threshold, the risk score is divided into low risk score, medium risk score and high risk score, the preliminary answer segment with low risk score and high evidence consistency is divided into allowed release instruction, the preliminary answer segment with medium risk score and certain evidence conflict is divided into pending instruction, and the preliminary answer segment with high risk score and high evidence conflict level is divided into prohibited release instruction. It should also be noted that by analyzing the risk score distribution of historical preliminary answer segments, the median or a certain percentage (such as the top 30%) of the segments with low risk scores is used as the lower threshold. By analyzing the high risk score distribution of historical preliminary answer segments, the median or a certain percentage (such as the top 30%) of the segments with high risk scores is used as the upper threshold.
[0077] S5.2. When the diversified disposition instruction is pending, the preliminary medical answer report is not released, and the preliminary medical answer report is marked as pending.
[0078] It should be noted that when the diversified disposition instruction is divided into pending, the corresponding preliminary medical answer report is marked as "pending" in the internal record to prevent it from being directly released or displayed to the user; The risk score, evidence conflict level and comprehensive reliability information of each preliminary answer segment of the preliminary medical answer report are attached together for subsequent automatic review; The pending report is included in the pending queue to trigger the subsequent review process.
[0079] S5.3. When the diversified disposition instruction is prohibited release, the preliminary medical answer report is prohibited release, and the reason or risk warning is recorded.
[0080] It should be noted that when the diversified disposition instruction is divided into prohibited release, the preliminary medical answer report is immediately prohibited from being displayed or released to the user, and the preliminary medical answer report is marked as "prohibited release" in the internal record, and the risk score, evidence conflict level and comprehensive reliability information of each preliminary answer segment are attached; The specific reasons for prohibiting release, such as high evidence conflict, low reliability or insufficient data consistency, are recorded in detail, and a risk warning is generated to trigger the subsequent review and improvement process.
[0081] S5.4、When the diversified treatment instruction is to allow release, the legality, medical accuracy and potential risks of the contents in the preliminary medical answer report are verified item by item, and after verification, a disclaimer is automatically added to the preliminary medical answer report, and a compliant medical answer is generated.
[0082] It should be noted that when the diversified treatment instruction is to allow release, the credibility calibration agent sequentially checks each preliminary answer segment in the preliminary medical answer report item by item, and after all the checks and verifications are passed, the disclaimer text is matched and attached to the preliminary medical answer report content to generate the final compliant medical answer, so that the legality, medical accuracy and risk information of each preliminary answer segment are clearly marked and guaranteed. It should also be noted that the disclaimer text is obtained from the safety requirements and potential risks of information use in medical Q&A, and the content includes clauses on the reference nature of information, usage restrictions and precautions, and is matched and attached to the structured content of the preliminary medical answer report after matching, so that the final compliant medical answer clearly prompts the user of each answer reference and potential risk when released.
[0083] The embodiment also provides a computer device suitable for the case of the medical health Q&A method based on an agent, including a memory and a processor; the memory is used to store computer executable instructions, and the processor is used to execute the computer executable instructions to realize the medical health Q&A method based on an agent as proposed in the above embodiment.
[0084] The computer device can be a terminal, and the computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operating system and the computer program in the non-volatile storage medium to run. The communication interface of the computer device is used to communicate with external terminals in a wired or wireless manner. The wireless manner can be achieved through WIFI, operator network, NFC (near field communication) or other technologies. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer overlaid on the display screen, or a key, trackball or touchpad arranged on the shell of the computer device. In addition, the input device can be an external keyboard, touchpad or mouse, etc.
[0085] The embodiment also provides a storage medium on which a computer program is stored, the program being executed by a processor to implement the method for implementing the medical health question and answer based on the agent proposed in the above embodiment; the storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as a static random access memory (SRAM), an electrically erasable programmable read-only memory (EEPROM), an erasable programmable read-only memory (EPROM), a programmable read-only memory (PROM), a read-only memory (ROM), a magnetic memory, a flash memory, a magnetic disk, or an optical disk.
[0086] To sum up, the present application realizes accurate task decomposition and answer generation based on individual differences by: the master agent generates agent cooperation instructions in combination with dynamic dialogue context, guarantees the continuity and individualization of the question and answer results; at the same time, the credibility calibration agent performs evidence source matching and conflict analysis on the preliminary answer, and generates diversified disposal instructions in combination with a dynamic risk assessment strategy, realizes multi-dimensional control of the credibility and safety of the medical answer, and finally achieves the beneficial effects of providing personalized medical question and answer, and ensuring information authenticity, reliability, and compliance and safety.
[0087] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present application but not limit the present application. Although the present application has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present application can be modified or replaced equivalently without departing from the spirit and scope of the technical solutions of the present application, and all should be covered in the scope of the claims of the present application.
Claims
1. An agent-based medical health question-answering method, characterized by: include, Receive medical and health questions input by users, use query understanding agents to parse medical and health questions, identify medical entities, determine user query intent, and generate intent analysis reports; The master agent receives the intent parsing report and accesses the dynamic dialogue context pool. Based on the intent parsing report and the status of the dynamic dialogue context pool, it generates agent collaboration instructions. Using agent collaboration instructions to drive each professional agent, it retrieves information from the corresponding medical knowledge base and generates preliminary answer fragments. The answer synthesis agent then fuses all preliminary answer fragments to generate a preliminary medical answer report. A credibility calibration agent is used to evaluate the credibility of the preliminary medical answer report, generate a confidence score and evidence conflict level, and use a dynamic risk assessment strategy to perform multi-dimensional weighted fusion and risk pattern recognition to generate diversified disposal instructions. When the diversified disposal instructions are allowed to be released, a security compliance check is performed on the preliminary medical answer report to generate a compliant medical answer.
2. The agent-based medical health question-answering method according to claim 1, wherein: The medical and health issues include disease-related issues, symptom consultation, examination and medication issues, health management and preventive care issues.
3. The agent-based medical health question-answering method according to claim 2, wherein: The query understanding agent is used to analyze medical and health issues, identify medical entities and determine the user's query intent, and generate an intent analysis report. The specific steps are as follows: Perform denoising, word segmentation, and syntactic analysis on medical and health issues, remove irrelevant information, punctuation, and redundant vocabulary, and output standardized text data; Utilize query understanding agents to perform medical entity recognition and intent classification on standardized text data, obtain medical entities, and label the medical entity categories. Based on the user's context and medical entity categories, a classification algorithm is used to determine the user's query intent, obtaining structured medical entity data and the user's query intent. Semantically match structured medical entity data with user query intent, and infer user specific needs based on the user's context to generate an intent analysis report.
4. The agent-based medical health question-answering method according to claim 3, wherein: The master agent receives the intent analysis report and accesses the dynamic dialogue context pool, and generates the agent collaboration instruction according to the intent analysis report and the status of the dynamic dialogue context pool. The specific steps are as follows: Use the master agent to receive the intent parsing report and access the dynamic conversation context pool through the interface to obtain the conversation history and user health data related to the current query and obtain dynamic conversation context information; Combine and analyze the structured medical entity data in the intent analysis report with the dynamic conversation context information to determine the user's current specific needs and obtain comprehensive needs analysis results; According to the results of comprehensive demand analysis, by identifying the core needs of user queries, determining the query processing task goals, and decomposing the query processing tasks into multiple subtasks, intelligent agent collaboration instructions are generated.
5. The agent-based medical health question-answering method according to claim 4, wherein: The above-mentioned intelligent agent collaborative instructions are used to drive each professional intelligent agent to retrieve information from the corresponding medical knowledge base and generate preliminary answer fragments. The specific steps are as follows: The agent collaboration instructions drive each professional agent to search for information from the corresponding medical knowledge base for different types of medical and health problems and obtain medical search result data; Organize and filter medical search result data to obtain a preliminary medical information set; Use structured medical entity data to supplement and integrate the preliminary medical information set, and match the structured medical entity data with the user's specific needs based on the user's query intent to generate initial answer fragments; Optimize the representation of the initial answer fragment through the semantic understanding model, and further enhance the deep semantics to obtain structured answer fragments; The structured answer snippets are verified for relevance, completeness, and accuracy to generate preliminary answer snippets.
6. The agent-based medical health question-answering method according to claim 5, wherein: The answer synthesis agent fuses all the preliminary answer fragments to generate a preliminary medical answer report. The specific steps are as follows: The answer synthesis agent accepts all preliminary answer fragments, processes them uniformly at the grammatical and semantic levels, and generates an optimized answer fragment set through weighted fusion and structural adjustment. The optimized answer fragment set is structured and a preliminary medical answer report is generated.
7. The agent-based medical health question-answering method according to claim 6, wherein: The credibility calibration agent is used to evaluate the credibility of the preliminary medical answer report, generate confidence scores and evidence conflict levels, and use dynamic risk assessment strategies to perform multi-dimensional weighted fusion and risk pattern recognition to generate diversified disposal instructions. The specific steps are as follows: The credibility calibration agent receives the preliminary medical answer report and performs evidence source matching on each preliminary answer segment, verifies the data consistency and accuracy of the preliminary answer segment, and outputs the verified preliminary answer segment and evidence source information; Extracting the conflict degree between the evidence sources from the evidence source information, and generating an evidence conflict level for each preliminary answer fragment based on the conflict analysis; Calculate a confidence score for each validated preliminary answer segment based on the quality of evidence, data consistency, and evidence conflict levels; By weighting and fusing the numerical results of the confidence score and the evidence conflict level, a comprehensive credibility score of each preliminary answer fragment is generated; Using dynamic risk assessment strategies, we conduct multi-dimensional weighted fusion of comprehensive credibility scores and generate risk scores for each preliminary answer segment through risk pattern recognition. Generate different diversified disposition instructions for each preliminary answer segment based on the risk score.
8. The agent-based medical health question-answering method according to claim 7, wherein: When the diversified disposal instruction is allowed to be released, the preliminary medical answer report is checked for safety and compliance, and a compliant medical answer is generated. The specific steps are as follows: Diversified disposal instructions are classified into pending instructions, prohibited instructions and permitted instructions according to risk scores; When the Diversified Disposition Instruction is pending, the Preliminary Medical Answer Report will not be issued and the Preliminary Medical Answer Report will be marked as pending; When the diversified disposal instruction prohibits release, the preliminary medical answer report prohibits release and generates a risk warning; When the diversified disposal instruction allows release, the legality, medical accuracy and potential risks of the contents in the preliminary medical answer report are verified item by item. After the verification is passed, a disclaimer is automatically added to the preliminary medical answer report to generate a compliant medical answer.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the agent-based medical health question-answering method according to any one of claims 1 to 8 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the agent-based medical health question-answering method according to any one of claims 1 to 8 are implemented.
Citation Information
Patent Citations
Intelligent agent-based medical question and answer method and system and electronic equipment
CN118152544A
Intelligent question and answer method and system, intelligent equipment and storage medium
CN120031125A
Medical data analysis method driven by large-model multi-agent framework
CN120473174A
System and method for generating database queries based on natural language input
US20250200027A1
Cited By
Interaction quality guarantee method for improving question and answer reliability of large language model
CN121388123A
An interaction quality guarantee method for improving reliability of large language model question and answer
CN121388123B
Children brain health intelligent question and answer method and system fused with multi-modal data
CN121525814A
Medical information processing method and device, storage medium and program product
CN121964179A
Auxiliary decision-making method and device for optimal wax block under medical advice of molecular pathology special examination
CN122117463A