Search enhancement generation method based on document knowledge base and knowledge graph

By constructing a priori global and document knowledge graph, the problem of neglecting document relationships in the retrieval enhancement generation of large language models is solved, and more accurate and comprehensive response text generation is achieved.

CN120780849BActive Publication Date: 2026-01-09齐鲁空天信息研究院
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511256264.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-04
Publication Date
2026-01-09
Estimated Expiration
2045-09-04

AI Technical Summary

Technical Problem

Existing large language models neglect the relationships between documents during the retrieval enhancement generation process, resulting in relatively one-sided and inaccurate generated response texts.

Method used

By constructing a prior global knowledge graph and a prior document knowledge graph, and aligning the prior knowledge point graph with the single document knowledge graph, a document knowledge graph representing the relationships between documents is generated. This document knowledge graph is then used as augmented data input to a pre-trained language model to generate the target response text.

Benefits of technology

By effectively utilizing the relationships between documents, more accurate and comprehensive response texts can be generated, improving the relevance and accuracy of search results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120780849B_ABST
    Figure CN120780849B_ABST
Patent Text Reader

Abstract

The application provides a retrieval enhancement generation method based on a document knowledge base and a knowledge graph, and can be applied to the technical field of artificial intelligence. The method comprises the following steps: in response to receiving target question text, determining enhancement data for the target question text by using a prior global knowledge graph and a prior document knowledge graph; inputting the target question text and the enhancement data into a pre-trained language model to generate target reply text corresponding to the target question text, wherein the prior global knowledge graph and the prior document knowledge graph are obtained by the following operation: aligning M single-document knowledge graphs based on M documents according to a prior knowledge point graph to obtain the prior global knowledge graph; constructing a document knowledge graph representing the association relationship among the M documents based on the prior global knowledge graph; and aligning the document knowledge graph according to the prior knowledge point graph to obtain the prior document knowledge graph.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of artificial intelligence, and more particularly to a retrieval enhancement generation method based on a document knowledge base and a knowledge graph. BACKGROUND

[0002] Retrieval enhancement generation is an application framework of a large language model, which combines the advantages of a traditional information retrieval system and the functions of a generative large language model. By injecting the knowledge retrieved from an external knowledge base into a large model, the illusion problem and the factual error problem of the large model in generating content can be effectively alleviated.

[0003] The retrieval enhancement method used by the existing large language model is only a reorganization of the knowledge information in the document, but this form of knowledge organization ignores the relationship between documents, resulting in a relatively one-sided and inaccurate answer text generated by the large language model. SUMMARY

[0004] In view of the above problems, the present application provides a retrieval enhancement generation method based on a document knowledge base and a knowledge graph.

[0005] According to a first aspect of the present application, a retrieval enhancement generation method based on a document knowledge base and a knowledge graph is provided, the document knowledge base comprising M documents, M being an integer greater than 1, comprising: in response to receiving a target question text, determining enhancement data for the target question text by using a prior global knowledge graph and a prior document knowledge graph; inputting the target question text and the enhancement data into a pre-trained language model to generate a target answer text corresponding to the target question text, wherein the prior global knowledge graph and the prior document knowledge graph are obtained by: aligning M single-document knowledge graphs constructed based on the M documents according to a prior knowledge point graph to obtain a prior global knowledge graph, the single-document knowledge graph representing the interaction relationship between knowledge point entities in the document, and the prior global knowledge graph representing the interaction relationship between knowledge point entities in each document and prior knowledge points in the prior knowledge point graph; constructing a document knowledge graph representing the association relationship between the M documents based on the prior global knowledge graph; and aligning the document knowledge graph according to the prior knowledge point graph to obtain a prior document knowledge graph, the document nodes in the prior document knowledge graph having a mapping relationship with the knowledge point entity nodes in the prior global knowledge graph.

[0006] According to an embodiment of the present application, the method further comprises: determining co-occurrence relations and co-occurrence frequencies between knowledge point entity nodes in the prior global knowledge graph, the co-occurrence relations representing the relevance between the knowledge point entity nodes, and the co-occurrence frequencies representing the number of times the knowledge point entity nodes co-occur in the documents; and constructing the document knowledge graph by taking the documents as nodes, the co-occurrence relations as first edges, and the co-occurrence frequencies as weights of the first edges.

[0007] According to an embodiment of the present application, the method further comprises: performing community division on the knowledge point entity nodes in the prior global knowledge graph based on the modularity between the knowledge point entity nodes in the prior global knowledge graph, to obtain community division results of the knowledge point nodes; determining community division results of the M documents based on the community division results of the knowledge point entity nodes; and updating the document knowledge graph based on the community division results of the knowledge point entity nodes and the community division results of the M documents, to obtain an updated document knowledge graph.

[0008] According to an embodiment of the present application, the method further comprises: updating the document knowledge graph by taking the documents as nodes, the community division results of the M documents as second edges, and the community division results of the knowledge point entity nodes in each document as weights of the second edges, to obtain the updated document knowledge graph.

[0009] According to an embodiment of the present application, the documents comprise text data, and the method further comprises: generating metadata of the M documents based on the text data of the M documents and basic attributes of the M documents; and storing the metadata of the M documents and the text data into a first database.

[0010] According to an embodiment of the present application, the method further comprises: for an mth document in the M documents, dividing text data of the mth document based on a text structure of the text data of the mth document, to obtain segmented data of the text data of the mth document, where 1≤m≤M; inputting the segmented data of the M documents into a pre-trained vector model, to obtain segment vectors corresponding to the segmented data; and storing the segment vectors into a second database.

[0011] According to an embodiment of the present application, the document comprises image data, and the method further comprises: storing source files of the M documents and image data of the M documents into a third database; and storing the prior global knowledge graph and the prior document knowledge graph into a fourth database.

[0012] According to an embodiment of the present application, the method further comprises: based on the target question text, retrieving the first database to obtain at least one first retrieval result; based on a target text vector of the target question text, retrieving the second database to obtain at least one second retrieval result; performing entity extraction on the target question text to obtain a target question entity; based on the target question entity, retrieving the fourth database to obtain at least one knowledge point entity node in the prior knowledge point graph; and based on the first retrieval result, the second retrieval result, the at least one knowledge point entity node, and a mapping relationship between the document node and the knowledge point entity node, determining at least one enhanced data.

[0013] According to an embodiment of the present application, the method further comprises: based on the result relevance, sorting the first retrieval result, the second retrieval result, the at least one knowledge point entity node, and the at least one enhanced data to obtain a sorted candidate enhanced result.

[0014] According to an embodiment of the present application, the method further comprises: based on the target question text and the enhanced data, inputting the target question text and the enhanced data into a pre-trained language model to generate a target reply text corresponding to the target question text, wherein the target reply text comprises a target answer to the target question text.

[0015] The second aspect of the present application provides a document knowledge base and knowledge graph-based retrieval enhancement generation device, the document knowledge base comprising M documents, M being an integer greater than 1, comprising: a determination module configured to determine enhancement data for a target question text in response to receiving the target question text, using a prior global knowledge graph and a prior document knowledge graph; an input module configured to input the target question text and the enhancement data into a pre-trained language model to generate a target reply text corresponding to the target question text, wherein the prior global knowledge graph and the prior document knowledge graph are obtained by the following modules: a prior global knowledge graph construction module configured to align M single-document knowledge graphs constructed based on the M documents according to a prior knowledge point graph to obtain a prior global knowledge graph, the single-document knowledge graph representing the interaction relationship between knowledge point entities in the document, and the prior global knowledge graph representing the interaction relationship between knowledge point entities in each document and prior knowledge points in the prior knowledge point graph; a document knowledge graph construction module configured to construct a document knowledge graph representing the association relationship between the M documents based on the prior global knowledge graph; and a prior document knowledge graph construction module configured to align the document knowledge graph according to the prior knowledge point graph to obtain a prior document knowledge graph, the document nodes in the prior document knowledge graph having a mapping relationship with the knowledge point entity nodes in the prior global knowledge graph.

[0016] The third aspect of the present application provides an electronic device, comprising: one or more processors; a memory for storing one or more computer programs, wherein the one or more processors execute the one or more computer programs to implement the steps of the method.

[0017] The fourth aspect of the present application further provides a computer-readable storage medium having stored thereon a computer program or instructions, the computer program or instructions being executed by a processor to implement the steps of the method.

[0018] The fifth aspect of the present application further provides a computer program product comprising a computer program or instructions, the computer program or instructions being executed by a processor to implement the steps of the method.

[0019] According to the embodiment of the present application, by aligning the knowledge graph of a single document, the prior global knowledge graph is obtained, and the prior document knowledge graph is further constructed based on the prior global knowledge graph, the isolated document is constructed as a double-layer structure knowledge graph as the enhanced data input to the pre-trained language model, which provides not only the fine-grained knowledge point entity, but also the association relationship between documents for the large language model to provide a search path, and then when the user asks a question, the prior document knowledge graph of the prior global knowledge graph can be retrieved according to the target question text to obtain the target reply text corresponding to the target question text, which effectively utilizes the relationship between documents to obtain more accurate and comprehensive retrieval results, and provides the target reply text more related to the target question text for the user. BRIEF DESCRIPTION OF DRAWINGS

[0020] The above content and other purposes, features and advantages of the present application will be more clearly understood through the following description of the embodiments of the present application with reference to the accompanying drawings, in which:

[0021] Figure 1 An application scenario diagram of the retrieval enhancement generation method and device based on a document knowledge base and a knowledge graph according to an embodiment of the present application is shown;

[0022] Figure 2 A flowchart of the retrieval enhancement generation method based on a document knowledge base and a knowledge graph according to an embodiment of the present application is shown;

[0023] Figure 3 A flowchart of the method for constructing a prior global knowledge graph and a prior document knowledge graph according to an embodiment of the present application is shown;

[0024] Figure 4 A document knowledge graph according to an embodiment of the present application is shown;

[0025] Figure 5 A mapping relationship diagram of a prior document knowledge graph and a prior global knowledge graph according to an embodiment of the present application is shown;

[0026] Figure 6 A storage architecture diagram according to an embodiment of the present application is shown;

[0027] Figure 7 A structure block diagram of the retrieval enhancement generation device based on a document knowledge base and a knowledge graph according to an embodiment of the present application is shown;

[0028] Figure 8 A block diagram of an electronic device suitable for implementing the retrieval enhancement generation method based on a document knowledge base and a knowledge graph according to an embodiment of the present application is shown. DETAILED DESCRIPTION

[0029] Hereinafter, embodiments of the present application will be described with reference to the accompanying drawings. It is to be understood, however, that these descriptions are merely exemplary and are intended to illustrate the scope of the present application, not to limit it. In the following detailed description of the embodiments, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the present application. However, it will be apparent to one skilled in the art that the embodiments can be practiced without these specific details. In other instances, well-known structures and functions have been omitted to avoid obscuring the present application.

[0030] The terms used herein are merely used to describe specific embodiments, and are not intended to limit the present application. The terms "include" and "have" and the like used herein indicate the presence of the described features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.

[0031] All terms used herein, including technical and scientific terms, have the same meaning as commonly understood by one of ordinary skill in the art, unless otherwise defined. It should be noted that the terms used herein should be interpreted in a manner consistent with the context of the specification, and should not be interpreted in an idealized or overly formal manner.

[0032] In the case of using expressions similar to "at least one of A, B, and C, etc.", it should be generally interpreted as including one or more of the items enumerated in the list (e.g., "a system having at least one of A, B, and C" should include, but not be limited to, a system having A alone, a system having B alone, a system having C alone, a system having both A and B, a system having both A and C, a system having both B and C, and / or a system having A, B, and C, etc.).

[0033] RAG (Retrieval-Augmented Generation) is an application framework of a large language model. In the RAG process, the user's question is divided into three steps of retrieval, augmentation, and generation. Among them, retrieval retrieves information related to the question from the pre-established knowledge base. Augmentation uses the retrieved information as the context input of the large model to enhance the understanding and answering ability of the large model for specific questions. Generation is to generate an answer that meets the user's expectations in combination with the large model. Through the retrieval, augmentation, and generation process, external knowledge information is injected into the large model generation process, which can assist the large model to generate more accurate and rich text content.

[0034] In the related art, the document information in the RAG process is often converted into a knowledge graph, and the knowledge information is aggregated based on the document knowledge graph. Its essence is the reorganization of the knowledge information in the user's document, but this knowledge organization form ignores the relevance between documents.

[0035] In view of this, the embodiment of the present application provides a retrieval enhancement generation method based on a document knowledge base and a knowledge graph, the document knowledge base comprising M documents, M being an integer greater than 1, the method comprising: in response to receiving a target question text, determining enhancement data for the target question text by using a prior global knowledge graph and a prior document knowledge graph; inputting the target question text and the enhancement data into a pre-trained language model to generate a target reply text corresponding to the target question text, wherein the prior global knowledge graph and the prior document knowledge graph are obtained by: aligning M single-document knowledge graphs constructed based on the M documents according to a prior knowledge point graph to obtain the prior global knowledge graph, the single-document knowledge graph representing the interaction relationship between knowledge point entities in a document, and the prior global knowledge graph representing the interaction relationship between the knowledge point entities in each document and the prior knowledge points in the prior knowledge point graph; constructing a document knowledge graph representing the association relationship between the M documents based on the prior global knowledge graph; and aligning the document knowledge graph according to the prior knowledge point graph to obtain the prior document knowledge graph, the document nodes in the prior document knowledge graph having a mapping relationship with the knowledge point entity nodes in the prior global knowledge graph.

[0036] Figure 1 An application scenario diagram of the retrieval enhancement generation method and device based on a document knowledge base and a knowledge graph according to an embodiment of the present application is shown.

[0037] As shown in Figure 1 The application scenario 100 according to this embodiment can include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104 and a server 105. The network 104 is a medium for providing a communication link between the first terminal device 101, the second terminal device 102, the third terminal device 103 and the server 105. The network 104 can include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

[0038] A user can use the first terminal device 101, the second terminal device 102, the third terminal device 103 to interact with the server 105 through the network 104 to receive or send messages, etc. Various communication client applications can be installed on the first terminal device 101, the second terminal device 102, the third terminal device 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only as examples).

[0039] The first terminal device 101, the second terminal device 102, the third terminal device 103 can be various electronic devices with a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers and desktop computers, etc.

[0040] The server 105 can be a server that provides various services, such as a background management server that provides support for a website browsed by a user using the first terminal device 101, the second terminal device 102, and the third terminal device 103 (only as an example). The background management server can analyze and process received user requests and the like, and feed back the processing results (such as a webpage, information, or data obtained or generated according to a user request) to the terminal device.

[0041] It should be noted that the retrieval enhancement generation method based on the document knowledge base and the knowledge graph provided in the embodiments of the present application can generally be executed by the server 105. Correspondingly, the retrieval enhancement generation apparatus based on the document knowledge base and the knowledge graph provided in the embodiments of the present application can generally be arranged in the server 105. The retrieval enhancement generation method based on the document knowledge base and the knowledge graph provided in the embodiments of the present application can also be executed by a server or a server cluster different from the server 105 and capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or the server 105. Correspondingly, the retrieval enhancement generation apparatus based on the document knowledge base and the knowledge graph provided in the embodiments of the present application can also be arranged in a server or a server cluster different from the server 105 and capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or the server 105.

[0042] It should be understood that Figure 1 The number of terminal devices, networks, and servers in the above-mentioned scenario is only illustrative. According to the needs of implementation, there can be any number of terminal devices, networks, and servers.

[0043] The retrieval enhancement generation method based on the document knowledge base and the knowledge graph according to the embodiments of the present application will be described in detail below based on the scenario described above. Figure 1 Figures 2-5 The retrieval enhancement generation method based on the document knowledge base and the knowledge graph according to the embodiments of the present application will be described in detail below based on the scenario described above.

[0044] Figure 2 A flowchart of the retrieval enhancement generation method based on the document knowledge base and the knowledge graph according to the embodiments of the present application is shown.

[0045] As shown in Figure 2 The retrieval enhancement generation method based on the document knowledge base and the knowledge graph according to the embodiments of the present application includes operations S210-S220.

[0046] According to the embodiments of the present application, the above-mentioned document knowledge base includes M documents, and M is an integer greater than 1.

[0047] In operation S210, in response to receiving the target question text, the prior global knowledge graph and the prior document knowledge graph are used to determine the enhancement data for the target question text. ​

[0048] In operation S220, the target question text and the enhanced data are input into the pre-trained language model to generate a target reply text corresponding to the target question text.

[0049] Figure 3 A flowchart of a method for constructing a prior global knowledge graph and a prior document knowledge graph according to an embodiment of the present application is shown.

[0050] As shown in Figure 3 The method for constructing a prior global knowledge graph and a prior document knowledge graph according to the embodiment includes operations S310-S330.

[0051] In operation S310, M single-document knowledge graphs constructed based on M documents are aligned according to a prior knowledge point graph to obtain a prior global knowledge graph.

[0052] The single-document knowledge graph represents the interaction relationship between knowledge point entities in a document, and the prior global knowledge graph represents the interaction relationship between knowledge point entities in each document and the prior knowledge points in the prior knowledge point graph.

[0053] According to an embodiment of the present application, the single-document knowledge graph is constructed for each of the M documents.

[0054] According to an embodiment of the present application, a document reading and parsing tool can be used to read documents in multiple document formats. Further, text, pictures, tables and other forms of content can be extracted from the documents, and the document layout can be restored to convert various document data into a unified format document. For text data in the document, the document reading and parsing tool can be used to read the text content in the document and splice the text content to form a pure text description of the document. For picture data in the document, the document reading and parsing tool can be used to extract picture format content inserted in the document and save it in the local or database, and at the same time insert the picture address or link into the corresponding text description position of the original document. For table data in the document, the OCR (Optical Character Recognition) technology can be used to save the inserted table in the document as a picture and store it in the local or database, and insert the table address or link into the corresponding text description position of the original document.

[0055] According to an embodiment of the present application, an entity recognition algorithm and a relationship extraction algorithm can be used to extract knowledge point entities and corresponding interaction relationships between knowledge point entities in each document. The knowledge point entity can be defined as an entity or business subject matter of interest in a scene, such as an organization, a person, an address, a number, a vehicle, an event, and the like. The knowledge point list composed of knowledge point entities can be represented as wherein, represents the knowledge point list, For the i-th knowledge point entity extracted from the document, the structure of each knowledge point can be represented as:

[0056] {"id": "unique identification",

[0057] "introduction": "knowledge point description summarized by the large model",

[0058] "doc": [doc1, doc2], # list of documents belonging to}.

[0059] According to the embodiment of the application, the association information between knowledge point entities in the document is extracted by the relation extraction algorithm, and the output of the interaction relationship list between knowledge point entities can be represented as , wherein

[0060] represents the interaction relationship list between knowledge point entities, is the relationship between the n-th knowledge point entity and the m-th knowledge point entity extracted from the document, the structure of can be represented as:

[0061] {"id": "unique identification",

[0062] "introduction": "knowledge point description summarized by the large model",

[0063] "from": "starting entity",

[0064] "to": "ending entity",

[0065] "doc": [doc1, doc2], # list of documents belonging to}.

[0066] According to the embodiment of the application, after extracting the knowledge point entity and the corresponding interaction relationship between the knowledge point entities in each document, the context of the knowledge point entity and the interaction relationship in the document can be summarized by using the large model to generate a paragraph of text description information corresponding to the knowledge point entity and the interaction relationship as a supplementary introduction.

[0067] According to an embodiment of the present application, after the text description information is generated, the similarity of the multiple synonymous knowledge point entities can be compared to merge the multiple knowledge point entities with similar description contents into the same knowledge point entity. For example, for "tomato", "tomato" and "fire cherry", when the knowledge points are aligned, it is determined through the similarity comparison that the aforementioned "tomato", "tomato" and "fire cherry" are all "tomato", and thus they can be merged into the knowledge point entity "tomato" to avoid the repeated knowledge point entities in the single-document knowledge graph. The single-document knowledge graph constructed according to a single document can be represented as: wherein represents the single-document knowledge graph, represents the knowledge point list, represents the interaction relationship list between .

[0068] According to an embodiment of the present application, after the M single-document knowledge graphs are constructed, the M single-document knowledge graphs can be aligned and fused across documents to obtain a global knowledge graph. Further, the knowledge point entities and the relationship are aligned between the global knowledge graph and the prior knowledge point graph to obtain a prior global knowledge point graph.

[0069] The prior knowledge point graph is a structured semantic network that is constructed before the task occurs and can be directly called by the algorithm. For example, for the knowledge point entity "tomato", the prior knowledge point graph can store the interaction relationship between "tomato" and "fire cherry", i.e., "fire cherry" is the dialectical name of "tomato".

[0070] According to an embodiment of the present application, the global knowledge graph can be represented as wherein, represents the global knowledge graph, represents the global knowledge point list, which can be represented as , represents the interaction relationship list between the global knowledge points, which can be represented as wherein n represents the number of documents. Since the global knowledge graph aligns and fuses the knowledge point entities, the same knowledge point entity in different documents is merged into one knowledge point entity, and thus the number of knowledge point entities in the global knowledge point list is less than the sum of the numbers of the entity knowledge points in the M documents. The prior knowledge point graph can be further divided into a first prior knowledge point sub-graph and a second prior knowledge point sub-graph. The first prior knowledge point sub-graph stores the prior interaction relationship between the knowledge point entities, and the second prior knowledge point sub-graph stores the prior association relationship between the document entities. The aforementioned prior global knowledge graph can be represented as wherein represents the prior global knowledge graph, represents a global knowledge graph, represents a first prior knowledge point sub-graph.

[0071] According to the embodiment of the present application, the first prior knowledge point sub-graph can be a knowledge point sub-graph constructed in advance by the user according to the interaction relationship between the related business data, and the second prior knowledge point sub-graph can be a knowledge point sub-graph constructed in advance by the user according to the association relationship between the related business documents. The business data and the business documents have a corresponding relationship.

[0072] In operation S320, a document knowledge graph representing the association relationship between the M documents is constructed based on the prior global knowledge graph.

[0073] Figure 4 A document knowledge graph according to an embodiment of the present application is shown.

[0074] As shown in Figure 4 , the figure includes document 1, document 2 and document 3, wherein document 1 and document 2 have a citation relationship, and document 1 and document 3 are written by the same author.

[0075] In operation S330, the document knowledge graph is aligned according to the prior knowledge point graph to obtain a prior document knowledge graph.

[0076] The document nodes in the prior document knowledge graph have a mapping relationship with the knowledge point entity nodes in the prior global knowledge graph.

[0077] According to the embodiment of the present application, the external knowledge information in the prior knowledge point graph is used to add additional association information to the document knowledge graph. For example, when the document is a paper, the association information can be the citation relationship between two papers. The prior interaction relationship of the second prior knowledge point sub-graph in the document can be represented as , wherein is the prior relationship between the document and the document . The weight between each two documents can be set to 1.

[0078] Figure 5 A mapping relationship diagram of the prior document knowledge graph and the prior global knowledge graph according to an embodiment of the present application is shown.

[0079] As shown in Figure 5As shown, the mapping relationship diagram includes a prior document knowledge graph 510 and a prior global knowledge graph 520. The prior document knowledge graph 510 includes a first prior knowledge point subgraph 511 and a document knowledge graph 512. The prior global knowledge graph 520 includes a second prior knowledge point subgraph 521 and a global knowledge graph 522. A document node in the document knowledge graph can correspond to at least one knowledge point entity node in the global knowledge point graph. For example, for the document node 512-1, the corresponding knowledge point entity nodes can include 522-1, 522-2 and 522-3. In another embodiment of the present application, the document node 512-1 can only correspond to the knowledge point entity node 522-1.

[0080] According to the embodiment of the present application, by aligning the knowledge graph of a single document, the prior global knowledge graph is obtained, and the prior document knowledge graph is further constructed based on the prior global knowledge graph. The isolated document is constructed as a double-layer structure knowledge graph as the enhanced data input to the pre-trained language model, which provides not only the fine-grained knowledge points, but also the search path for the large language model by the association relationship between documents. Then, when the user asks a question, the prior document knowledge graph of the prior global knowledge graph can be retrieved according to the target question text to obtain the target reply text corresponding to the target question text, effectively utilizing the relationship between documents to obtain more accurate and comprehensive retrieval results, and providing the user with a target reply text more relevant to the target question text.

[0081] According to the embodiment of the present application, the document knowledge graph representing the association relationship between M documents is constructed based on the prior global knowledge graph, including: determining the co-occurrence relationship and co-occurrence frequency between knowledge point entities in the document based on the prior global knowledge graph, the co-occurrence relationship representing the association between knowledge point entities, and the co-occurrence frequency representing the number of times the knowledge point entities appear together in the document; taking the document as a node, the co-occurrence relationship as the first edge, and the co-occurrence frequency as the weight of the first edge, to construct the document knowledge graph.

[0082] According to the embodiment of the present application, the frequency of co-occurrence of knowledge point entities between different documents can be counted according to the prior global knowledge graph, and then the document knowledge graph is constructed according to the knowledge point co-occurrence relationship and the knowledge point co-occurrence frequency. , wherein, represents the association relationship between documents, represents the co-occurrence relationship between the document and the document , and the edge weight between the document and the document is the co-occurrence frequency.

[0083] Exemplarily, for the prior global knowledge graph that has unified the knowledge point entity "tomato = tomato = fire tomato", there are three documents v1: XX early market vegetables, v2: XX area dialect small dictionary, and v3: complete cooking method, v1, v2, and v3 all mention "tomato" (v1 appears 3 times, v2 appears 4 times, and v3 appears 2 times), and the document knowledge graph can be represented as .

[0084] According to the embodiment of the present application, the association relationship between the documents is quantified and identified by the co-occurrence frequency, which facilitates quick positioning of the most relevant documents, and then when the subsequent pre-trained large language model is used for retrieval, the most relevant documents can be found along the co-occurrence frequency between the documents, so as to realize cross-document reasoning and avoid missing collaborative information when generating reply texts only according to the knowledge point entities of a single document. Further, the co-occurrence frequency of the edge weight can be directly used as a sorting basis to preferentially return the documents that frequently co-occur with the current document as reference documents, so as to improve the accuracy and generation efficiency of the reply texts.

[0085] According to the embodiment of the present application, the method further includes: performing community division on each knowledge point entity node in the prior global knowledge graph based on the modularity between the knowledge point entity nodes in the prior global knowledge graph, to obtain a community division result of at least one knowledge point node; determining a community division result of the M documents based on the community division result of the knowledge point entity node; and updating the document knowledge graph based on the community division result of the knowledge point entity node and the community division result of the M documents, to obtain an updated document knowledge graph.

[0086] According to the embodiment of the present application, the updating of the document knowledge graph based on the community division result of the knowledge point entity node and the community division result of the M documents, to obtain the updated document knowledge graph, includes: taking the documents as nodes, taking the community division result of the M documents as second edges, and taking the weight of the second edge as the community division result of each knowledge point entity node in each document, to update the document knowledge graph and obtain the updated document knowledge graph.

[0087] According to the embodiment of the present application, the community discovery can be performed by the Leiden algorithm, so as to aggregate the prior global knowledge graph into multiple communities. In each step of the iteration of the Leiden algorithm, each knowledge point entity node in the prior global knowledge graph is continuously divided into a neighbor community with the goal of maximizing the modularity, until the modularity no longer increases, and finally the community division result of each knowledge point node is obtained. In the case that more than a preset proportion of the knowledge point nodes in a document are divided into the same community, the document is also divided into the community. The aforementioned preset proportion can be 50%, for example. The document community division result can be represented as , wherein represents the document community division result, is a document and a document The weight is the number of community division results of each knowledge point entity node in each document.

[0088] According to an embodiment of the present application, the document knowledge graph can be represented as , wherein represents the document knowledge graph, represents the global document list, represents the association relationship between each document in the global document list, and can be represented as , wherein represents the association relationship between documents, represents the community division result of the document, represents the prior interaction relationship of the document.

[0089] According to an embodiment of the present application, by performing community division on each knowledge point entity node in the prior global knowledge graph, the community division result of M documents is obtained, and then the document knowledge graph is updated through the community division result between documents, so that the document knowledge graph records the association information between documents and the community division result corresponding to the knowledge point entity in the document, thereby improving the retrieval efficiency and retrieval accuracy of the subsequent pre-trained language model, and improving the accuracy of the target reply text.

[0090] According to an embodiment of the present application, the above-mentioned document includes text data, and the method further comprises: generating metadata of M documents based on the text data of M documents and the basic attributes of M documents; and storing the metadata and the text data of M documents into a first database.

[0091] According to an embodiment of the present application, metadata information such as the name, title, abstract, and key phrase of each document can be extracted for each document to construct the metadata feature of each document , wherein is the metadata of the document name, is the metadata of the document title, is the metadata of the document abstract, is the metadata of the document key phrase.

[0092] According to an embodiment of the present application, the above-mentioned document key phrase is a phrase that can summarize the main content of the document extracted from the document abstract. In the case where the document has multiple levels of directories, 3-5 phrases can also be extracted for each level of directory as the document key phrase.

[0093] According to the embodiment of the present application, the metadata of the document title can be extracted by using the document title and the target extraction tool. For the multi-level directory title, the document title can be used as the metadata of the document title, and the multi-level directory title can be marked in the original text. The metadata of the document abstract can be generated by a large language model based on the short abstract information of each document. The metadata of the document key phrase can be extracted by using a document key phrase extraction algorithm. Five key phrases of the entire document can be extracted as the metadata information of the document key phrase based on the document abstract. Further, 3-5 key phrases under each directory can be extracted as the supplementary information of the document key phrase based on the multi-level directory of the document.

[0094] According to the embodiment of the present application, the document can be divided based on the extracted title and the multi-level directory metadata information of the document. For the block with too long text, the semantic clustering algorithm is used to group the too long text in the unit of paragraph, and then the length of the block is divided into a moderate length. In addition, the metadata information such as the document name, the title, the abstract, and the key word is attached to each paragraph as the supplementary information for metadata retrieval.

[0095] According to the embodiment of the present application, the first database can be a document database, for example, an Elasticsearch database. The text content information and the metadata information in the document can be stored in the first database based on the semantic block result and the metadata enhancement result, so as to be used as the full-text retrieval attribute of the document object.

[0096] According to the embodiment of the present application, the method further includes: for the mth document in the M documents, dividing the text data of the mth document based on the text structure of the text data of the mth document to obtain segmented data of the text data of the mth document, so as to obtain segmented data of the M documents, wherein 1≤m≤M; inputting the segmented data of the M documents into a pre-trained vector model to obtain a segment vector corresponding to each segmented data; and storing the segment vector to a second database.

[0097] According to the embodiment of the present application, the document structure can be a multi-level title, a paragraph, or the like. After the document is divided into blocks, the metadata information such as the document name, the document title, and the target, and the paragraph key word can be attached to each paragraph block as the metadata enhancement information. Each semantic block is converted into a segment vector by using a text vectorization model, and is stored in the second database as the vector attribute of the document object. The second database can be a vector database, for example, a Milvus vector database.

[0098] According to the embodiment of the present application, each document is divided into semantic paragraphs according to the structure of title, paragraph, etc., and metadata such as document name, title, keyword is attached to each paragraph, and the segmented data is further converted into paragraph vectors and stored in the second database, that is, the fine-grained semantic information is retained, and the interpretable structured label is integrated, thereby providing an interpretable semantic retrieval basis for the pre-trained language model, so that the pre-trained language model can directly locate the segmented data of the corresponding source document on the basis of quickly retrieving the corresponding enhanced data, thereby improving the reply accuracy and interpretability of the language model.

[0099] According to the embodiment of the present application, the above-mentioned document includes image data, and the method further includes: storing the source files of the M documents and the image data of the M documents into a third database; and storing the prior global knowledge graph and the prior document knowledge graph into a fourth database.

[0100] According to the embodiment of the present application, the third database can be a distributed object storage database for storing unstructured data. After the source files and image data of the documents are stored into the third database, document source file link information and image source file link information can be generated together to serve as the attributes of the document object and the image data, respectively.

[0101] According to the embodiment of the present application, the fourth database can be, for example, a graph database, such as an ArangoDB graph database. In the fourth database, the sub-prior knowledge point graph corresponding to each document in the prior knowledge point graph is in the form of an overlapping community as the knowledge point graph attribute of the document object. Further, the community division result of the knowledge point entity node in the above-mentioned document can be input into the pre-trained language model to generate a knowledge community summary, and the knowledge community summary is stored in the first database.

[0102] According to the embodiment of the present application, by storing the paragraph vector, the source file, the text data, the metadata and the image data into different databases, the problem of chaotic storage of multi-source information of the document is solved, and the foundation for efficient utilization of multi-element information of the document is laid.

[0103] According to the embodiment of the present application, the above-mentioned determining the enhanced data for the target question text by using the prior global knowledge graph and the prior document knowledge graph in response to receiving the target question text comprises: retrieving a first database based on the target question text to obtain at least one first retrieval result; retrieving a second database based on a target text vector of the target question text to obtain at least one second retrieval result; performing entity extraction on the target question text to obtain a target question entity; retrieving a fourth database based on the target question entity to obtain at least one knowledge point entity node in the prior knowledge point graph; and determining at least one enhanced data based on the first retrieval result, the second retrieval result, the at least one knowledge point entity node and a mapping relationship between a document node and the knowledge point entity node.

[0104] According to the embodiment of the present application, for the document text and metadata storage content stored in the first database, the target question text can be retrieved based on the full-text search engine corresponding to the first database to obtain at least one first retrieval result (full-text retrieval semantic block result).

[0105] According to the embodiment of the present application, the target text vector of the target question text can be obtained by a text vectorization model, so as to further retrieve the second database according to the target question text vector to obtain at least one second retrieval result (vector block content), and return the corresponding original text information through the mapping of the vector.

[0106] According to the embodiment of the present application, the prior global knowledge point graph of the document is retrieved and aligned by the fourth database according to the target question entity to obtain the corresponding knowledge point entity node, and the related information of the knowledge point entity node is obtained by relationship retrieval according to the knowledge point entity node.

[0107] According to the embodiment of the present application, by using the above-mentioned first retrieval result, the second retrieval result and the at least one knowledge point entity node, N original document blocks can be determined, and the prior document knowledge graph is retrieved from the N original document blocks as the starting point, so as to obtain M document blocks related to the knowledge in the N documents.

[0108] According to the embodiment of the present application, the first database is retrieved by the target question text to obtain a first retrieval result, the second database is retrieved by the target text vector to obtain a second retrieval result, the fourth database is retrieved by the target question entity to obtain at least one knowledge point entity node, and further, at least one enhanced data is determined according to the first retrieval result, the second retrieval result, the at least one knowledge point entity node, and the mapping relationship between the knowledge point entity node and the document, so that the pre-trained language model can retrieve each database in multiple ways, thereby making the first retrieval result, the second retrieval result, and the third retrieval result complementary and integrated in semantics, structure, and relationship, constructing enhanced data with high confidence, and further making the pre-trained language model output the target reply text with high accuracy and strong interpretability.

[0109] According to the embodiment of the present application, the above method further comprises: sorting the first retrieval result, the second retrieval result, the at least one knowledge point entity node, and the at least one enhanced data based on the result relevance to obtain a sorted candidate enhanced result.

[0110] According to the embodiment of the present application, the result relevance represents the relevance between each retrieval result and the target question text, and each retrieval result can be sorted based on the result relevance by using a reordering model to obtain a sorted candidate enhanced result.

[0111] According to the embodiment of the present application, the above inputting the target question text and the enhanced data into the pre-trained language model to generate the target reply text corresponding to the target question text comprises: inputting the first K candidate enhanced results in the sorted candidate enhanced result and the target question text into the pre-trained language model to generate the target reply text, K being an integer greater than 1.

[0112] According to the embodiment of the present application, the pre-trained language model generates the target reply text according to the target question text and the multiple blocks of prompt words by inputting the sorted candidate enhanced result into the pre-trained language model as the multiple blocks of prompt words.

[0113] Figure 6 A storage architecture diagram according to an embodiment of the present application is shown.

[0114] As Figure 6As shown, the storage structure diagram is composed of the first database, the second database, the third database, the fourth database and the fifth database in cooperation. The unique primary key of the knowledge point entity and the double-layer knowledge graph (i.e. the prior global knowledge graph and the prior document knowledge graph) are stored in the fourth database. The fourth database is used as a retrieval hub and is in communication connection with the first database, the second database, the third database and the fifth database. The second database stores the text vector (segment vector) in the document and is used for semantic approximate retrieval. The third database stores the source document corresponding to the document and the image data in the document. The first database stores the text data in the document and the metadata corresponding to the document and is responsible for keyword retrieval. The fifth database stores the basic information of the document. Through the architecture, keyword, semantic, graph relationship, file original content and business attribute can be used for multi-path retrieval and fusion sorting at the same time, and the retrieval precision, interpretability and traceability are significantly improved.

[0115] Based on the above-mentioned retrieval enhancement generation method based on the document knowledge base and the knowledge graph, the application further provides a retrieval enhancement generation device based on the document knowledge base and the knowledge graph. The following will be described in detail Figure 7 The device will be described in detail.

[0116] Figure 7 The structure block diagram of the retrieval enhancement generation device based on the document knowledge base and the knowledge graph according to the embodiment of the application is shown.

[0117] As Figure 7 shown, the retrieval enhancement generation device based on the document knowledge base and the knowledge graph of the embodiment 700 includes an enhancement data determination module 710 and a generation module 720.

[0118] The enhancement data determination module 710 is used to determine the enhancement data for the target question text by using the prior global knowledge graph and the prior document knowledge graph in response to receiving the target question text. In an embodiment, the enhancement data determination module 710 can be used to perform the operation S210 described above, and details are not repeated here.

[0119] The generation module 720 is used to input the target question text and the enhancement data into the pre-trained language model to generate the target reply text corresponding to the target question text. In an embodiment, the generation module 720 can be used to perform the operation S220 described above, and details are not repeated here.

[0120] According to an embodiment of the present application, any of the enhancement data determining module 710, the generating module 720 can be combined in one module, or any of them can be split into multiple modules. Alternatively, at least part of the function of one or more of these modules can be combined with at least part of the function of other modules, and implemented in one module. According to an embodiment of the present application, at least one of the enhancement data determining module 710, the generating module 720 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on chip, a system on board, a system on package, an application specific integrated circuit (ASIC), or any other reasonable way of integrating or packaging a circuit, etc. in hardware or firmware, or in any one of the three implementation ways of software, hardware and firmware, or in a proper combination of any of them. Alternatively, at least one of the enhancement data determining module 710, the generating module 720 can be at least partially implemented as a computer program module, which can perform the corresponding function when it is run.

[0121] Figure 8 A block diagram of an electronic device suitable for implementing the method for generating retrieval enhancement based on a document knowledge base and a knowledge graph according to an embodiment of the present application is shown.

[0122] As shown in Figure 8 The electronic device 800 according to an embodiment of the present application includes a processor 801, which can perform various appropriate actions and processes according to programs stored in a read-only memory (ROM) 802 or loaded from a storage portion 808 into a random access memory (RAM) 803. The processor 801 can include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor, and / or a related chipset, and / or a special-purpose microprocessor (e.g., an application specific integrated circuit (ASIC)), etc. The processor 801 can also include an on-board memory for cache use. The processor 801 can include a single processing unit or multiple processing units for performing different actions of the method processes according to embodiments of the present application.

[0123] In the RAM 803, various programs and data required for the operation of the electronic device 800 are stored. The processor 801, the ROM 802, and the RAM 803 are connected to each other through a bus 804. The processor 801 performs various operations of the method processes according to embodiments of the present application by executing programs in the ROM 802 and / or the RAM 803. It should be noted that the programs can also be stored in one or more memories other than the ROM 802 and the RAM 803. The processor 801 can also perform various operations of the method processes according to embodiments of the present application by executing programs stored in the one or more memories.

[0124] According to an embodiment of the present application, the electronic device 800 can further include an input / output (I / O) interface 805 also connected to the bus 804. The electronic device 800 can further include one or more of the following components connected to the input / output (I / O) interface 805: an input part 806 including a keyboard, a mouse, etc.; an output part 807 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage part 808 including a hard disk, etc.; and a communication part 809 including a network interface card such as a LAN card, a modem, etc. The communication part 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to the input / output (I / O) interface 805 as necessary. A removable medium 811 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc. is mounted on the drive 810 as necessary, so that a computer program read out therefrom is installed in the storage part 808 as necessary.

[0125] The present application also provides a computer readable storage medium, which can be included in the device / apparatus / system described in the above embodiments; or can exist separately without being assembled into the device / apparatus / system. The above computer readable storage medium carries one or more programs, which when executed, implement the method according to the embodiments of the present application.

[0126] According to an embodiment of the present application, the computer readable storage medium can be a non-volatile computer readable storage medium, which can include, but is not limited to, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present application, the computer readable storage medium can be any tangible medium that contains or stores a program that can be used by or in connection with an instruction execution system, apparatus, or device. For example, according to an embodiment of the present application, the computer readable storage medium can include the ROM 802 and / or the RAM 803 described above and / or one or more memory other than the ROM 802 and the RAM 803.

[0127] The embodiments of the present application also include a computer program product, which includes a computer program containing program codes for executing the method shown in the flow chart. When the computer program product is run in a computer system, the program codes are used to make the computer system implement the retrieval enhancement generation method based on a document knowledge base and a knowledge graph provided by the embodiments of the present application.

[0128] The above-described functions of the system / apparatus defined in the embodiments of the present application are performed when the computer program is executed by the processor 801. According to the embodiments of the present application, the system, apparatus, module, unit, etc. described above can be implemented by the computer program modules.

[0129] In one embodiment, the computer program can be stored in a tangible storage medium, such as an optical, magnetic, or other memory on a hard disk or solid state drive. In another embodiment, the computer program can be transmitted over a network, using any available network medium, including wireless, wired, etc., or any suitable combination of the above. In such an embodiment, the computer program is downloaded and installed by the communication section 809, and / or installed from the removable medium 811. The program code contained in the computer program can be transmitted using any suitable network medium, including, but not limited to, wireless, wired, etc., or any suitable combination of the above.

[0130] In such an embodiment, the computer program can be downloaded and installed by the communication section 809 from a network, and / or installed from the removable medium 811. When the computer program is executed by the processor 801, the above-described functions of the system defined in the embodiments of the present application are performed. According to the embodiments of the present application, the system, apparatus, module, unit, etc. described above can be implemented by the computer program modules.

[0131] According to the embodiments of the present application, the program code for carrying out the computer program provided by the embodiments of the present application can be written in any combination of one or more programming languages, and specifically, these computer programs can be implemented using high-level procedural and / or object-oriented programming language, and / or assembly / machine language. The programming language includes, but is not limited to, such as Java, C++, python, "C" language, or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on a remote computing device, or entirely on a remote computing device or server. In the case involving a remote computing device, the remote computing device can be connected to the user computing device through any kind of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, connected to the Internet through an Internet service provider).

[0132] The computer program product of the present application can be a computer program product comprising a computer readable storage medium and a computer program mechanism embedded in the computer readable storage medium. Such computer program product can further include a computer readable storage medium and program means for causing a processor or other programmable processing apparatus to function in a particular manner, such that the computer program mechanism embedded in the computer readable storage medium can be used to actually effect the apparatus functions.

[0133] Those skilled in the art will appreciate that the features recited in the various embodiments of the present application can be combined and / or integrated in a variety of ways, even if such combinations or integrations are not expressly noted in the present application. In particular, the features recited in the various embodiments of the present application can be combined and / or integrated in a variety of ways without departing from the spirit and scope of the present application. All such combinations and / or integrations are within the scope of the present application.

[0134] The embodiments of the present application have been described above. However, these embodiments are merely intended for illustration, and are not intended to limit the scope of the present application. Although the embodiments are described separately above, this does not mean that the measures in the various embodiments cannot be used advantageously in combination. Various alternatives and modifications can be made to the embodiments of the present application by those skilled in the art without departing from the scope of the present application, and such alternatives and modifications are intended to fall within the scope of the present application.

Claims

1. A method for generating retrieval enhancement based on a document knowledge base and a knowledge graph, characterized in that, The document knowledge base comprises M documents, M being an integer greater than 1, and the method comprises: in response to receiving the target question text, determining enhanced data for the target question text by using a prior global knowledge graph and a prior document knowledge graph; inputting the target question text and the enhanced data into a pre-trained language model to generate target reply text corresponding to the target question text, wherein the prior global knowledge graph and the prior document knowledge graph are obtained by the following operations: aligning M single-document knowledge graphs constructed based on the M documents according to a prior knowledge point graph to obtain a prior global knowledge graph, the single-document knowledge graph representing the interaction relationship between knowledge point entities in the document, and the prior global knowledge graph representing the interaction relationship between knowledge point entities in each document and prior knowledge points in the prior knowledge point graph; constructing a document knowledge graph representing the association relationship between the M documents based on the prior global knowledge graph; aligning the document knowledge graph according to the prior knowledge point graph to obtain a prior document knowledge graph, the document nodes in the prior document knowledge graph having a mapping relationship with the knowledge point entity nodes in the prior global knowledge graph.

2. The method of claim 1, wherein, The method further comprises: determining the co-occurrence relationship and co-occurrence frequency of the knowledge point entities in the document based on the prior global knowledge graph, the co-occurrence relationship representing the association between the knowledge point entities, and the co-occurrence frequency representing the number of times the knowledge point entities appear together in the document; constructing the document knowledge graph by taking the document as a node, the co-occurrence relationship as a first edge, and the co-occurrence frequency as the weight of the first edge.

3. The method of claim 2, wherein, The method further comprises: performing community division on each knowledge point entity node in the prior global knowledge graph based on the modularity between the knowledge point entity nodes in the prior global knowledge graph to obtain a community division result of at least one knowledge point node; determining a community division result of the M documents based on the community division result of the knowledge point entity node; updating the document knowledge graph based on the community division result of the knowledge point entity node and the community division result of the M documents to obtain an updated document knowledge graph.

4. The method of claim 3, wherein, The method further comprises: updating the document knowledge graph by taking the document as a node, the community division result of the M documents as a second edge, and the community division result of each knowledge point entity node in each document as the weight of the second edge to obtain the updated document knowledge graph.

5. The method of claim 1, wherein, The document comprises text data, and the method further comprises: generating metadata of the M documents based on the text data of the M documents and the basic attributes of the M documents; storing the metadata of the M documents and the text data into a first database.

6. The method of claim 5, wherein, The method further comprises: For an mth document in the M documents, segmenting text data of the mth document based on a text structure of the text data of the mth document to obtain segmented data of the text data of the mth document, to obtain segmented data of the M documents, where 1≤m≤M; inputting the segmented data of the M documents into a pre-trained vector model to obtain a segment vector corresponding to each of the segmented data; storing the segment vector into a second database.

7. The method of claim 6, wherein, The document includes image data, and the method further includes: storing source files of the M documents and image data of the M documents into a third database; storing the prior global knowledge graph and the prior document knowledge graph into a fourth database.

8. The method of claim 7, wherein, The method further includes: retrieving the first database based on the target question text to obtain at least one first retrieval result; retrieving the second database based on a target text vector of the target question text to obtain at least one second retrieval result; performing entity extraction on the target question text to obtain a target question entity; retrieving the fourth database based on the target question entity to obtain at least one knowledge point entity node in the prior knowledge point graph; determining at least one enhanced data based on the first retrieval result, the second retrieval result, the at least one knowledge point entity node, and a mapping relationship between the knowledge point entity node and the document node.

9. The method of claim 8, wherein, The method further includes: ordering the first retrieval result, the second retrieval result, the at least one knowledge point entity node, and the at least one enhanced data based on result relevance to obtain ordered candidate enhanced results.

10. The method of claim 9, wherein, The method further includes: inputting the first K candidate enhanced results in the ordered candidate enhanced results and the target question text into the pre-trained language model to generate the target reply text, K being an integer greater than 1.

Citation Information

Patent Citations

  • Knowledge base question and answer method and system fusing knowledge graph and RAG

    CN119862248A

  • Retrieval enhancement generation method and device based on knowledge graph, equipment and medium

    CN120277206A