A medical question answering method and system based on diverse retrieval and evidence-based reasoning

By employing diverse retrieval and evidence-based reasoning methods, the weaknesses of large language models in individualized information alignment and evidence integration in medical question answering were addressed, resulting in the generation of highly accurate and reliable medical question answering responses.

CN121278068BActive Publication Date: 2026-02-27QILU UNIVERSITY OF TECHNOLOGY (SHANDONG ACADEMY OF SCIENCES)
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202511841305.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-12-09
Publication Date
2026-02-27
Estimated Expiration
2045-12-09

AI Technical Summary

Technical Problem

Large language models suffer from insufficient alignment of individualized information, weak evidence integration, and fragility in the reasoning process in the field of medical question answering, resulting in insufficient accuracy and reliability of answers.

Method used

Employing diverse retrieval and evidence-based reasoning methods, a variety of query sets are generated through multi-dimensional semantic expansion. Anchor knowledge extraction mechanism is used to accurately locate key clinical information, and multiple rounds of verification and correction are conducted through iterative reasoning mechanism to form a traceable reasoning chain.

Benefits of technology

It significantly improved the retrieval coverage of medical evidence and the accuracy of answers, meeting the reliability and interpretability requirements of clinical review and enhancing the overall performance of medical question answering.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121278068B_ABST
    Figure CN121278068B_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of natural language processing, and provides a medical question and answer method and system based on diversified retrieval and evidence-based reasoning, which comprises the following steps: obtaining a diversified query set and a candidate answer set representing patient electronic health record information and a medical question; performing multi-path parallel retrieval on the generated diversified query set to obtain diversified retrieval segments; fusing the obtained diversified retrieval segments to obtain a comprehensive retrieval evidence set; extracting anchor knowledge related to the medical question from the obtained comprehensive retrieval evidence set; performing multi-round self-reflection reasoning on the obtained anchor knowledge and comprehensive retrieval evidence set to obtain an iterative reasoning chain; generating a patient medical question and answer answer based on the iterative reasoning chain and the candidate answer set to complete the medical question and answer based on diversified retrieval and evidence-based reasoning.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of natural language processing, and particularly relates to a medical question and answer method and system based on diversified retrieval and evidence-based reasoning. BACKGROUND

[0002] The statements in this section merely provide background information related to the present application and do not necessarily constitute prior art.

[0003] Large language models have made significant progress in the field of natural language processing and have shown strong capabilities in general domain question answering tasks. However, in the medical question answering field with high requirements for safety, accuracy and reliability, the application of large language models still faces severe challenges. Medical answers not only require correctness, but also need to have traceable authoritative evidence sources and be highly consistent with the patient's specific individualized clinical background (such as electronic health records). If there is a lack of stable anchoring of reliable information sources, the inherent "hallucination" problem of large language models and the possible errors or outdated information in their parameterized knowledge can easily mislead clinical reasoning and produce inaccurate or even harmful answers, limiting their practical application in real clinical environments.

[0004] To alleviate the above problems, the retrieval-augmented generation framework provides factual support for large language models by retrieving relevant evidence from external knowledge bases before performing generation tasks, which has become a promising solution. The typical retrieval-augmented generation process concatenates medical questions with lengthy electronic health records for passage retrieval, and then uses the retrieved information for one-time answer generation. However, this traditional design has some limitations that hinder its further performance improvement. First, the patient's individual context is not well aligned: the heterogeneous and lengthy electronic health records contain a large amount of information, but the key clinical details directly related to the current question are often submerged or ignored. Directly using the entire electronic health record for retrieval will introduce significant noise, while simple blocking processing will disrupt the coherence of the clinical narrative, causing the retrieved evidence to be disconnected from the patient's individual situation and making it difficult to support individualized and accurate retrieval and reasoning. Second, the retrieval coverage and evidence integration are weak: a single query input cannot capture all the semantic aspects involved in the medical question, resulting in limited retrieval recall. At the same time, the retrieved medical evidence fragments differ greatly in relevance and information density, and existing methods lack effective mechanisms to filter and integrate these fragmented passages. Large language models have difficulty in deeply integrating these scattered evidence when generating. Third, the reasoning process is fragile and unreliable: the one-time generation of reasoning chains lacks iterative verification and self-correction steps. This makes it difficult to correct logical flaws, disconnected evidence or redundant explanations in the reasoning process in a timely manner, and irrelevant or incorrect content is easily fixed in the final answer, making it difficult to guarantee the accuracy and reliability of the answer.

[0005] These problems can be addressed from different perspectives by search enhancement generation variants; for example, on the retrieval side, improve recall rate through query expansion; on the reasoning side, align the reasoning chain by rearranging the evidence. However, these methods usually only focus on the improvement of a single link and fail to systematically achieve the deep synergy between patient clinical fine-grained information as the anchor point and the precise retrieval and evidence-constrained robust reasoning. SUMMARY

[0006] To solve the above problems, the present application provides a medical question and answer method and system based on diversified retrieval and evidence-based reasoning, which combines deep retrieval with patient context awareness and robust reasoning with evidence-based iteration to overcome the limitations of the prior art and improve the accuracy and reliability of medical question and answer answers.

[0007] According to some embodiments, the first aspect of the present application provides a medical question and answer method based on diversified retrieval and evidence-based reasoning, which adopts the following technical solutions:

[0008] A medical question and answer method based on diversified retrieval and evidence-based reasoning, comprising:

[0009] Obtaining a diversified query set and a candidate answer set representing patient electronic health record information and a medical question;

[0010] Performing multi-path parallel retrieval on the generated diversified query set to obtain diversified retrieval fragments;

[0011] Fusing the obtained diversified retrieval fragments to obtain a comprehensive retrieval evidence set;

[0012] Extracting anchor knowledge related to the medical question from the obtained comprehensive retrieval evidence set;

[0013] Performing multi-round self-reflection reasoning on the obtained anchor knowledge and comprehensive retrieval evidence set to obtain an iterative reasoning chain;

[0014] Generating a patient medical question and answer answer based on the iterative reasoning chain and the candidate answer set to complete the medical question and answer based on diversified retrieval and evidence-based reasoning.

[0015] As a further technical limitation, in the process of obtaining a diversified query set representing patient electronic health record information and a medical question, a medical question, patient electronic health record information and a candidate answer are obtained, and a large language model is used to perform multi-dimensional expansion on the semantic of the obtained medical question, patient electronic health record information and candidate answer to generate a diversified query set.

[0016] Further, the multi-dimension expansion at least includes feature expansion, title expansion, and content expansion; wherein, based on the feature expansion, key attributes and indicators in the patient electronic health record information are refined to generate semantic question sentences; based on the title expansion, title type retrieval sentences are generated to enhance the retrieval pertinence; and the content expansion uses external medical background knowledge to expand the semantic range and improve the recall rate.

[0017] As a further technical limitation, based on the conclusion of the iterative reasoning chain and the logic matching, the candidate answers are compared item by item; when the candidate answers are consistent with the conclusion of the reasoning chain, they are determined as the final answers, and an answer reasoning chain record containing the mapping relationship of the reasoning chain and the evidence chain is generated.

[0018] As a further technical limitation, according to the obtained comprehensive retrieval evidence set and anchor knowledge, an initial reasoning chain is generated, and based on the self-reflection mechanism, the generated initial reasoning chain is modified multiple times; when the initial reasoning chain does not meet the modification determination standard, revision iteration is triggered, and the generated initial reasoning chain is subjected to multiple rounds of self-verification and optimization until all constraint conditions are met or the maximum number of iterations is reached, obtaining an iterative reasoning chain; wherein, the modification determination standard at least includes evidence support, logical consistency and expression refinement, the evidence support is that each reasoning step must be supported in the evidence set or anchor knowledge; the logical consistency is that the cause and effect relationship before and after the reasoning step is self-consistent, without contradiction and jump; and the expression refinement is that the reasoning content should be free of redundancy or ambiguity and irrelevant information.

[0019] As a further technical limitation, in the process of extracting anchor knowledge, key clinical information related to the problem and the retrieval evidence is extracted from the patient electronic health record, and patient-specific anchor knowledge is established based on the extracted key clinical information; specifically, the obtained comprehensive retrieval evidence set is received, a large language model is called to perform knowledge extraction operation, the input medical problem is taken as the task target, the retrieved medical evidence fragment is taken as the background knowledge, the patient electronic health record information is screened and extracted, the clinical characteristics, diagnosis conclusion, test indicators and medication information related to the current problem are obtained as key information, and the obtained key information is taken as anchor knowledge.

[0020] According to some embodiments, the second aspect of the present application provides a medical question and answer system based on diversified retrieval and evidence-based reasoning, which adopts the following technical solutions:

[0021] A medical question and answer system based on diversified retrieval and evidence-based reasoning, comprising:

[0022] An acquisition module configured to acquire a diversified query set representing patient electronic health record information and medical questions and a candidate answer set;

[0023] a retrieval module configured to perform multi-path parallel retrieval on the generated diversified query set to obtain diversified retrieval snippets;

[0024] a fusion module configured to fuse the obtained diversified retrieval snippets to obtain a comprehensive retrieval evidence set;

[0025] an extraction module configured to extract anchor knowledge related to the medical question from the obtained comprehensive retrieval evidence set;

[0026] a reasoning module configured to perform multi-round self-reflective reasoning on the obtained anchor knowledge and the comprehensive retrieval evidence set to obtain an iterative reasoning chain;

[0027] a question and answer module configured to generate a patient medical question and answer answer according to the iterative reasoning chain and a candidate answer set, to complete medical question and answer based on diversified retrieval and evidence-based reasoning.

[0028] According to some embodiments, a third aspect of the present application provides a computer readable storage medium, adopting the following technical solutions:

[0029] A computer readable storage medium, having a program stored thereon, which, when executed by a processor, implements the steps in the medical question and answer method based on diversified retrieval and evidence-based reasoning according to the first aspect of the present application.

[0030] According to some embodiments, a fourth aspect of the present application provides an electronic device, adopting the following technical solutions:

[0031] An electronic device, comprising a memory, a processor, and a program stored in the memory and running on the processor, wherein the processor implements the steps in the medical question and answer method based on diversified retrieval and evidence-based reasoning according to the first aspect of the present application when executing the program.

[0032] According to some embodiments, a fifth aspect of the present application provides a computer program product, adopting the following technical solutions:

[0033] A computer program product, comprising software code, wherein the program in the software code performs the steps in the medical question and answer method based on diversified retrieval and evidence-based reasoning according to the first aspect of the present application.

[0034] Compared with the prior art, the present application has the following beneficial effects:

[0035] The present application generates a diversified query set through multi-dimensional semantic expansion, solves the problem of insufficient coverage of single query semantics, thereby significantly improving the retrieval coverage of relevant medical evidence; through an anchor knowledge extraction mechanism, the retrieval evidence is used as a guide to accurately locate key clinical information from lengthy electronic health records, effectively improving the relevance of the retrieval results to the individual characteristics of patients; through iterative optimization of query expansion and knowledge extraction, the retrieval process is self-enhanced, forming a closed-loop mechanism that improves retrieval accuracy round by round, significantly improving evidence quality; through a self-reflective iterative reasoning mechanism, the reasoning chain is verified and corrected for multiple rounds, solving the problems of logical inconsistency and insufficient evidence support in the reasoning process, ensuring the reliability of the final answer; by constructing a traceable reasoning chain, the answer generation process is completely transparent, achieving the required high explainability in the medical scene and meeting the strict requirements of clinical audits; through the two-stage framework of deep retrieval and robust reasoning deep coupling, the limitations of existing retrieval enhancement generation methods in patient alignment, evidence integration and reasoning robustness are systematically solved, and breakthrough performance is achieved on multiple authoritative medical question and answer benchmarks. BRIEF DESCRIPTION OF DRAWINGS

[0036] The accompanying drawings, which form a part of this specification, are included to provide a further understanding of the present embodiments and are incorporated in and constitute a part of this specification. The embodiments illustrated in the drawings and their description are presented to explain the present embodiments and are not intended to limit the present embodiments.

[0037] Figure 1 Flowchart of the medical question and answer method based on diversified retrieval and evidence-based reasoning in the first embodiment of the present application;

[0038] Figure 2 Structure schematic diagram of the medical question and answer method based on diversified retrieval and evidence-based reasoning in the first embodiment of the present application;

[0039] Figure 3 Flowchart of the semantic diversified question generation in the first embodiment of the present application;

[0040] Figure 4 Flowchart of the multi-path retrieval and fusion in the first embodiment of the present application;

[0041] Figure 5 Structure block diagram of the medical question and answer system based on diversified retrieval and evidence-based reasoning in the second embodiment of the present application. DETAILED DESCRIPTION

[0042] The present application will be further described below in conjunction with the drawings and embodiments.

[0043] It should be noted that the following detailed description is exemplary in nature and is intended to provide further description of the application. Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs.

[0044] It is to be understood that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of example embodiments in accordance with the present application. As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and / or "comprising," when used in this specification, specify the presence of stated features, steps, operations, elements, components, and / or groups thereof, but do not preclude the presence or addition of one or more other features, steps, operations, elements, components, and / or groups thereof.

[0045] In the present application, the terms such as "upper", "lower", "left", "right", "front", "back", "vertical", "horizontal", "side", "bottom" and the like indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, which is only a relationship word determined for the purpose of describing the structural relationship of the components or elements of the present application, and cannot be understood as a limitation of the present application.

[0046] In the present application, the terms such as "fixedly connected", "connected", "connected" and the like should be understood broadly, which means that it can be fixedly connected, integrally connected or detachably connected; it can be directly connected or indirectly connected through an intermediate medium. For relevant researchers or technicians in the art, the specific meaning of the above terms in the present application can be determined according to the specific circumstances, and cannot be understood as a limitation of the present application.

[0047] The embodiments in the present application and the features in the embodiments can be combined with each other without conflict.

[0048] Embodiment one

[0049] The embodiment one of the present application introduces a medical question and answer method based on diversified retrieval and evidence-based reasoning.

[0050] As shown in Figure 1 A medical question and answer method based on diversified retrieval and evidence-based reasoning, comprising:

[0051] Obtaining a diversified query set and a candidate answer set representing patient electronic health record information and medical questions;

[0052] Performing multi-path parallel retrieval on the generated diversified query set to obtain diversified retrieval segments;

[0053] Fusing the obtained diversified retrieval segments to obtain a comprehensive retrieval evidence set;

[0054] extract anchor knowledge related to the medical problem from the obtained comprehensive retrieval evidence set;

[0055] perform multi-round self-reflection reasoning on the obtained anchor knowledge and comprehensive retrieval evidence set to obtain an iterative reasoning chain;

[0056] generate a patient medical question and answer based on the iterative reasoning chain and the candidate answer set to complete the medical question and answer based on diverse retrieval and evidence-based reasoning.

[0057] The medical question and answer method based on diverse retrieval and evidence-based reasoning in this embodiment adopts an architecture diagram as shown in FIG. 1, that is, it includes an input diversification module, an anchor knowledge extraction module, an iterative reasoning module, and an answer generation module. Figure 2

[0058] In this embodiment, the input diversification module is used to receive a medical question, a patient electronic health record, and a candidate answer set as input data, and to reconstruct the input data in a diversified manner to improve the coverage of retrieval; specifically, a large language model performs multi-dimensional expansion on the input data according to semantics to generate a diversified query set. The multi-dimensional expansion includes feature expansion (that is, extracting key attributes and indicators in the medical record to generate refined semantic questions), title expansion (restating the generated title retrieval sentences to enhance the relevance of retrieval), and content expansion (using external medical background knowledge to expand the semantic range and improve the recall rate). In this embodiment, the obtained diversified query set is input into a medical field dense retrieval model MedCPT to perform retrieval in an authoritative medical corpus to obtain Top-k relevant medical knowledge fragments to form a first round of evidence set.

[0059] In this embodiment, the formed evidence set is sent to the anchor knowledge extraction module to extract key clinical information highly related to the question and retrieval evidence from the patient electronic health record to establish patient-specific anchor knowledge to improve the alignment of retrieval relevance and individualized characteristics of reasoning; wherein the anchor knowledge extraction module receives the retrieval results output by the input diversification module, calls a large language model to perform knowledge extraction operations, takes the input medical question as the task target, and takes the retrieved medical evidence fragments as background knowledge to filter and extract the patient electronic health record to obtain key information such as clinical characteristics, diagnosis conclusions, test indicators, and medication information directly related to the current question as anchor knowledge. The extracted anchor knowledge is spliced with the original question to form new optimized query input data, which is input into the input diversification module again to perform the second round of retrieval. Multi-round iteration can be performed until the retrieval evidence relevance score is stable or the preset iteration round number is reached; finally, the optimized evidence set and patient anchor knowledge are passed to the iterative reasoning module.

[0060] ​The iterative reasoning module in this embodiment is used to perform multiple rounds of logical reasoning based on the evidence set and anchor knowledge, and generate a final reasoning chain that conforms to the logic of medical knowledge; wherein the iterative reasoning module receives the final evidence set and anchor knowledge generated from the previous two modules, and generates an initial reasoning chain. Subsequently, the self-reflection mechanism built-in the module corrects the reasoning chain multiple times, and the correction mechanism includes three judgment criteria, including evidence support (i.e. each reasoning step must find support in the evidence set or anchor knowledge); logical consistency (i.e. the cause-and-effect relationship before and after the reasoning step is self-consistent, without contradiction and jump); and expression refinement (i.e. the reasoning content should be free of redundancy or ambiguity and irrelevant information). When the initial reasoning chain does not meet the above criteria, the module triggers revision iterations, and the reasoning chain is verified and optimized multiple times until all the constraints are met or the maximum number of iterations is reached.

[0061] The iterative reasoning module in this embodiment outputs a reasoning chain that meets the consistency criteria, and passes it to the answer generation module. The answer generation module is used to generate a final answer based on the final reasoning chain output by the iterative reasoning module and the candidate answer set. First, the answer generation module receives the final reasoning chain and the candidate answer set, and based on the conclusion and logic matching of the reasoning chain, it compares the candidate answers one by one. When the candidate answer is consistent with the conclusion of the reasoning chain, it is determined as the final answer, and the corresponding answer reasoning chain record is generated. This module outputs the mapping relationship between the reasoning chain and the evidence chain to support traceability and medical audit requirements. The final answer and explanation record will be the output result of the system.

[0062] As shown in Figure 3 , this embodiment uses the input diversification module to expand the semantic space of the input, and improves the coverage of subsequent retrieval through multi-perspective query; the model receives the medical question and the patient's electronic health record as input, and uses the large language model to generate a diversified query set in the feature dimension, content dimension and title dimension . Specifically:

[0063] (1) Multi-dimensional prompt-driven generation

[0064] The model uses pre-defined prompt strategies to drive the LLM to perform semantic expansion from three different angles:

[0065] a. Feature dimension: This dimension aims to deconstruct and refine the core medical semantic elements of the input. The model uses specific prompt words to guide it to extract the key details implied or explicit in the input.

[0066] The model uses the following prompt words:

[0067] "Please provide 4 key points for this input. Each key point should succinctly describe one detail. Format as follows: A. "Key Detail 1" B. "Key Detail 2" C. "Key Detail 3" D. "Key Detail 4".

[0068] For example, for input:

[0069] "Electronic Health Record": "A 65-year-old male patient was brought to the emergency department 30 minutes after the onset of chest pain. He has a history of hypertension and asthma. His current medications include atorvastatin, lisinopril, and albuterol inhaler. He is pale and sweating profusely. Pulse is 114 beats per minute and…", "Question": "Which medication should be added to this patient's medication regimen, in addition to aspirin?"

[0070] "Model Output:

[0071] "A. History of asthma

[0072] B. ST segment depression with elevated troponin (non-ST elevation myocardial infarction, NSTEMI)

[0073] C. History of percutaneous coronary angioplasty (PTCA)

[0074] D. Left ventricular ejection fraction preserved (58%)"

[0075] b. Content Dimension: This dimension aims to enrich the context of the input and generate general medical knowledge related to the core question, to make up for the lack of conceptual breadth in the original query.

[0076] The model uses the following prompt words:

[0077] "Please provide some knowledge points that may answer the above question. Please only provide these knowledge points."

[0078] Model Output:

[0079] "Acute Coronary Syndrome (ACS) and Secondary Prevention: After an ACS event (such as positive troponin and ECG changes), the goal of drug therapy shifts to "secondary prevention" to reduce the risk of future cardiovascular events (such as recurrent myocardial infarction, stroke, death). The standard dual antiplatelet regimen is the cornerstone of treatment after percutaneous coronary intervention (PCI, including angioplasty). This regimen usually includes aspirin and a P2Y12 receptor antagonist.

[0080] Standard dual antiplatelet therapy (DAPT) after PCI: Aspirin: taken long-term. P2Y12 inhibitors: taken for a specific period after stent implantation (usually 6-12 months) to prevent stent thrombosis. The three main options are: Clopidogrel: a prodrug; is the standard choice, but there are differences in patient response due to genetic polymorphisms. Prasugrel: more potent and stable platelet inhibition than clopidogrel. It is contraindicated in patients with a history of stroke or transient ischemic attack (TIA) and is not recommended for patients over 75 years of age. Ticagrelor: a reversible direct inhibitor of the P2Y12 receptor; more potent than clopidogrel. It needs to be taken twice a day. The main side effect is dyspnea (shortness of breath), which can be a problem for patients with underlying lung diseases such as asthma…

[0081] This provides a deeper conceptual association and knowledge context for the retrieval model.

[0082] c. Title dimension: This dimension aims to establish a structured association between the input and the authoritative knowledge system, generating relevant medical literature, clinical guidelines, or textbook chapter titles.

[0083] The model uses the following prompt:

[0084] "Please generate some reference literature titles that may be related to the above question. Please only provide the titles in the format ['Title1', 'Title2', …]."

[0085] Model output:

[0086] "[‘2014 AHA / ACC Non-ST Segment Elevation Acute Coronary Syndrome Patient Management Guidelines’, ‘2016 ACC / AHA Coronary Artery Disease Patient Dual Antiplatelet Therapy Duration Guidelines Update’, …, ‘Long-term medication regimen after percutaneous coronary intervention’]."

[0087] This dimension improves the model's matching rate with structured medical literature.

[0088] (2) Multi-path retrieval and fusion

[0089] As shown in Figure 4 , based on the generated diverse query set , the system performs multi-path parallel retrieval and fusion of results to form a comprehensive and high-quality evidence set.

[0090] 1) Dense semantic retrieval

[0091] Use the biomedical field-specific retriever MedCPT and the FAISS vector retrieval library to match the query vectors of each dimension with the corpus efficient similarity matching of document vectors encoded by MedCPT; through the FAISS approximate nearest neighbor search algorithm, millisecond-level retrieval response is realized, and the retrieval efficiency is significantly improved; the vector inner product calculation of FAISS, the query vector and the semantic relevance score between the document vector are calculated as follows:

[0092] wherein, and are the vector representations generated by the query encoder and the document encoder of MedCPT respectively, and the larger the inner product value is, the stronger the semantic relevance is.

[0093] 2) Multi-path retrieval strategy

[0094] In order to balance the breadth (covering different semantic aspects) and depth (focusing on core relevant evidence) of retrieval, the system adopts a differentiated retrieval quota strategy for queries in three dimensions, i.e., semantic dimension queries are allocated of the retrieval quota, aiming to ensure high-precision evidence related to core medical entities and attributes; content dimension and title dimension queries are each allocated of the retrieval quota, to supplement background knowledge and associate with authoritative structured literature.

[0095] 3) Result fusion and sorting

[0096] After retrieval is completed, the preliminary retrieval result sets , and of the three dimensions are merged. For text segments that are hit in multiple dimensions, the maximum score fusion strategy is adopted to determine their final relevance ; through relevance, it is ensured that the score of each text segment is the highest value among all its dimension scores, effectively avoiding the problem that high-relevance segments are underestimated due to different query perspectives. Finally, all segments are sorted in descending order according to , forming the comprehensive retrieval evidence set and its corresponding score set of the current round, i.e. .

[0097] As shown in Figure 2 , the embodiment aims to use the anchor knowledge extraction module to accurately extract anchor knowledge highly relevant to the current problem from lengthy patient electronic health records, improving the relevance of retrieval evidence and the alignment of individualized characteristics in reasoning.

[0098] In each iteration round , the retrieval evidence set of the current round, the original question ​and patient electronic health records co-inputting large language models (LLMs) through preset prompt templates performing knowledge extraction operations. The process is formulated as ; where, is the anchor knowledge extracted in this round, and the prompt is used to strictly constrain the output of the LLM, focusing on the extraction of key information. The template is structured as follows, guiding the model to perform precise extraction by providing structured context:

[0099] "Here are the relevant sources of knowledge:

[0100] ;

[0101] Here is the electronic health record:

[0102] ;

[0103] Here is the question:

[0104] ;

[0105] Please analyze and extract the key information related to this question from the electronic health record. Please provide a brief and concise description for each piece of information. For example, "Patient age: 39 years old (middle-aged)" "Symptoms: fever, chills, left lower abdominal pain" "Vital signs: high fever (39.1°C or 102.3°F), tachycardia (pulse 126 beats per minute), tachypnea (respiratory rate 28 breaths per minute), and low blood pressure (blood pressure 80 / 50 mmHg)" "Physical examination results: mucous and purulent discharge from the cervical os, left adnexal tenderness" "Laboratory test results: low platelet count (14,200 / mm³), elevated D-dimer (965 ng / mL)" "Phenol test results: identification of a phosphorylated N-acetylglucosamine dimer with 6 fatty acids attached to the polysaccharide side chain." Please provide only the descriptions. Here are the descriptions: "

[0106] where {{context}}, {{ehr}}, and {{question}} are replaced with , and ; this design guides the model to filter out irrelevant content based on external medical evidence, directly related to the question from the patient's electronic health record.

[0107] To achieve self-enhancement of knowledge extraction, the system uses an iterative mechanism. After each round of extraction is completed, the anchor knowledge With the original question Perform splicing to form a new input with more accurate information , whose update formula is The system repeatedly performs the next round of diversified retrieval and extraction. This process continues until the core score change of the retrieval results between consecutive rounds is less than the preset threshold (i.e. ) or the extraction round reaches the maximum preset value T, the system determines that the extraction process is complete, and outputs the final retrieval evidence set and the final anchor knowledge .

[0108] As shown in Figure 2 , this embodiment uses the iterative reasoning module to generate a logically consistent, evidence traceable reasoning chain based on the final extracted anchor knowledge and the final retrieval evidence set , and accordingly derive the final answer through multiple rounds of self-reflection reasoning.

[0109] As one or more implementations, this embodiment receives a question , the final extracted anchor knowledge , the candidate answer set and the final retrieval evidence set . Here the question Q and the candidate answer A together constitute the reasoning chain question Q * First, use the prompt template to guide the large language model to generate an initial reasoning chain , the process of which is formally represented as ; wherein the prompt template is designed as follows:

[0110] “Paragraph: {passages}, patient case information {facet knowledge}

[0111] According to these paragraphs and patient case information, answer the following question.

[0112] Question: {question}

[0113] Let's think step by step.”

[0114] Here, {passages} corresponds to the final retrieval evidence set , {facet knowledge} corresponds to the final extracted patient information , and {question} corresponds to the reasoning chain question . This template guides the model to combine external evidence with clinical context, initiating a structured, step-by-step reasoning process.

[0115] "To determine the most appropriate adjunctive medication for this patient, analyze the case step-by-step based on the provided passages and clinical context: Patient profile: Diagnosis: Acute coronary syndrome (ACS) with ST segment depression and elevated troponin, suggesting non-ST segment elevation myocardial infarction (NSTEMI). Procedure: Received percutaneous transluminal coronary angioplasty (PTCA), possibly with stent placement. Current medications: Atorvastatin (statin), Lisinopril (ACE inhibitor), and albuterol inhaler (for treating asthma). Ejection fraction (EF): 58% (normal), so there is no significant systolic dysfunction. Contraindication: Asthma (related to the use of beta-blockers). Key information: Article highlights: 1. Antiplatelet therapy: Aspirin is the standard antiplatelet medication for acute coronary syndrome (ACS). For patients undergoing percutaneous coronary intervention (PCI, such as percutaneous transluminal coronary angioplasty PTCA), dual antiplatelet therapy (DAPT) is recommended..."

[0116] To address potential logical flaws, evidence disconnections, or redundant explanations in the one-time generated reasoning chain, the present embodiment introduces a self-reflective iterative correction mechanism. The model evaluates the reasoning chain generated in the current round by the criteria The corresponding prompt is:

[0117] "Is the current {CoT} a valid approach to solving {question}, given that it meets all the following criteria:

[0118] 1. Each reasoning step must be based on {passages} or {facet knowledge}.

[0119] 2. The reasoning must be logically coherent and progressive.

[0120] 3. The explanation must be concise and non-redundant.

[0121] If the approach meets all the criteria, output:

[0122] "Yes"

[0123] Otherwise, output:

[0124] "No"

[0125] And list which criteria are violated and the reasons."

[0126] {CoT} is the current stage of the thought chain, {question} corresponds to the problem of the reasoning chain , {passages} is the final set of retrieved evidence , {facet knowledge} is the final extracted anchor knowledge

[0127] If the current reasoning chain does not fully satisfy the above criteria, the system will be guided by the self-reflective prompt template to make corrections and generate an optimized reasoning chain . This correction process is formally represented as ; where S is the feedback from the previous round of thought chain evaluation; the process is executed in a loop until the reasoning chain satisfies all the criteria or reaches the pre-set maximum number of iterations 10 rounds. The final converged reasoning chain is denoted as .

[0128] is:

[0129] "Improve the last round's reasoning process {CoT} for the question {question} based on {passages} and {facet knowledge}."

[0130] "Read the problems {feedback} in the last round's solution and rewrite a more perfect reasoning process."

[0131] "1. The new reasoning process must address all the problems mentioned in the reflection feedback."

[0132] "2. The reasoning process must be based on the retrieved evidence and anchor knowledge, and cannot fabricate facts."

[0133] "3. Must maintain logical coherence, simplicity, and clear steps."

[0134] "4. Effective reasoning in the previous reasoning process can be reused."

[0135] "Clearly output the improved reasoning process step by step:" )

[0137] {passages} corresponds to the final set of retrieved evidence , {facet knowledge} the final extracted anchor knowledge , {question} corresponds to the problem of the reasoning chain , {CoT} is the thought chain generated in the previous stage , {feedback} is the feedback from the previous round of thought chain evaluation S.

[0138] For example: "Step 1: Patient Background: The patient had a non-ST-segment elevation myocardial infarction (NSTEMI) after acute coronary syndrome (ACS) and underwent percutaneous coronary intervention (PCI) (possibly with stent placement). Current medications include atorvastatin, lisinopril, and albuterol inhaler. Asthma is a contraindication for beta-blockers. Ejection fraction (EF) is 58% (normal), ruling out heart failure with reduced ejection fraction. Step 2: Evidence-based guidelines: The American College of Cardiology / American Heart Association (ACC / AHA) guidelines recommend dual antiplatelet therapy (DAPT) with aspirin combined with a P2Y12 inhibitor after percutaneous coronary intervention (PCI) to prevent stent thrombosis. Due to asthma, beta-blockers are contraindicated. Non-dihydropyridine calcium channel blockers can only be used as an alternative when anti-angina therapy is needed. Enoxaparin is used for acute-phase treatment and is not suitable for long-term use. Spironolactone is only suitable for HFrEF (EF <40%). Step 3: Exclude incorrect options: (A) Nifedipine: a dihydropyridine CCB that can cause reflex tachycardia; not recommended for ACS patients. (B) Enoxaparin: not suitable for long-term secondary prevention. (D) Spironolactone: no indication given that EF is normal. Step 4: Determine the correct option: (C) Clopidogrel is a P2Y12 inhibitor and is the standard drug for DAPT after PCI. This drug is suitable for the patient and has no contraindications, in line with guideline recommendations."

[0139] After obtaining the final reasoning chain , the model is guided by the prompts of the answer generation module to output the final answer based on the reasoning conclusion . The core role of the template is to constrain the model to strictly generate answers based on the final reasoning chain , ensuring that the source of the answer is clear and traceable. : "According to the comparison between {CoT} and {candidate answers}, output the correct answer to the question {question}, as well as {CoT}" {question} is the question Q, {CoT} is the final reasoning chain , and {candidate answers} are the candidate answers .

[0140] The model proposed in this embodiment achieves better results on the data set than other methods, as shown in Table 1:

[0141] Table 1 Comparison of experimental results 1

[0142]

[0143] The performance on different scale models is also better than other methods, as shown in Table 2:

[0144] Table 2 Comparison of experimental results 2

[0145]

[0146] The embodiment generates a diversified query set through multi-dimensional semantic expansion, solves the problem of insufficient coverage of single query semantics, and significantly improves the retrieval coverage of relevant medical evidence; through the anchor knowledge extraction mechanism, the retrieval evidence is used as a guide to accurately locate the key clinical information from the lengthy electronic health record, effectively improving the relevance of the retrieval results to the individual characteristics of the patient; through the iterative optimization of query expansion and knowledge extraction, the retrieval process is self-enhanced, forming a closed-loop mechanism that improves the accuracy of retrieval with each round, significantly improving the quality of evidence; through the self-reflective iterative reasoning mechanism, the reasoning chain is verified and corrected for multiple rounds, solving the problems of logical inconsistency and insufficient evidence support in the reasoning process, ensuring the reliability of the final answer; by constructing a traceable reasoning chain, the generation process of the answer is completely transparent, obtaining the high explainability required in the medical scene, meeting the strict requirements of clinical audit; through the two-stage framework of deep coupling of deep retrieval and robust reasoning, the limitations of existing retrieval enhancement generation methods in patient alignment, evidence integration and reasoning robustness are systematically solved, and breakthrough performance is achieved on multiple authoritative medical question and answer benchmarks.

[0147] Embodiment two

[0148] The embodiment two of the present application introduces a medical question and answer system based on diversified retrieval and evidence-based reasoning.

[0149] As shown in a medical question and answer system based on diversified retrieval and evidence-based reasoning, comprising: Figure 5 The acquisition module is configured to acquire a diversified query set and a candidate answer set representing patient electronic health record information and a medical question;

[0150] The retrieval module is configured to perform multi-path parallel retrieval on the generated diversified query set to obtain diversified retrieval fragments;

[0151] The fusion module is configured to fuse the obtained diversified retrieval fragments to obtain a comprehensive retrieval evidence set;

[0152] The extraction module is configured to extract anchor knowledge related to the medical question in the obtained comprehensive retrieval evidence set;

[0153]

[0154] ​a reasoning module configured to perform multi-round self-reflective reasoning on the obtained anchor knowledge and the comprehensive retrieval evidence set to obtain an iterative reasoning chain;

[0155] a question and answer module configured to generate a patient medical question and answer answer according to the iterative reasoning chain and the candidate answer set, and complete the medical question and answer based on the diversified retrieval and evidence-based reasoning.

[0156] The detailed steps are the same as those of the medical question and answer method based on diversified retrieval and evidence-based reasoning provided in Embodiment One, and will not be repeated here.

[0157] Embodiment Three

[0158] The embodiment three of the present application provides a computer readable storage medium.

[0159] A computer readable storage medium has a program stored thereon, and the program is executed by a processor to implement the steps in the medical question and answer method based on diversified retrieval and evidence-based reasoning in Embodiment One of the present application.

[0160] The detailed steps are the same as those of the medical question and answer method based on diversified retrieval and evidence-based reasoning provided in Embodiment One, and will not be repeated here.

[0161] Embodiment Four

[0162] The embodiment four of the present application provides an electronic device.

[0163] An electronic device includes a memory, a processor, and a program stored in the memory and running on the processor, and the processor implements the steps in the medical question and answer method based on diversified retrieval and evidence-based reasoning in Embodiment One of the present application when executing the program.

[0164] The detailed steps are the same as those of the medical question and answer method based on diversified retrieval and evidence-based reasoning provided in Embodiment One, and will not be repeated here.

[0165] Embodiment Five

[0166] The embodiment five of the present application provides a computer program product.

[0167] A computer program product includes software code, and the program in the software code performs the steps in the medical question and answer method based on diversified retrieval and evidence-based reasoning in Embodiment One of the present application.

[0168] The detailed steps are the same as those of the medical question and answer method based on diversified retrieval and evidence-based reasoning provided in Embodiment One, and will not be repeated here.

[0169] Those skilled in the art will appreciate that embodiments of the present application can be readily used as software, hardware, or a combination of software and hardware. In a software embodiment, the methods can be tangibly embodied in a machine-readable storage medium having stored thereon instructions that can be used to program a computer to perform any of the methods. The software implementation can be initialized by loading and executing a set of instructions arranged to perform one of the methods into the computer's memory. Alternatively, hard-wired circuitry can be used in place of, or in combination with, software instructions. Thus, the

[0170] The present application is described in reference to the flowchart and / or block diagrams of the methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each block of the flowchart and / or block diagrams, and combinations of blocks in the flowchart and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart and / or block diagram block or blocks. Figure 1 one or more functions specified in one or more of the flowchart and / or block diagram block or blocks. Figure 1 one or more functions specified in one or more of the flowchart and / or block diagram block or blocks.

[0171] These computer program instructions can also be stored in a computer- readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instructions which implement the flowchart and / or block diagram block or blocks. Figure 1 one or more functions specified in one or more of the flowchart and / or block diagram block or blocks. Figure 1 one or more functions specified in one or more of the flowchart and / or block diagram block or blocks.

[0172] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the flowchart and / or block diagram block or blocks. Figure 1 one or more functions specified in one or more of the flowchart and / or block diagram block or blocks. Figure 1 one or more functions specified in one or more of the flowchart and / or block diagram block or blocks.

[0173] While preferred embodiments of the application have been described, modifications and alterations thereto will occur to those skilled in the art upon reading the preceding description. In particular, it will be apparent to those skilled in the art that parts can be added to, or substituted for, parts of the described embodiment. It is therefore contemplated that the claims be construed to include all such alterations and modifications as fall within the true spirit and scope of the application. Accordingly, while the preferred embodiment of the application has been described above, it will be recognized and understood that many additions, modifications, and substitutions can be made to the above description by one of ordinary skill in the art, in light of the foregoing, without departing from the spirit and scope of the application.

[0174] Obviously, various modifications and changes can be made to the present application by those skilled in the art without departing from the spirit and scope of the present application. Thus, it is intended that the present application encompass such modifications and changes as fall within the scope of the claims and their equivalents.

[0175] The above only describes the preferred embodiments of the present application and is not intended to limit the present application. The present application can have various modifications and changes for those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A medical question answering method based on diverse retrieval and evidence-based reasoning, characterized in that, The method comprises the following steps: Obtaining a diversified query set and a candidate answer set representing patient electronic health record information and a medical question; Performing multi-path parallel retrieval on the generated diversified query set to obtain diversified retrieval fragments; Fusing the obtained diversified retrieval fragments to obtain a comprehensive retrieval evidence set; Extracting anchor knowledge related to the medical question from the obtained comprehensive retrieval evidence set; During the extraction of anchor knowledge, extracting key clinical information related to the question and retrieval evidence from the patient electronic health record; and establishing patient-specific anchor knowledge based on the extracted key clinical information; Splicing the extracted anchor knowledge and the original question to form new optimized query input data, and then inputting the new optimized query input data into the input diversification module to perform a second round of retrieval; performing multiple rounds of iteration until the retrieval evidence relevance score is stable or the number of iterations reaches a preset number of iterations; finally, the optimized evidence set and the patient anchor knowledge are transmitted to the iterative reasoning module; Performing multiple rounds of self-reflection reasoning on the obtained anchor knowledge and comprehensive retrieval evidence set to obtain an iterative reasoning chain; generating an initial reasoning chain based on the obtained comprehensive retrieval evidence set and anchor knowledge; and performing multiple corrections on the generated initial reasoning chain based on a self-reflection mechanism; when the initial reasoning chain does not meet the correction judgment standard, triggering revision iteration, and performing multiple rounds of self-verification and optimization on the generated initial reasoning chain until all constraint conditions are met or the maximum number of iterations is reached, thereby obtaining the iterative reasoning chain; the correction judgment standard at least includes evidence support, logical consistency and expression refinement; Generating a patient medical question and answer based on the iterative reasoning chain and the candidate answer set, and completing the medical question and answer based on diversified retrieval and evidence-based reasoning.

2. A medical question answering method based on diverse retrieval and evidence-based reasoning as claimed in claim 1, wherein, In the process of obtaining a diversified query set representing patient electronic health record information and a medical question, the medical question, patient electronic health record information and candidate answers are obtained; and based on a large language model, the obtained medical question, patient electronic health record information and candidate answers are expanded in multiple dimensions in terms of semantics to generate a diversified query set.

3. A medical question answering method based on diverse retrieval and evidence-based reasoning as claimed in claim 2, wherein, The multiple dimension expansion at least includes feature expansion, title expansion and content expansion; wherein, based on the feature expansion, key attributes and indicators in the patient electronic health record information are extracted to generate a semantic question; based on the title expansion, a title type retrieval sentence is generated to enhance the retrieval specificity; and the content expansion uses external medical background knowledge to expand the semantic range and improve the recall rate.

4. The medical question answering method based on diverse retrieval and evidence-based reasoning as claimed in claim 1, wherein, Based on the conclusion and logic matching of the iterative reasoning chain, the candidate answers are compared item by item; when the candidate answers are consistent with the conclusion of the reasoning chain, the candidate answers are determined as the final answers, and an answer reasoning chain record containing the mapping relationship between the reasoning chain and the evidence chain is generated.

5. A medical question answering method based on diverse retrieval and evidence-based reasoning as claimed in claim 1, wherein, The evidence support is that each reasoning step must find support in the evidence set or anchor knowledge; the logical consistency is that the cause-and-effect relationship before and after the reasoning step is self-consistent, without contradiction and jump; and the expression refinement is that the reasoning content should be free of redundancy or ambiguity and irrelevant information.

6. A medical question answering method based on diverse retrieval and evidence-based reasoning as claimed in claim 1, wherein, In the process of extracting anchor point knowledge, specifically, the obtained comprehensive retrieval evidence set is received, a large language model is called to perform knowledge extraction operation, the input medical question is taken as the task target, the retrieved medical evidence fragments are taken as background knowledge, the patient electronic health record information is screened and extracted, the clinical characteristics, diagnosis conclusion, test index and medication information related to the current question are obtained as key information, and the obtained key information is taken as anchor point knowledge.

7. A medical question answering system based on diverse retrieval and evidence-based reasoning, employing the medical question answering method based on diverse retrieval and evidence-based reasoning according to any one of claims 1-6, characterized in that, Comprise: An acquisition module configured to acquire a diversified query set and a candidate answer set representing patient electronic health record information and medical questions; A retrieval module configured to perform multi-path parallel retrieval on the generated diversified query set to obtain diversified retrieval fragments; A fusion module configured to fuse the obtained diversified retrieval fragments to obtain a comprehensive retrieval evidence set; An extraction module configured to extract anchor point knowledge related to the medical question in the obtained comprehensive retrieval evidence set; A reasoning module configured to perform multi-round self-reflection reasoning on the obtained anchor point knowledge and comprehensive retrieval evidence set to obtain an iterative reasoning chain; An answer module configured to generate a patient medical question and answer answer based on the iterative reasoning chain and the candidate answer set, and complete the medical question and answer based on diversified retrieval and evidence-based reasoning.

8. A computer-readable storage medium having stored thereon a computer program, characterized in that, The program is executed by the processor to realize the steps of the medical question and answer method based on diversified retrieval and evidence-based reasoning of any one of claims 1-6.

9. An electronic device comprising a memory, a processor, and a computer program stored on the memory and running on the processor, characterized in that, The processor executes the program to realize the steps of the medical question and answer method based on diversified retrieval and evidence-based reasoning of any one of claims 1-6.

10. A computer program product comprising software code, characterized in that, The program in the software code performs the steps of the medical question and answer method based on diversified retrieval and evidence-based reasoning of any one of claims 1-6.

Citation Information

Patent Citations

  • Multi-agent collaborative question and answer enhancement method and system based on heterogeneous data knowledge

    CN120705277A