Retrieval enhancement generation method based on medical map

By constructing multi-level medical knowledge graphs and precise retrieval strategies, the MedGraphRAG method solves the shortcomings of answer accuracy and interpretability of large language models in the medical field, and realizes the processing of high accuracy and latest information, which is suitable for languages ​​of all sizes. model, reducing deployment costs.

CN119293179APending Publication Date: 2025-01-10周佺喜
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202411384385.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-30
Publication Date
2025-01-10

AI Technical Summary

Technical Problem

The answer accuracy and interpretability of large language models in the medical field are insufficient, especially in dealing with complex semantic relationships and the update of latest information, and traditional RAG methods have not been optimized for the special needs of the medical field.

Method used

Using the search-enhanced generation method based on medical maps (MedGraphRAG), by constructing a multi-level medical knowledge graph, semantic document segmentation, entity extraction, hierarchical linking, relationship recognition and label generation, combining U-retrieve search and bottom-up text generation , ensure the accuracy and interpretability of the answers.

Benefits of technology

Significantly improve the accuracy and interpretability of large language models in the medical field, can effectively handle complex medical semantic relationships, ensure that answers reflect the latest medical knowledge, and reduce the cost of model deployment and update, suitable for languages ​​of all sizes Model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119293179A_ABST
    Figure CN119293179A_ABST
Patent Text Reader

Abstract

The invention discloses a retrieval enhancement generation method based on a medical map, and belongs to the field of artificial intelligence and medical information processing. The method comprises the following three main steps: (1) constructing a medical map: constructing a multi-level medical knowledge map through semantic document segmentation, element extraction, hierarchical linking, relation linking, label generation and map combination; (2) map retrieval: retrieving related information in the constructed map according to user query by using a U-retrieve method; and (3) text generation: accurate and comprehensive answers are generated based on retrieval results. According to the method, by integrating large-scale medical literatures, textbooks and clinical data, the answer accuracy and interpretability of the large language model in the medical field are remarkably improved. Detailed answers containing evidence sources can be generated, and the illusion problem is effectively avoided. A powerful tool is provided for the fields of medical decision support, medical education, patient consultation and the like, and wide application of artificial intelligence in the field of medical health is expected to be promoted.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the fields of artificial intelligence and medical information processing, and in particular to a retrieval enhancement generation method based on a medical knowledge graph, which is used to improve the accuracy and interpretability of answers of a large language model in the medical field. Background Art

[0002] In recent years, large language models (LLMs) have made great breakthroughs in the field of natural language processing, and have performed well in daily conversations, information retrieval, and content generation. However, in professional fields such as medicine, these models often suffer from hallucinations and generate irrelevant information. This is mainly because the medical field is highly professional and complex, requiring accurate, up-to-date, and reliable information.

[0003] To solve this problem, researchers proposed the Retrieval Augmented Generation (RAG) method. RAG allows large language models to access external knowledge bases when generating answers, thereby improving the accuracy and timeliness of answers. However, traditional RAG methods still have limitations when dealing with complex semantic relationships, especially in tasks that require in-depth understanding and connection of generalized semantic concepts in large datasets.

[0004] To further improve RAG, researchers proposed the Graph Retrieval-Augmented Generation (GraphRAG) method in early 2024. GraphRAG introduces knowledge graphs to enable the model to capture topological relationships in text information, thereby improving the accuracy and relevance of information retrieval. The core workflow of GraphRAG includes indexing of k-hop self-graphs, graph retrieval, soft pruning, and pruning-based text subgraph generation.

[0005] Although GraphRAG has made progress in handling complex semantic relationships, it is not optimized for the special needs of the medical field. The knowledge structure of the medical field is complex, the terminology is professional, and the information is updated quickly, requiring a more specialized approach to handle medical-related queries and information generation.

[0006] In addition, when using AI systems in the medical field, it is crucial to ensure the explainability and traceability of responses. Traditional large language models often use a "black box" approach to generate responses, making it difficult to provide a clear source of information, which can pose serious risks in medical decision-making.

[0007] Therefore, there is an urgent need for a method that is optimized specifically for the medical field and can provide highly accurate, up-to-date, and interpretable answers. Summary of the invention

[0008] The present invention proposes a retrieval enhancement generation method based on medical graphs, called MedGraphRAG. The method achieves more accurate information retrieval and more reliable answer generation by constructing a multi-level medical knowledge graph. The main steps of the present invention include medical graph construction, graph retrieval and text generation.

[0009] The main purpose of the present invention is to provide a method that can significantly improve the accuracy of answers given by large language models in the medical field, while ensuring that the generated answers are explainable and traceable.

[0010] Another object of the present invention is to provide a method that can effectively process complex medical semantic relationships to improve the relevance and accuracy of information retrieval.

[0011] Another object of the present invention is to provide a method that can combine the latest medical research results and reliable medical resources to ensure that the generated answers reflect the latest medical knowledge.

[0012] To achieve the above object, the present invention adopts the following technical solutions: 1. Medical atlas construction: a) Semantic Document Segmentation: Segmenting medical documents into semantically coherent chunks.

[0013] b) Element extraction: extract relevant medical entities from each semantic block.

[0014] c) Hierarchical linking: construct a three-layer medical knowledge graph structure.

[0015] d) Relationship Linking: Identify relationships between entities and create a weighted directed graph.

[0016] e) Label generation and graph merging: Generate labels describing graph topics and merge multiple graphs into a global graph.

[0017] 2. Spectrum retrieval: Using a top-down U-retrieve approach, the most relevant graph parts and entities are retrieved based on the user query.

[0018] 3. Text Generation: Generate intermediate responses based on the retrieved information, and then combine high-level graph information from the bottom up to generate the final answer, while including source document references.

[0019] Compared with the prior art, the present invention has the following beneficial effects: 1. It significantly improved the accuracy of large language models in the medical field, and performed well in multiple medical question-answering benchmarks, even surpassing the performance of human experts.

[0020] 2. By providing evidence sources and terminology explanations, it enhances the safety and explainability of AI in medical applications, helping medical professionals verify and understand AI-generated answers.

[0021] 3. It can effectively handle complex medical semantic relationships and improve the relevance and accuracy of information retrieval.

[0022] 4. Through the multi-level knowledge graph structure, the latest medical research results and reliable medical resources are integrated to ensure that the generated answers reflect the current level of medical knowledge.

[0023] 5. There is no need to fine-tune the large language model specifically for the medical field, which can significantly improve its performance in the medical field and reduce the cost of model deployment and updating.

[0024] 6. It is applicable to language models of all sizes and can even significantly improve the performance of smaller models (such as LLaMA2-13B and LLaMA3-8B) in the medical field, increasing the practicality and flexibility of the method. BRIEF DESCRIPTION OF THE DRAWINGS Figure 1 It is the overall flow chart of the MedGraphRAG method of the present invention.

[0026] Figure 2 It is a schematic diagram of the semantic document segmentation step in the present invention.

[0027] Figure 3 It is a schematic diagram of the three-layer medical knowledge graph structure in the present invention.

[0028] Figure 4 It is a flow chart of the U-retrieve retrieval method in the present invention. DETAILED DESCRIPTION

[0029] The present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. Example

[0030] A retrieval enhancement generation method based on medical atlas, comprising the following steps: 1. Medical atlas construction 1.1 Semantic Document Segmentation This step aims to segment the medical document into semantically coherent blocks for subsequent processing. The specific implementation is as follows: a) Use line breaks to separate the document into preliminary paragraphs.

[0031] b) Apply the proposition transfer technique to each paragraph, converting it into a series of self-sufficient statements or propositions.

[0032] c) Use a large language model (such as GPT-4) to analyze each proposition and decide whether it should be merged with an existing block or create a new block. This process uses a sliding window technique and processes 5 paragraphs at a time to reduce noise.

[0033] d) Set a hard threshold (e.g. 3000 tokens) to ensure that each block does not exceed the context length limit of the large language model.

[0034] Through this method, we can obtain a series of semantically coherent and self-contained text blocks, laying the foundation for subsequent entity extraction and graph construction.

[0035] 1.2 Element extraction In this step, we extract relevant medical entities from each semantic block. The specific implementation is as follows: a) Use a large language model (such as GPT-4) to analyze each semantic block and extract the medical entities. For each entity, the model needs to output: - Entity Name - Entity Type (select from a list of predefined specialized medical terms) - Entity Description b) To ensure the completeness and quality of the extraction, the entity extraction is repeated multiple times (e.g., 3 times) for each block.

[0036] c) Assign a unique ID to each extracted entity. This ID contains the document and paragraph information of the entity source for subsequent tracking.

[0037] Through this step, we can obtain a set of rich medical entities and their attributes, ready for building a knowledge graph.

[0038] 1.3 Hierarchical Links This step aims to build a three-layer medical knowledge graph structure to connect the extracted entities with the broader medical knowledge system. The specific implementation is as follows: a) First layer: build a base graph using entities extracted from user-provided private documents (e.g., MIMIC-IV dataset).

[0039] b) Second layer: Link the entities in the first layer to the basic medical knowledge graph built from medical textbooks and academic articles (such as the MedC-K corpus). This step uses entity alignment technology to match and link the entities in the first layer with the concepts in the second layer.

[0040] c) Third layer: The second layer of the graph is further connected to standard medical terms in authoritative medical resources such as the Unified Medical Language System (UMLS). This step ensures that the terms in the graph are consistent with widely accepted medical standards.

[0041] Through this hierarchical structure, we can place the medical entities in a specific document in a broader medical knowledge context, improving the accuracy and comprehensiveness of information retrieval.

[0042] 1.4 Relationship Links In this step, we identify the relationships between entities and create a weighted directed graph (called a meta-graph). The specific implementation is as follows: a) Use a large language model to analyze each pair of related entities and identify possible relationships between them. Relationship types can include "is a symptom of...", "used to treat...", "is a complication of...", etc.

[0043] b) For each relationship identified, a weight value is assigned to indicate the strength or importance of the relationship. The weight can be determined based on factors such as the frequency of the relationship in the literature and the confidence of the model.

[0044] c) Represent the identified relationships as directed edges and construct a weighted directed graph. The nodes in the graph are medical entities, the edges are the relationships between them, and the weights of the edges represent the strength of the relationships.

[0045] Through this step, we can capture the complex semantic relationships between entities and provide richer context for subsequent information retrieval.

[0046] 1.5 Label generation and graph merging This is the last step in building a medical graph, which aims to generate labels that describe the graph theme and merge multiple meta-graphs into a global graph. The specific implementation is as follows: a) Generate summaries for each meta-graph using a large language model, based on predefined medical categories (e.g., symptoms, patient history, body functions, medications, etc.).

[0047] b) Based on the generated summaries, a series of labels are created for each meta-graph, which succinctly describe the core topics of the meta-graph.

[0048] c) Calculate the similarity between different meta-graphs. You can use the cosine similarity of the labels or other appropriate similarity metrics.

[0049] d) Based on the calculated similarity, related meta-graphs are merged into a larger graph structure. This process is iterative and eventually forms a global graph containing all information.

[0050] Through this step, we obtained a structured global medical knowledge graph with topic labels, which laid the foundation for subsequent precise retrieval.

[0051] 2. Graph retrieval At this stage, we use a top-down retrieval method called U-retrieve to retrieve the most relevant graph parts and entities based on the user query. The specific implementation is as follows: a) Generate summary labels for user input queries using a large language model. These labels should have the same format and scope as the labels generated during the graph construction phase.

[0052] b) Starting from the top level of the global graph, use the generated query labels to match the most relevant subgraphs. This is a top-down process that gradually narrows the search scope.

[0053] c) After matching the most relevant subgraph, identify the most relevant entity. For each relevant entity, find the top-k entities that are most relevant to it (k can be a preset parameter, such as 5 or 10).

[0054] d) Collect all identified relevant entities and their relationships to form a subgraph for a specific query.

[0055] This retrieval method can effectively locate the most relevant information in large-scale medical knowledge graphs, improving the accuracy and relevance of subsequent answer generation.

[0056] 3. Text Generation This is the final stage where we generate answers based on the retrieved information. The specific implementation is as follows: a) Use a large language model (such as GPT-4) to generate a preliminary answer based on the retrieved subgraph information. This preliminary answer should contain key information from the retrieved subgraph.

[0057] b) This preliminary answer is combined with high-level graph information obtained during the search phase (such as broader medical concepts and relationships) to generate a more comprehensive intermediate response. This process uses a bottom-up approach to ensure that the answer contains both specific details and relevant general medical knowledge.

[0058] c) When generating the final answer, the large language model needs to perform the following tasks: - Integrate and summarize all relevant information retrieved - Ensure the logic and coherence of your answers - Use appropriate medical terminology - Provide source document references for each key information point - Explain complex medical terminology when necessary d) Finally, the generated responses were post-processed to ensure uniform formatting and to verify the accuracy of all references.

[0059] Through this process, we are able to generate medical answers that are both accurate and explainable, with each key point of information having a clear source for easy verification and further research by medical professionals.

[0060] Summarize: The medical graph-based retrieval enhancement generation method proposed in this invention can generate highly accurate, comprehensive and interpretable medical answers by constructing a multi-level medical knowledge graph, using precise retrieval strategies and intelligent text generation technology. This method not only improves the application effect of large language models in the medical field, but also provides reliable and well-documented information support for medical professionals and patients, and is expected to play an important role in clinical decision support, medical education and patient consultation.

Claims

1. A retrieval enhancement generation method based on medical atlas, characterized in that: The following steps are involved: a) Medical graph construction, including: - Semantically segment medical documents to generate semantically coherent text blocks; - Extract medical entities and their attributes from semantic chunks; - Construct a three-layer medical knowledge graph structure; - Identify relationships between entities and create weighted directed graphs; - Generate graph summary labels and merge them into a global graph; b) Graph retrieval based on user queries; c) Generate answer text that includes the source of evidence.

2. The method according to claim 1, characterized in that The semantic segmentation comprises the following steps: a) Use line breaks to separate the document into preliminary paragraphs; b) Apply the proposition transfer technique to each paragraph, transforming it into a series of self-sufficient statements or propositions; c) Use the large language model to analyze each proposition and decide whether it should be merged with the existing block or create a new block. This process uses a sliding window technique and processes 5 paragraphs at a time. d) setting a hard threshold to ensure that each block does not exceed a predetermined context length limit; e) Generate a series of semantically coherent, self-contained text blocks through the above steps.

3. The method according to claim 1, characterized in that The extraction of the medical entity and its attributes comprises the following steps: a) Use a large language model to analyze each semantic block and extract the medical entities therein; b) For each entity, output the entity name, entity type and entity description; c) the entity type is selected from a predefined list of specialized medical terms; d) Repeat entity extraction for each block multiple times to ensure the completeness and quality of the extraction; e) Assign a unique ID to each extracted entity, including the document information and paragraph information of the entity source.

4. The method according to claim 1, characterized in that The construction of the three-layer medical knowledge graph structure includes the following steps: a) First layer: building a basic graph using entities extracted from private documents provided by users; b) The second layer: linking the entities in the first layer to the basic medical knowledge graph constructed from medical textbooks and academic articles, using entity alignment technology for matching and linking; c) The third layer: further connect the second layer graph to standard medical terms in authoritative medical resources; d) Through this hierarchical structure, medical entities in a specific document are placed in the broader context of medical knowledge.

5. The method according to claim 1, characterized in that The identification of the relationship between entities and the creation of the weighted directed graph include the following steps: a) Use a large language model to analyze each pair of related entities and identify the possible relationships between them; b) Relationship types include but are not limited to "is a symptom of...", "used for treatment", "is a complication of...", etc.; c) For each relationship identified, a weight value is assigned to indicate the strength or importance of the relationship; d) The weights are determined based on factors such as the frequency of the relationship in the literature and the confidence of the model; e) Represent the identified relationships as directed edges and construct a weighted directed graph, where nodes are medical entities, edges are relationships between them, and edge weights represent the strength of the relationship.

6. The method according to claim 1, characterized in that The generation of the graph summary label and the graph merging include the following steps: a) Generate a summary for each meta-graph using a large language model, based on predefined medical categories; b) predefined medical categories including but not limited to symptoms, patient history, body functions, medications, etc.; c) Based on the generated summary, create a series of labels for each meta-graph, which succinctly describe the core theme of the meta-graph; d) Calculate the similarity between different meta-graphs, using the cosine similarity of the labels or other appropriate similarity metrics; e) Based on the calculated similarity, related meta-graphs are merged into a larger graph structure; f) Through an iterative process, a global graph containing all information is finally formed.

7. The method according to claim 1, characterized in that The graph retrieval based on user query adopts the U-retrieve method, which includes the following steps: a) Generate summary tags for user input queries using a large language model. These tags have the same format and scope as the tags generated in the graph construction phase; b) Starting from the top level of the global graph, use the generated query labels to match the most relevant subgraphs; c) gradually narrow the search scope through a top-down process; d) After matching the most relevant subgraph, identify the most relevant entity in it; e) For each relevant entity, find the top-k entities that are most relevant to it, where k is a preset parameter; f) Collect all identified relevant entities and their relationships to form a subgraph for a specific query.

8. The method according to claim 1, characterized in that The generation of the answer text containing the evidence source comprises the following steps: a) Generate preliminary answers based on the retrieved subgraph information using a large language model; b) Combine the preliminary answer with the high-level graph information obtained in the retrieval stage to generate a more comprehensive intermediate response; c) When generating the final answer, the large language model performs the following tasks: - Integrate and summarize all relevant information retrieved; - Ensure the logic and coherence of the answer; - Use appropriate medical terminology; - Provide source document references for each key information point; - Explain complex medical terminology when necessary; d) Post-process the generated responses to ensure uniform formatting and re-verify the accuracy of all references; e) The resulting answer contains detailed medical information, sources of evidence, explanations of terminology, and applicable medical advice.

Citation Information

Cited By

  • Meteorological corpus construction method, system and related device

    CN119476448A

  • Drug safety large model method and system based on medical knowledge graph

    CN119541902A

  • Retrieval enhancement generation method and device based on knowledge graph in medical education scene

    CN120067137A

  • Entity relation data set labeling system based on large language model

    CN120123527A