Intelligent question answering method based on collaboration between large language model and knowledge graph

By breaking down complex problems into simpler ones and utilizing a collaborative approach between large language models and knowledge graphs, a knowledge graph is constructed and reasoning paths are iteratively verified. This solves the interpretability and accuracy issues of intelligent question-answering systems in handling complex problems, and improves the efficiency and accuracy of multi-hop question answering.

WO2026056986A1PCT designated stage Publication Date: 2026-03-19INSPUR GENERSOFT CO LTD

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2025-09-11
Publication Date
2026-03-19

AI Technical Summary

Technical Problem

Existing intelligent question-answering systems suffer from poor interpretability, high costs, difficulty in integrating long-tail knowledge, and high risk of data leakage when dealing with complex problems, especially those involving multi-step reasoning and multiple reasoning techniques.

Method used

Complex problems are broken down into multiple simple problems. By leveraging a large language model and knowledge graph in synergy, a multi-task learning framework is used to automatically extract structured information, construct a knowledge graph, and iteratively verify the reasoning path through a cumulative reasoning learning framework of a large logical reasoning model to ensure the accuracy of the answer.

Benefits of technology

It enhances the logical analysis capability, knowledge structure representation capability, and multi-hop question-and-answer process reasoning capability for complex problems, realizes the generation of interpretable answers, and reduces reasoning errors in multi-hop reasoning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025120771_19032026_PF_FP_ABST
    Figure CN2025120771_19032026_PF_FP_ABST
Patent Text Reader

Abstract

Provided in the present application is an intelligent question answering method based on a collaboration between a large language model and a knowledge graph, relating to the technical fields of artificial intelligence and natural language processing, the method comprising: decomposing a complex question into a plurality of simple questions, and analyzing the degree of association between the simple questions and a basic function so as to form a multi-hop reasoning path; automatically extracting structured information from the simple questions on the basis of a multi-task learning framework of a large model, so as to construct a knowledge graph; and constructing a cumulative reasoning learning framework on the basis of a logic reasoning large model, and performing iterative verification on a process result formed by the knowledge graph on the basis of the multi-hop reasoning path, so as to correct the reasoning path until a correct answer is inferred.
Need to check novelty before this filing date? Find Prior Art

Description

An intelligent question answering method based on large language model and knowledge graph collaboration

[0001] Cross-reference to Related Applications

[0002] This application claims priority to the Chinese patent application No. 202411274109.4, filed on September 12, 2024, and entitled "An intelligent question answering method based on large language model and knowledge graph collaboration", the content of which is incorporated herein by reference in its entirety. TECHNICAL FIELD

[0003] The present application belongs to the field of artificial intelligence and natural language processing, and specifically relates to an intelligent question answering method based on large language model and knowledge graph collaboration. BACKGROUND

[0004] With the rapid development of generative AI (Artificial Intelligence) technology, intelligent question answering systems based on large language models have become an important research focus in the field of natural language processing. Such systems aim to provide accurate and reliable answers to users' questions in natural language form, combined with the context environment, thereby improving the search experience of users. Intelligent question answering systems are mainly composed of three modules: question analysis module, information retrieval module and answer extraction module. These three modules work together to ensure that the process from the user's question to the generation of the final answer is efficient and accurate.

[0005] The development of intelligent question answering systems has gone through several stages, including question answering systems based on large-scale document sets, question answering systems based on question-answer pairs (such as FAQ (Frequently Asked Questions) and CQA (Commonly Questioned Answers)), knowledge graph-based question answering systems, and large-scale language model-based question answering systems. Each stage of technology has its specific advantages and limitations. For example, question answering systems based on large-scale document sets can access a large amount of unstructured data, but the understanding of complex questions is not accurate enough; question answering systems based on question-answer pairs can provide high-quality answers, but the cost of obtaining and maintaining these question-answer pairs is high, and they perform poorly when faced with diverse user questions; knowledge graph-based question answering systems can provide structured and detailed answers, but the cost of building and maintaining knowledge graphs is high; and large-scale language model-based question answering systems such as ChatGPT (Chat Generative Pre-trained Transformer) are known for their powerful natural language understanding and generation capabilities, but they have accuracy problems when it comes to vertical domain knowledge questions.

[0006] Although intelligent question answering systems have made significant progress in intent recognition, information retrieval, and answer generation, existing intelligent question answering systems face great challenges in dealing with problems that require multi-step reasoning and multiple reasoning skills, such as multi-hop reasoning, counting, etc. It is difficult to decompose complex problems into simple problems and accurately describe the logical reasoning process. Although large language models have strong language understanding and content generation capabilities, the generated content lacks explainability and has factual errors. Meanwhile, knowledge graphs have high structure and explainability, but are costly to build and relatively weak in natural language processing. Large language models are slow to update knowledge and difficult to integrate long-tail knowledge, and there is a risk of data leakage. In addition, the cost of training and inference is high, which limits their ability to acquire new knowledge. SUMMARY

[0007] The present application provides an intelligent question answering method based on the cooperation of large language models and knowledge graphs to solve the problem of poor explainability of complex problems.

[0008] The technical solution adopted by the present application is:

[0009] The present application provides an intelligent question answering method based on the cooperation of large language models and knowledge graphs, comprising:

[0010] The complex problem is decomposed into multiple simple problems, and the correlation degree of the simple problems and the basic functions is analyzed to form a multi-hop reasoning path;

[0011] A multi-task learning framework based on a large model is used to automatically extract structured information for simple problems to construct a knowledge graph;

[0012] A cumulative reasoning learning framework based on a logic reasoning large model is constructed to iteratively verify the process results of the knowledge graph based on the multi-hop reasoning path to correct the reasoning path until the correct answer is obtained.

[0013] The intelligent question answering method based on the cooperation of large language models and knowledge graphs provided by the present application further comprises the following additional technical features: the complex problem is decomposed into multiple simple problems, specifically:

[0014] Fine-tuning based on a general basic large model is performed to strengthen the logic reasoning capability of the large model, and instruction fine-tuning is used to conditionally constrain the output of the large model to ensure that each sub-problem after decomposition of the complex problem contains only one triple. Each sub-problem is solved using a basic function, and each sub-problem contains only a single relationship, thereby becoming a simple problem.

[0015] In some embodiments of the present application, the correlation degree of the simple problems and the basic functions is analyzed to form a multi-hop reasoning path, specifically:

[0016] Each simple question is regarded as an agent, a basic function call model of multi-agent reinforcement learning is used, a matching relationship is established between the simple question and the basic function, and a selection strategy is optimized;

[0017] A variable-length reasoning path description method based on an inverse binary tree is used to decompose a complex problem into a multi-step program, and a step-by-step intermediate program is used to simulate a complex logical reasoning process for answering the question.

[0018] In some embodiments of the present application, a large model-based multi-task learning framework is used to automatically extract structured information from simple questions to construct a knowledge graph, specifically:

[0019] A complex question is decomposed into multiple simple questions and vectorized, the vectorized simple questions are matched with the content of the vector library in terms of semantic similarity, the words closest in semantic to the simple questions are found, the corresponding text blocks are embedded, and structured information is automatically extracted from the retrieved text blocks;

[0020] Based on the large model-based multi-task learning framework, the output is guided by human instructions, the information extraction task is uniformly modeled, and the dependency between tasks is captured, the large model is trained to generate a token sequence representing the required output structure and the corresponding label after the source text and the instruction of a specific task are given, the field knowledge graph is constructed using a graph neural network, and the semantic relationship between data is learned using the information propagation mechanism of the graph neural network.

[0021] In some embodiments of the present application, a cumulative reasoning learning framework based on a logical reasoning large model is constructed, the process results of the knowledge graph based on the multi-hop reasoning path are iteratively verified to correct the reasoning path until the correct answer is reasoned out, specifically:

[0022] Based on the multi-hop reasoning path generated by the complex question, different knowledge graphs give their own logical reasoning paths;

[0023] Decision makers and verifiers are introduced, the decision makers are responsible for selecting potential reasoning paths or generating possible results according to the current context, and the verifiers judge the accuracy of the current reasoning path and evaluate whether the current result is the final reasoning result according to the accumulated context;

[0024] The output of each processing unit is used as the input of the next unit, the reasoning results of each unit are accumulated, and the output of each processing unit is iteratively verified using the logical reasoning large model to ensure that the current reasoning result can be evaluated at each intermediate link in reasoning;

[0025] A feedback loop mechanism is established to enable the logical reasoning large model to dynamically adjust the reasoning path according to the verification result.

[0026] In some embodiments of the present application, given the source text and the instructions for a specific task, the large model is trained to generate a token sequence representing the required output structure and its corresponding labels, specifically:

[0027] The descriptive instructions are designed to help the large model understand different information extraction tasks and adopt an option mechanism including all candidate categories as a constraint for the output space; the task instructions provide sufficient information to ensure that the large model can extract relevant information from the input text and generate the required output structure, including the type of information to be extracted, the format of the output structure, and any additional constraints or rules to be followed during the extraction process;

[0028] During training, instructions for all tasks are provided, and the model is fine-tuned according to a set of labeled data for each task;

[0029] For the source text, the designed descriptive instructions will guide the pre-trained language model to generate the target structure and its corresponding type, and the model will generate the target structure in natural language form while generating the corresponding labels;

[0030] Each task instance contains four attributes: task instructions, options, input text, and output, the task instructions describe how to extract relevant information from the input text and generate the required output structure; the options are the output label constraints of the task; the input text is the input sentence of the task instance, and the output is the sentence converted from the original labels of the sample;

[0031] The final generated token sequence is used to construct a knowledge graph.

[0032] In some embodiments of the present application, the task instructions describe how to extract relevant information from the input text and generate the required output structure; the options are the output label constraints of the task; the input text is the input sentence of the task instance, and the output is the sentence converted from the original labels of the sample.

[0033] A computer program product containing instructions which, when run on a device, cause the device to perform steps in a method of intelligent question answering based on the cooperation of a large language model and a knowledge graph.

[0034] A computer non-volatile readable storage medium having a program stored thereon, the program being executed by a processor to implement steps in a method of intelligent question answering based on the cooperation of a large language model and a knowledge graph.

[0035] An electronic device comprising a memory, a processor, and a program stored on the memory and executable on the processor, the processor implementing steps in a method of intelligent question answering based on the cooperation of a large language model and a knowledge graph when executing the program.

[0036] Due to the adoption of the above technical solutions, the application has the following beneficial effects:

[0037] 1. The application deeply cooperates a large model with a knowledge graph to construct an intelligent question and answer system based on a knowledge graph retrieval enhanced generation model. In the problem analysis link, a large model thinking chain is used to disassemble a complex problem, and an inverse binary tree is used to describe the logical reasoning process. In the information retrieval link, a large model multi-task optimization instruction model is used to extract information from the retrieved text and automatically construct a knowledge graph. In the answer generation link, a cumulative reasoning learning framework is used to infer the correct answer from the knowledge graph according to the problem description, thereby changing the existing knowledge question and answer paradigm, improving the logical analysis capability of complex problems, the knowledge structured representation capability, and the process reasoning capability of multi-hop question and answer, and realizing the inference of an interpretable answer from a mass of text library.

[0038] 2. The application uses a complex problem logical reasoning process description method based on a large model thinking chain to realize the conversion of a complex problem into a simple question and answer reasoning combination problem, and improves the accuracy of multi-hop reasoning and answering of complex problems.

[0039] 3. The application uses a large model to improve the knowledge graph construction precision, constructs a domain knowledge graph based on a large model multi-task instruction optimization, and enhances the question and answer paradigm interpretability of the large model mounted external data.

[0040] 4. The application builds a cumulative reasoning learning framework based on a logical reasoning large model, solves the knowledge fallacy problem, and reduces the reasoning error in multi-hop reasoning and answering.

[0041] 5. The application constructs a new intelligent question and answer system driven by a large model and a knowledge graph, which has more in-depth semantic understanding ability, powerful knowledge representation and reasoning ability, realizes the interpretability of complex problem reasoning, and further promotes the development of the field. BRIEF DESCRIPTION OF DRAWINGS

[0042] The drawings described herein are used to provide further understanding of the application, and form a part of the application. The illustrative embodiments of the application and their descriptions are used to explain the application, and do not constitute an improper limitation on the application. In the drawings:

[0043] Fig. 1 is a framework diagram of an intelligent question and answer method based on the cooperation of a large language model and a knowledge graph according to an embodiment of the application;

[0044] Fig. 2 is a flowchart of an intelligent question and answer method based on the cooperation of a large language model and a knowledge graph according to an embodiment of the application;

[0045] Fig. 3 is a problem analysis schematic diagram of an intelligent question and answer method based on the cooperation of a large language model and a knowledge graph according to an embodiment of the application;

[0046] FIG. 4 is a knowledge graph construction schematic diagram of an intelligent question answering method based on large language model and knowledge graph collaboration provided by an embodiment of the present application. DETAILED DESCRIPTION

[0047] In order to more clearly illustrate the overall concept of the present application, the following will be described in detail with reference to the accompanying drawings.

[0048] In the following description, a large number of specific details are set forth in order to facilitate a thorough understanding of the present application, however, the present application can also be implemented in other ways different from those described herein, therefore, the protection scope of the present application is not limited by the specific embodiments disclosed below. It should be noted that the embodiments of the present application and the features in each embodiment can be combined with each other without conflict.

[0049] In the present application, unless otherwise explicitly specified and limited, the first feature is "on" or "under" the second feature, which can be direct contact between the first and second features, or indirect contact between the first and second features through an intermediate medium. In the description of the present specification, the description of the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In the present specification, the illustrative description of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.

[0050] Embodiment 1

[0051] As shown in FIGS. 1-2, an intelligent question answering method based on large language model and knowledge graph collaboration includes:

[0052] The complex problem is decomposed into multiple simple problems, and the correlation degree of the simple problems and the basic functions is analyzed to form a multi-hop reasoning path.

[0053] Specifically, the complex problem is decomposed as follows:

[0054] First, the complex problem is decomposed into a series of smaller and more manageable sub-problems based on the large model thinking chain, and then these sub-problems are gradually solved to finally solve the original problem.

[0055] To this end, a complex problem step-by-step logical solution dataset is constructed, and fine-tuning training is performed based on a general basic large model to strengthen the logical reasoning capability of the large model.

[0056] The output of the large model is conditionally constrained using instruction fine-tuning, ensuring that each sub-problem after complex problem decomposition contains only one triple, so that each sub-problem can be solved with a basic function, and each sub-problem contains only a single relationship, making it a simple problem.

[0057] Analyzing the degree of association between simple problems and basic functions:

[0058] Each sub-problem is considered as an agent, and the basic function call model of multi-agent reinforcement learning is used to establish a matching relationship between the decomposed sub-problems and the basic functions, and the selection strategy is optimized.

[0059] The purpose of this is to call the appropriate basic function to match the corresponding sub-problem.

[0060] In this process, a function library containing 13 basic functions such as counting, comparison, lookup, association, and logical operations is designed, which covers Find (find all entities with a specific name), FilterConcept (find all entities with a specific concept), Relate (find all entities with a specific relationship to the input entity and the corresponding triple) and other operations.

[0061] Forming a multi-hop reasoning path:

[0062] A variable-length reasoning path description method of inverse binary tree is proposed, which decomposes the complex problem program modeling into a multi-step program.

[0063] Each intermediate step program involves a basic function with entity parameters, which can be represented as a binary tree.

[0064] As shown in Figure 2, the directed edge between two nodes represents the dependency relationship between two functions, and the left subtree of each intermediate binary tree is a basic function, and the right subtree is the corresponding entity parameter, and the root node represents the output result, and is also regarded as the entity parameter of the previous binary tree.

[0065] This means that the target function takes the output of the source function as its parameter. The tree structure program is serialized by post-order traversal and formalized as a sequence of i functions, which is as follows: F1(a1,b1)F2(a2, b2)F3(a3,b3)…Fi(ai,bi), where each basic function receives a list of entity parameters (ai,bi), which need to be reasoned according to the problem.

[0066] In this way, the direct solution of complex problems is transformed into a multi-step simple question and answer reasoning combination problem, reducing the difficulty of multi-hop reasoning of complex problems.

[0067] For example, step one: complex problem decomposition

[0068] Objective: Break down complex problems into a series of smaller, more manageable sub-problems.

[0069] Method: Construct a complex problem step-by-step logical solution dataset, fine-tune training based on general-purpose base models, and strengthen the logical reasoning ability of large models. Use instruction fine-tuning to conditionally constrain the output of large models, ensuring that each sub-problem after splitting a complex problem contains only one triple, making each sub-problem solvable with a basic function, and each sub-problem containing only a single relationship, thus becoming a simple problem.

[0070] Step two: analyze the degree of association

[0071] Objective: Establish a consistent matching relationship between split sub-problems and basic functions.

[0072] Method: Treat each sub-problem as an intelligent agent, use a multi-agent reinforcement learning-based basic function call model to establish a matching relationship between sub-problems and basic functions, and optimize the selection strategy. Design a function library containing 13 basic functions such as counting, comparison, lookup, association, and logical operations.

[0073] Step three: form a multi-hop reasoning path

[0074] Objective: Propose a method to describe the reasoning path of a complex problem.

[0075] Method: Use the variable-length reasoning path description method of inverse binary trees to model complex problems as a multi-step procedure. Each intermediate step involves a basic function containing entity parameters, forming a binary tree structure, and serializing it into a function sequence through post-order traversal.

[0076] Example

[0077] Suppose there is a complex problem: "Find all science fiction novels published before 1980 and written by famous authors."

[0078] Step one: break down the problem into multiple simple problems.

[0079] Sub-problem 1: "Find all science fiction novels."

[0080] Sub-problem 2: "Filter out novels published before 1980."

[0081] Sub-problem 3: "Identify books written by famous authors."

[0082] Step two: match each sub-problem with the corresponding basic function.

[0083] Sub-problem 1: "Find all science fiction novels."

[0084] FilterStr function can be used to find all entities with a specific attribute value (i.e., genre of science fiction).

[0085] Sub-problem 2: "Filter out novels published before 1980."

[0086] The SelectAmong function can be used to query the collection for entities with a specific attribute value (publication date less than 1980) that is greater than the input entity.

[0087] Sub-problem 3: "Identify books written by famous authors."

[0088] The Relate function can be used to find all entities and corresponding triples that have a specific relationship (author relationship) with the input entity (famous author).

[0089] Step 3: Form a multi-hop reasoning path.

[0090] Organize the above sub-problems in a logical order.

[0091] First, use the FilterStr function to find all science fiction novels.

[0092] Then use the SelectAmong function to filter out works published before 1980 from these science fiction novels.

[0093] Finally, use the Relate function to identify novels written by famous authors.

[0094] In this way, a multi-hop reasoning path is formed that can ultimately answer the original complex question.

[0095] Further, the basic function library can be improved: although a basic function library containing counting, comparison, lookup, association, logical operation and other functions has been designed, the basic function library can be further expanded and optimized according to the needs of actual application scenarios, so that it can cover more types of problems and more complex logical operations.

[0096] Further, the multi-agent reinforcement learning model can be enhanced: the multi-agent reinforcement learning model is used to establish a matching relationship between the split sub-problems and the basic functions. It can be tried to improve the existing multi-agent reinforcement learning algorithm to improve its adaptability and efficiency in complex environments, or to explore new multi-agent reinforcement learning framework to better cope with diversified sub-problem matching tasks.

[0097] Further, the variable-length reasoning path description method for inverse binary trees can be further optimized: the inverse binary tree method is a way to describe the reasoning path of complex problems. Further simplification and optimization of this method can be studied to make it more suitable for large-scale, high-dimensional problems while maintaining its flexibility and expressiveness.

[0098] Further, more training data and datasets can be developed: building complex problem step-by-step logical solution datasets is crucial for strengthening the logical reasoning capabilities of large models. More targeted training data and datasets, especially those containing complex logical reasoning processes, can be continuously developed to improve the model's ability to handle complex problems.

[0099] Further, the fine-tuning strategy of large models can be improved: existing fine-tuning strategies include using instruction fine-tuning to constrain the output of large models. Future research can explore more advanced fine-tuning techniques and methods, such as using transfer learning or adaptive learning strategies, to enable models to learn and adapt to new tasks more efficiently.

[0100] Further, the performance of the cumulative reasoning learning framework can be improved: the cumulative reasoning learning framework ensures the correctness of the reasoning process by iteratively verifying the reasoning path. The design of this framework can be further optimized, such as introducing more efficient verifier algorithms or developing new feedback loop mechanisms to speed up the correction process of the reasoning path.

[0101] The multi-task learning framework based on large models automatically extracts structured information for simple problems to construct knowledge graphs.

[0102] Specifically, design a multi-task learning framework: by designing a multi-task learning framework based on large models, human-readable instructions are used to guide the output of large language models (LLM). This framework can model various information extraction tasks uniformly and capture the dependencies between tasks.

[0103] Provide task instructions: when given source text and task-specific instructions, the model is trained to generate token sequences representing the required output structure and its corresponding labels. These instructions help the model understand different tasks and adopt an option mechanism that includes all candidate categories as a constraint on the output space.

[0104] Generate structured information: task instructions provide enough information to ensure that the model can extract relevant information from the input text and generate the required output structure. This includes the type of information to be extracted, the format of the output structure, and any additional constraints or rules that need to be followed during the extraction process. For example, if the task is named entity recognition (NER), the instructions will guide the model to identify entities in the text and label their types, such as person names, locations, or organizations.

[0105] Model fine-tuning: During training, instructions are provided for all tasks, and the model is fine-tuned based on a set of labeled data for each task. This allows the model to learn task-specific functions and optimize for each task.

[0106] Building a knowledge graph using graph neural networks (GNN): Based on information extraction, graph neural networks (GNN) are used to build a domain knowledge graph. GNN has strong representation learning capabilities, effectively integrating structural and attribute features in the knowledge graph, learning low-dimensional vector representations for entities and relationships that contain rich semantic information. Based on named entity recognition, relationship extraction, and event extraction, GNN aggregates and updates node representations through node domain information, using its information propagation capabilities to learn semantic relationships and latent information between data, processing node information, inter-node relationship information, and global structural information in knowledge reasoning.

[0107] Explainability of knowledge graph: GNN's information propagation mechanism is explainable, which helps understand the decision-making process in knowledge graph reasoning. For complex multi-hop relationships and paths, GNN can aggregate neighborhood information through graph convolution and other methods to discover and reason about implicit relationships in the knowledge graph.

[0108] Through the above steps, the multi-task learning framework based on large models can automatically extract structured information from retrieved text blocks and use this information to build a knowledge graph, providing structured reasoning path representations for subsequent multi-hop reasoning, improving the explainability of multi-hop reasoning in question-answering systems.

[0109] For example, breaking down complex problems into simple problems

[0110] For example, for the question "Who won the Nobel Prize in Chemistry in 2019?", it can be broken down into "Who won the Nobel Prize in Chemistry in 2019?" and "What type of award is the Nobel Prize in Chemistry?".

[0111] Designing a multi-task learning framework

[0112] A multi-task learning framework based on large models is constructed, which uses human-readable instructions to guide the model's output, models various information extraction tasks uniformly, and captures dependencies between tasks.

[0113] Providing task instructions

[0114] Given the source text and specific task instructions, the trained model generates a sequence of tokens representing the desired output structure and its corresponding labels. For example, for the question "Who won the Nobel Prize in Chemistry in 2019?", the descriptive instructions are designed to help the model understand different information extraction tasks and employ an option mechanism including all candidate categories as a constraint on the output space.

[0115] Generating Structured Information

[0116] The model will generate the target structure and its corresponding type based on the source text and the designed descriptive instructions. For example, the model will generate the name of the Nobel Prize in Chemistry winner and label it as "person name".

[0117] Building Knowledge Graphs

[0118] A graph neural network (GNN) is used to build the domain knowledge graph, and the information propagation mechanism of GNN can learn the semantic relationships between data. For example, by aggregating and updating the node representations, the semantic relationships and potential information between data are learned. For the question "Who won the Nobel Prize in Chemistry in 2019?", the model may construct a node representing "Nobel Prize in Chemistry in 2019" and another node representing the winner's name, and connect them through the "obtained" relationship.

[0119] Through the above steps, the system can automatically extract structured information from the given text and use this information to build a knowledge graph. Taking "Who won the Nobel Prize in Chemistry in 2019?" as an example, the system will identify the information of the Nobel Prize in Chemistry winner in 2019 and add it to the knowledge graph in a structured form, forming links between entities, such as the "obtained" relationship between "John B. Goodenough" and "Nobel Prize in Chemistry in 2019".

[0120] Further, the information extraction task can be improved: in addition to named entity recognition, relationship extraction and event extraction, more information extraction tasks can be considered in the framework, such as attribute value extraction, timeline construction, event causal relationship analysis, etc. By increasing the types of tasks, the knowledge graph can be made more comprehensive and complete.

[0121] Further, the generalization ability of the model can be enhanced: based on the existing model, further research can be conducted on how to improve the model's adaptability to unseen data, such as through data augmentation, domain adaptation and other technical means, so that the model can maintain high performance when facing different domains or data with large changes.

[0122] Further, the multi-task learning framework can also be optimized: existing frameworks improve information extraction accuracy by modeling and capturing inter-task dependencies. More effective multi-task learning strategies can be explored, such as hierarchical multi-task learning, dynamic task scheduling, etc., to further improve the learning efficiency of the model and the accuracy of information extraction.

[0123] Further, the construction of knowledge graph can also be expanded: in addition to using graph neural networks (GNN), other graph representation learning methods such as heterogeneous information networks (HIN) and graph attention networks (GAT) can be studied to enrich the structural representation of the knowledge graph and improve its quality.

[0124] Further, the explainability of the knowledge graph can also be improved: the information propagation mechanism of GNN helps to understand the decision-making process of the model. Further development of visualization tools can enable users to visually see how information propagates in the graph, thereby better understanding the reasoning process.

[0125] Further, the application scenarios of the knowledge graph can also be expanded: in addition to being applied to intelligent question-answering systems, the knowledge graph based on large models can also be applied to other fields such as recommendation systems, semantic search, personalized advertising, etc., to enhance the functionality and performance of these systems through structured knowledge.

[0126] Further, specialized tools or platforms can also be developed: a complete solution is provided for non-professional users, including but not limited to automated data preprocessing tools, graphical interfaces to assist in creating and editing knowledge graphs, and convenient API interfaces for third-party application integration.

[0127] Construct a cumulative reasoning learning framework based on a large model of logical reasoning, iteratively verify the results of the process formed by the multi-hop reasoning path of the knowledge graph, and correct the reasoning path until the correct answer is obtained.

[0128] Specifically, enhance the logical reasoning capability:

[0129] Collect datasets containing rich logical problems and detailed multi-step reasoning process descriptions, such as mathematical proofs, logical test questions, programming problems, etc.

[0130] Clean and format the collected data, including standardizing text, labeling questions and answers, etc.

[0131] Select a basic base model and embed a recurrent neural network into the model output layer to enhance the model's logical reasoning capability.

[0132] Develop fine-tuning optimization strategies and multi-step reasoning mechanisms to enable the model to track and execute complex reasoning processes and provide solutions for complex problem decomposition.

[0133] Construction of the cumulative reasoning learning framework:

[0134] The CoT prompt and ToT method can guide the LLM to describe a structured reasoning process, but it introduces the roles of decision-makers and validators in the cumulative reasoning learning framework.

[0135] The decision-maker is responsible for selecting potential reasoning paths or generating possible decision results based on the current context.

[0136] The validator is responsible for judging the accuracy of the current reasoning path based on the accumulated context and evaluating whether the current result is the final reasoning result.

[0137] The output of each processing unit serves as the input for the next unit, and the reasoning results of each unit can be accumulated. The LR-LLM iteratively validates the output of each processing unit, indicating that the model evaluates the current reasoning result at each intermediate step.

[0138] In addition, a feedback loop mechanism is established, allowing the LR-LLM to dynamically adjust the reasoning path based on the validation results.

[0139] Implementing multi-hop reasoning correctness reasoning:

[0140] Through the cumulative reasoning learning framework, the human problem-solving thought process is simulated, and complex tasks are broken down and solved step by step.

[0141] The powerful reasoning ability of the LR-LLM is used to validate and optimize intermediate reasoning steps until the correct answer is obtained.

[0142] In summary, this framework continuously iteratively validates the reasoning path, dynamically adjusts the reasoning direction, ensures the correctness of the reasoning process, and ultimately arrives at the correct conclusion.

[0143] For example, a cumulative reasoning learning framework based on the LR-LLM is constructed to address the problem of increasing reasoning errors with increasing reasoning depth in multi-hop reasoning question answering. The reasoning path is corrected through an iterative validation process until the correct answer is obtained. This process can be explained in detail through the following steps:

[0144] Constructing the dataset: First, collect datasets containing rich logical problems and detailed multi-step reasoning process descriptions. These datasets may include mathematical proofs, logical test questions, programming problems, etc., to strengthen the logical reasoning ability of the large model.

[0145] Data Preprocessing: The collected data is cleaned and formatted, including standardizing text, labeling questions and answers, etc., to ensure data quality and facilitate model training.

[0146] Model Design and Training: A base large language model is selected, and a recurrent neural network is embedded in the model's output layer to enhance its logical reasoning capabilities. During training, fine-tuning optimization strategies and multi-step reasoning mechanisms are developed to enable the model to track and execute complex reasoning processes.

[0147] Cumulative Reasoning Learning Framework: In the cumulative reasoning learning framework, the roles of decision-makers and validators are designed. Decision-makers select potential reasoning paths or generate possible results based on the current context, while validators judge the accuracy of the current reasoning path and evaluate whether the current result is the final reasoning result based on the accumulated context. The output of each processing unit serves as the input for the next unit, and the reasoning results of each unit are accumulated. The Logical Reasoning Large Language Model (LR-LLM) iteratively validates the output of each processing unit.

[0148] Iterative Validation and Path Correction: Through continuous iterative validation, the LR-LLM evaluates the current reasoning result at each intermediate step and dynamically adjusts the reasoning path based on the validation results until the correct answer is obtained.

[0149] For a specific example, let's consider a question involving multi-hop reasoning: "Who were the co-winners of the 2019 Nobel Prize in Chemistry, and for what achievement did they win?"

[0150] Step One: The decision-maker selects the reasoning path of "finding the winners of the 2019 Nobel Prize in Chemistry."

[0151] Step Two: Using information from the knowledge graph, the validator confirms whether the list of winners is correct and evaluates whether further refinement is needed.

[0152] Step Three: If the initial result is correct, proceed to the next step, where the decision-maker selects the reasoning path of "finding the reason for winning."

[0153] Step Four: Again, using information from the knowledge graph, the validator checks whether the winning reason is accurate and evaluates whether the path needs to be corrected.

[0154] Step Five: Repeat the above process until all relevant information has been accurately retrieved and the final answer is formed.

[0155] Through this process, the cumulative reasoning learning framework ensures the correctness of each step of reasoning, ultimately leading to a complete and correct answer.

[0156] Further, the training data of the logical reasoning model can be further enhanced: more logical reasoning-related question and answer pairs, especially those involving multi-step reasoning, can be further collected and created to enhance the training dataset of the logical reasoning model. This helps to improve the model's ability to handle complex reasoning problems.

[0157] Further, the evaluator's evaluation mechanism can be optimized: the evaluator is responsible for evaluating the accuracy of the reasoning path, and the algorithm of the evaluator can be improved to be more intelligent and efficient, such as introducing more complex evaluation criteria or using more advanced models to improve the accuracy of verification.

[0158] Further, new decision mechanisms can be introduced: in addition to the existing decision maker role, new decision mechanisms or roles can be introduced to optimize the decision-making process, such as introducing expert systems or human experts to participate in the decision-making process to improve the accuracy and reliability of the decision.

[0159] Further, the model's adaptive ability can be improved: enhance the model's adaptive learning ability, so that the model can adjust itself according to the feedback information in the reasoning process, so as to better adapt to different types of reasoning tasks.

[0160] Further, a user-friendly interface can be developed: a user-friendly interface or tool can be developed to allow users to intuitively view the reasoning path and its verification process, which is very important for understanding and debugging the reasoning process.

[0161] The intelligent question and answer method based on large language model and knowledge graph collaboration provided in the application further includes the following additional technical features: complex problems are decomposed into multiple simple problems, specifically:

[0162] Fine-tuning based on a general base large model to strengthen the logical reasoning ability of the large model, using instruction fine-tuning to conditionally constrain the output of the large model, ensuring that each sub-problem after complex problem decomposition contains only one triple, so that each sub-problem is solved by a basic function, and each sub-problem contains only a single relationship, thus becoming a simple problem.

[0163] Specifically, fine-tuning based on a general base large model

[0164] Select a base model: select a general base large model that has been pre-trained on a large scale, such as BERT, GPT-3, etc. These models have been pre-trained on a large amount of text data and have mastered rich language knowledge.

[0165] Fine-tuning: The base model is fine-tuned on a specific dataset that contains complex problems and their decomposed sub-problems. The goal of fine-tuning is to enable the model to understand complex problems and decompose them into smaller, more manageable parts. This step strengthens the logical reasoning capabilities of the large model, enabling it to better understand and handle complex problems.

[0166] Conditional constraints on large model outputs using instruction fine-tuning

[0167] Instruction fine-tuning: During the fine-tuning process, instruction fine-tuning is used to guide the model to generate outputs that meet specific conditions. These instructions can be natural language descriptions of tasks, such as "split the following question into multiple sub-questions, each containing only one triple."

[0168] Conditional constraints: Through these instructions, the output generated by the model is constrained to meet specific format requirements, i.e., each sub-question contains only one triple. For example, for the question "Who did what, when, and where?", the model generates multiple sub-questions, each containing only one triple, such as "Who did what?", "When did this happen?", "Where did this happen?", etc.

[0169] Ensuring each sub-question contains only one triple. Triple definition: A triple generally refers to a unit of information containing a subject-predicate-object structure. For example, "Jack Ma founded Alibaba" is a triple, where "Jack Ma" is the subject, "founded" is the predicate, and "Alibaba" is the object.

[0170] Single relationship: Through instruction fine-tuning, the sub-questions generated by the model are limited to only one triple, which means each sub-question only involves a single relationship. The purpose of this is to ensure that each sub-question can be solved using a basic function, rather than dealing with complex multi-relationship problems.

[0171] Sub-questions become simple problems

[0172] Simplified problems: Through the above steps, the originally complex, multi-relationship intertwined problems are decomposed into multiple independent, simple relationship problems. Each sub-question contains only one triple and involves only one single relationship.

[0173] Basic function solution: Since each sub-question contains only one triple, it can be solved using a basic function. For example, a function can be used to find all entities related to a specific entity or determine the relationship between two entities.

[0174] Solving complex problems: By breaking down complex problems into multiple simple problems and solving each simple problem one by one, the overall solution to the complex problem can be obtained. This method greatly reduces the difficulty of solving complex problems, improves the efficiency and accuracy of problem solving.

[0175] Through such a process, complex problems can be effectively broken down into multiple simple problems, and these simple problems can be solved one by one through basic functions, thereby achieving the purpose of solving complex problems.

[0176] In some embodiments of the present application, the degree of association between simple problems and basic functions is analyzed to form a multi-hop reasoning path, specifically:

[0177] Each simple problem is regarded as an agent, and a basic function call model of multi-agent reinforcement learning is used to establish a matching relationship between simple problems and basic functions, and the selection strategy is optimized;

[0178] A variable-length reasoning path description method based on inverse binary tree is used to decompose the program modeling of complex problems into a multi-step program, and the complex logical reasoning process of answering questions is simulated by using step-by-step intermediate program solving.

[0179] Specifically, each simple problem is regarded as an agent

[0180] At this stage, each simple problem that is decomposed is regarded as an independent agent. Each agent has its specific goal, which is to solve the sub-problem it represents. The purpose of this is to be able to simulate the solution process of each sub-problem in a multi-agent system.

[0181] Using a basic function call model of multi-agent reinforcement learning

[0182] In a multi-agent system, each agent (i.e. sub-problem) needs to choose the appropriate basic function to solve its own problem. Here, the basic function refers to an operation that can directly handle simple problems, such as finding entities, comparing numerical values, calculating relationships, etc. Through multi-agent reinforcement learning (MARL), these agents can be trained to learn how to choose the best basic function to solve their respective problems.

[0183] How to implement:

[0184] Define the basic function library: First, define a basic function library containing a variety of basic operations, such as finding, comparing, calculating, reasoning, etc.

[0185] Establish a matching relationship: Then use multi-agent reinforcement learning to establish a matching relationship between agents (simple problems) and basic functions. Each agent learns through trial and error how to choose the most appropriate basic function to complete the task.

[0186] Optimization of selection strategy: Through continuous learning and adjustment, agents can optimize their selection strategy to find the most effective way to call basic functions to solve sub-problems.

[0187] Variable-length reasoning path description method based on inverse binary tree

[0188] After solving each simple problem, it is necessary to combine these simple solutions to form a reasoning path that solves the entire complex problem. The inverse binary tree is a method of describing the reasoning path, which can be used to represent the multi-step solution process of complex problems.

[0189] How to implement:

[0190] Constructing an inverse binary tree structure: model the solution process of a complex problem as an inverse binary tree structure, where each leaf node represents the solution of a simple problem, and the internal node represents the solution of an intermediate step.

[0191] Step-by-step reasoning: through the post-order traversal of the inverse binary tree, serialize it into a function sequence, start from the bottom and deduce step by step until the final answer is obtained.

[0192] Simulate the complex logical reasoning process: the inverse binary tree not only can represent the reasoning path, but also can simulate the complex logical reasoning process when answering the question, through the step-by-step intermediate program solution to reach the final answer.

[0193] Specific example

[0194] Suppose there is a complex problem: "Who are the co-winners of the 2019 Nobel Prize in Chemistry, and what achievements did they win for?"

[0195] Disassemble the problem: disassemble the problem into multiple simple problems, such as "Who are the co-winners of the 2019 Nobel Prize in Chemistry?" and "What achievements did these winners win for?"

[0196] Agent matching with basic functions: treat each sub-problem as an agent, and use multi-agent reinforcement learning to learn how to choose the best basic function to solve each sub-problem. For example, the first sub-problem may need to use the basic function of looking up entities to obtain the names of the winners.

[0197] Constructing a reasoning path: use the inverse binary tree structure to represent the reasoning path, with each leaf node representing the solution of a sub-problem. Through step-by-step reasoning, the names of all winners and their reasons for winning are finally obtained.

[0198] Through the above steps, the degree of association between simple problems and basic functions can be effectively analyzed, and one or more multi-hop reasoning paths can be formed to solve complex problems. This method not only improves the efficiency of problem solving, but also enhances the logical reasoning ability and interpretability of the system.

[0199] In some embodiments of the present application, the large model-based multi-task learning framework automatically extracts structured information for simple problems to construct a knowledge graph, specifically:

[0200] The complex problem is decomposed into multiple simple problems and vectorized, the vectorized simple problems are matched with the content of the vector library for semantic similarity, the words closest in semantics to the simple problems are found, and the corresponding text blocks are embedded, and the retrieved text blocks are automatically extracted for structured information.

[0201] Based on the large model-based multi-task learning framework, the output is guided by human instructions, the information extraction task is uniformly modeled, and the dependency between tasks is captured. Given the source text and the instructions for a specific task, the large model is trained to generate a token sequence representing the required output structure and its corresponding labels. The field knowledge graph is constructed using graph neural networks, and the semantic relationships between data are learned using the information propagation mechanism of graph neural networks.

[0202] Specifically, the complex problem is decomposed into multiple simple problems and vectorized

[0203] Complex problem decomposition: First, a complex query or problem is decomposed into several simple problems. These simple problems should be small enough to be solved individually, and each simple problem usually involves only one triple (subject-predicate-object).

[0204] Vector representation: The decomposed simple problems are converted into vector form. This can be achieved through pre-trained word embedding models such as Word2Vec, GloVe, or more advanced BERT, etc. so that each simple problem can be represented as a vector, facilitating computer processing and analysis.

[0205] Semantic similarity matching of vectorized simple problems with vector library content

[0206] Semantic similarity matching: Using the vectorized representation of the simple problem, similarity calculation is performed with a pre-constructed vector library. The vector library can contain a large number of word vectors. By calculating the cosine similarity or other distance measures between the simple problem vector and each word vector in the library, the words closest in semantics to the simple problem are found.

[0207] Embedding text blocks: Embedding the closest found words into the corresponding text blocks. These text blocks are retrieved from a large number of documents and contain information that may be related to simple questions.

[0208] Automatic extraction of structured information

[0209] Information extraction: Automatically extracting structured information from the retrieved text blocks. This can be achieved through various information extraction techniques such as Named Entity Recognition (NER), Relation Extraction (RE), and Event Extraction. These techniques aim to identify entities, relationships, and events in the text and convert them into structured forms such as triples.

[0210] Large model-based multi-task learning framework

[0211] Multi-task learning framework: Building a multi-task learning framework based on large models (such as large-scale pre-trained models with Transformer architecture) that can be guided by human-readable instructions to output information extraction tasks.

[0212] Task dependency relationships: The framework can capture the dependency relationships between different information extraction tasks, allowing the model to not only perform individual tasks but also understand the connections between them.

[0213] Generating structured output: Given the source text and specific task instructions, the large model is trained to generate token sequences representing the desired output structure and their corresponding labels. For example, the model generates a set of entity names with entity type labels, relationship types between entities, etc.

[0214] Building domain knowledge graph

[0215] Using Graph Neural Networks (GNN): Utilizing Graph Neural Networks (GNN) to build a domain knowledge graph. GNN is a special type of neural network that can handle graph-structured data by learning node representations through information propagation between nodes.

[0216] Information propagation mechanism: The information propagation mechanism of GNN can learn semantic relationships between data. In the process of building a knowledge graph, GNN aggregates information about nodes (entities) and edges (relationships) to capture complex connections between entities and learn structural features in the graph by iteratively updating node states.

[0217] Through the above steps, the large model-based multi-task learning framework can automatically extract structured information from text and use this information to build a domain knowledge graph, providing support for subsequent multi-hop reasoning. This method not only improves the automation level of information extraction but also enhances the efficiency and accuracy of knowledge graph construction.

[0218] In some embodiments of the present application, a cumulative reasoning learning framework based on a large logic reasoning model is constructed, and the process results of forming a multi-hop reasoning path based on a knowledge graph are iteratively verified to correct the reasoning path until the correct answer is reasoned out. Specifically, the cumulative reasoning learning framework based on a large logic reasoning model comprises:

[0219] Based on the multi-hop reasoning path generated by the complex problem, different knowledge graphs give their own logical reasoning paths.

[0220] Decision makers and verifiers are introduced, decision makers are responsible for selecting potential reasoning paths or generating possible results according to the current context, and verifiers judge the accuracy of the current reasoning path and evaluate whether the current result is the final reasoning result according to the accumulated context.

[0221] The output of each processing unit is used as the input of the next unit, and the reasoning results of each unit are accumulated. The output of each processing unit is iteratively verified by using a large logic reasoning model to ensure that the current reasoning result can be evaluated at each intermediate link.

[0222] A feedback loop mechanism is established to enable the large logic reasoning model to dynamically adjust the reasoning path according to the verification result.

[0223] Specifically, based on the multi-hop reasoning path generated by the complex problem

[0224] First, for a complex problem, it is disassembled into a series of simple problems by the disassembly technique discussed earlier, and a multi-hop reasoning path is formed. Different knowledge graphs may give different logical reasoning paths according to their own structure and content. These paths constitute potential routes to solve the problem.

[0225] Introducing decision makers and verifiers

[0226] Decision maker: The main responsibility of the decision maker is to select the appropriate reasoning path or generate possible results in the current context. The decision maker decides which step of reasoning action should be taken next based on the current context information (such as known facts, previous reasoning results, etc.).

[0227] Verifier: The role of the verifier is to evaluate the accuracy of the current reasoning path and determine whether the current result is sufficient as the final reasoning result. The verifier decides whether the current reasoning path is reasonable and whether the current result meets the expected goal based on the accumulated context information (i.e. all reasoning steps and results from the initial problem to the current time).

[0228] Iterative verification of reasoning path

[0229] Processing Units: In the cumulative reasoning learning framework, the reasoning process is divided into multiple processing units, each responsible for a part of the reasoning task. The output of each unit becomes the input for the next unit, forming a continuous chain of reasoning.

[0230] Cumulative Reasoning Results: The reasoning results from each processing unit are accumulated to form a part of the current reasoning path. The LR-LLM evaluates the output of each processing unit to ensure feedback at each intermediate step of reasoning, determining the effectiveness of the current reasoning path.

[0231] Dynamic Adjustment of Reasoning Path

[0232] Feedback Loop Mechanism: By establishing a feedback loop mechanism, the LR-LLM can dynamically adjust the reasoning path based on the validation results provided by the validators. If a reasoning step is validated as incorrect or insufficient to support further reasoning, the LR-LLM will reselect or generate a new reasoning path.

[0233] Revision of Reasoning Path: This process is repeated until the reasoning path is revised to be able to reason out the correct answer. Each adjustment is based on the feedback information provided by the validators, allowing the reasoning path to gradually approach the correct solution.

[0234] Specific Implementation Example

[0235] Suppose the problem to be solved is: "Who were the co-winners of the 2019 Nobel Prize in Chemistry, and for what achievements did they win?"

[0236] Generating a Multi-Hop Reasoning Path:

[0237] Step 1: Find the list of winners of the 2019 Nobel Prize in Chemistry.

[0238] Step 2: Determine the specific achievements of each winner.

[0239] Decision Maker's Path Selection:

[0240] In the first step, the decision maker will choose to retrieve information about the 2019 Nobel Prize in Chemistry from the knowledge graph.

[0241] In the second step, the decision maker will find the achievements of each winner separately.

[0242] Validator's Path Evaluation:

[0243] The validator will check whether the retrieval results in the first step contain a complete list of winners and evaluate whether this information is accurate.

[0244] The validator will also evaluate whether the information about the achievements of each winner in the second step is correct and detailed.

[0245] Iterative verification and path adjustment:

[0246] If the verifier finds that the retrieval result of the first step is incomplete or incorrect, feedback is given to the decision maker, requiring the selection or generation of a new retrieval path.

[0247] Similarly, if the achievement information of the second step is not accurate or detailed enough, the verifier will also require adjustment of the path.

[0248] Through the above steps, the cumulative reasoning learning framework based on large logic reasoning model can ensure the accuracy and completeness of the reasoning process, and finally obtain the correct answer.

[0249] In some embodiments of the present application, after being given the source text and instructions for a specific task, the large model is trained to generate a token sequence representing the required output structure and its corresponding label, specifically:

[0250] Design descriptive instructions, instructions help large models understand different information extraction tasks, and adopt an option mechanism including all candidate categories as a constraint on the output space; task instructions provide sufficient information to ensure that the large model can extract relevant information from the input text and generate the required output structure, including the type of information to be extracted, the format of the output structure, and any additional constraints or rules that need to be followed during the extraction process;

[0251] During training, instructions for all tasks are provided, and the model is fine-tuned according to a set of labeled data for each task;

[0252] For the source text, the designed descriptive instructions will guide the pre-trained language model to generate the target structure and its corresponding type, and the model will generate the target structure in natural language form while generating the corresponding label;

[0253] Each task instance contains four attributes: task instructions, options, input text, and output;

[0254] The final generated token sequence is used to construct a knowledge graph.

[0255] Specifically, the design of descriptive instructions

[0256] The design of descriptive instructions is to help large models understand different information extraction tasks. These instructions should clearly indicate the specific requirements of the task, including:

[0257] Information type: Specifies the type of information to be extracted from the source text, such as entity name, relationship type, event details, etc.

[0258] Output format: Specifies the format of the output structure, such as triple (subject-predicate-object), list, table, etc.

[0259] Constraints and rules: List any additional constraints or rules that need to be followed during information extraction, such as entities must belong to a specific category, relationships must conform to a certain pattern, etc.

[0260] Constraints on the output space

[0261] To ensure consistency and accuracy in the generated results, the designed instructions should include an option mechanism as a constraint on the output space. This means that the instructions should define all possible candidate categories or options as a reference for the model when generating the output. For example, if the task is to identify the nationality of a person, all possible country names should be listed as candidate options in the instructions.

[0262] Providing task instructions

[0263] During training, each task instance should contain four attributes:

[0264] Task instructions: Clearly describe the goal of the task.

[0265] Options: List all possible candidate categories or options.

[0266] Input text: Provide the source text as input to the model.

[0267] Output: Give the desired output structure and its corresponding type.

[0268] Use of labeled data

[0269] A set of labeled data is used to fine-tune the model. Labeled data refers to sample data that has been correctly labeled with the output structure and its label. Through these data, the model can learn how to generate the correct output structure based on the given task instructions and input text.

[0270] Instruction guides the model to generate the target structure

[0271] For each task instance, the designed descriptive instructions will guide the pre-trained language model to generate the target structure and its corresponding type. The model will generate the target structure in natural language form, along with the corresponding label. For example, if the task is named entity recognition (NER), the model will generate entity names and label each entity with the corresponding label (such as person name, place name, etc.).

[0272] Generating token sequences

[0273] The final token sequence is used to construct a knowledge graph. These token sequences contain the extracted information and their corresponding labels, which can be used to construct a structured knowledge representation, i.e., nodes and edges in a knowledge graph. In this way, the large model not only extracts information from text, but also organizes the information into meaningful structures to support subsequent multi-hop reasoning.

[0274] Practical application examples

[0275] Suppose the task is to extract "who did what, when, and where" from a news report.

[0276] Design instructions: The instructions may include "Please extract the information of the person, time and place from the text, and describe the behavior of the person."

[0277] Output format: The output should be a structured information containing the person, time, place and behavior.

[0278] Constraints and rules: The instructions may specify that the person must be a known person entity, the time format must comply with a specific date format, etc.

[0279] Task instances: Each instance includes specific instructions, candidate categories (such as names, dates, places, etc.), input text (news report paragraph), and expected output structure (such as "Zhang San delivered a speech in New York on October 1, 2023.")

[0280] Model training: Use the labeled dataset to train the model so that it can generate correct structured information according to the instructions.

[0281] Generate token sequence: The final sequence generated by the model contains the extracted information (such as "Zhang San", "October 1, 2023", "New York", "deliver a speech") and its corresponding labels (such as "name", "date", "place", "action").

[0282] Through the above steps, the large model based on descriptive instructions can accurately extract the required information from the source text and present it in a structured manner, providing the necessary information for constructing a knowledge graph.

[0283] In some embodiments of the present application, the task instruction describes how to extract relevant information from the input text and generate the required output structure; the options are the output label constraints of the task; the input text is the input sentence of the task instance, and the output is the sentence converted from the original label of the sample.

[0284] Specifically, the task instruction

[0285] Task instructions are directives used to guide the large model on how to extract relevant information from the input text and generate the desired output structure. It includes the following elements:

[0286] Information type: Clearly states what kind of information needs to be extracted from the input text, such as entity names, relationship types, event details, etc.

[0287] Output structure: Specifies the format that the output should take, such as triples (subject-predicate-object), lists, tables, etc.

[0288] Additional constraints or rules: Lists any additional constraints or rules that need to be followed during the information extraction process, such as entities must belong to specific categories, relationships must conform to certain patterns, etc.

[0289] Task instructions should be as detailed and specific as possible so that the model can accurately understand the task requirements and generate the correct output accordingly. For example, if the task is to identify key events in a news article, the instruction might describe as: "Please identify the time, location, participants, and brief description of the event from the text."

[0290] Options

[0291] Options refer to the output label constraints of the task, i.e., the set of labels that the model can choose from when generating the output. These options are predefined and aim to limit the range of outputs generated by the model, ensuring that the output meets the expected standards. For example, in a named entity recognition task, options might include "person name", "place name", "organization", etc. These labels serve as constraints to help the model generate correct entity classification.

[0292] Input text

[0293] Input text is the actual input sentence or paragraph of the task instance. It is the original material that the model needs to extract information from. The input text can be a sentence, a paragraph, or an article, depending on the requirements of the task. For example, in an entity recognition task, the input text might be a news report or a passage describing the activities of a certain person.

[0294] Output

[0295] Output refers to the sentence converted from the original labels of the sample, i.e., the result generated by the model according to the task instructions. This result should conform to the output structure specified by the task instructions and be accompanied by the corresponding labels. For example, in a named entity recognition task, the output might be "Li Hua is a teacher", where "Li Hua" is labeled as "person name" and "teacher" is labeled as "occupation".

[0296] Actual application example

[0297] Suppose the task is to extract the time, location, participants, and event from a piece of text.

[0298] Task instruction: The instruction might be described as: "Please identify the time, location, participants, and brief description of the event from the text."

[0299] Options: These might include time tags, location tags, person tags, event tags, etc.

[0300] Input text: For example, a news report: "On October 1, 2023, Li Hua delivered a speech on artificial intelligence at Peking University."

[0301] Output: The output generated according to the task instruction might be: "October 1, 2023 (time); Peking University (location); Li Hua (participant); delivered a speech on artificial intelligence (event)."

[0302] From the above description, it can be seen that the task instruction clearly defines the task that the model needs to complete, the options limit the possibilities of the model's generated results, the input text provides the object for the model to process, and the output is the result generated by the model based on these information. This structured processing method helps to improve the accuracy and consistency of information extraction tasks.

[0303] Embodiment 2

[0304] To address the current problems, the present application proposes a collaborative driving method based on large models and knowledge graphs, which is used to build an intelligent question answering system of knowledge graph retrieval enhanced generation model, to obtain more in-depth semantic understanding and more rich knowledge representation and more powerful reasoning ability, to change the existing question answering paradigm, to realize the explainable reasoning of complex problems. The large language model based on deep neural network technology has strong natural language understanding and content generation capabilities, but the disadvantage is that the knowledge is parameterized implicit knowledge, there are facts of fabrication, lack of explainability, etc., and the large model generated content has the phenomenon of illusion. The advantages of knowledge graph are that the knowledge is structured and explicit, and the explainability is very strong, especially in some specific fields, the knowledge quality is extremely high. The disadvantage is that the construction cost is too high, and it is often not completely correct, and it is relatively poor in natural language processing. Knowledge graph has a clear knowledge structure, while large model can provide strong text understanding and generation capability. Therefore, the present application is based on the existing large model mounting external data question answering paradigm, and the large language model and the knowledge graph are cooperatively integrated to effectively improve the coupling between the logical analysis ability of complex problems, the knowledge structured representation ability and the multi-hop reasoning correctness verification, and to realize the explainable reasoning of complex problems as the final goal, and to systematically study the key core problems in multi-hop reasoning question answering of complex problems.

[0305] The present application is divided into four links, one is the problem analysis link, which decomposes complex problems into simple problems step by step, analyzes their correlation with basic functions, establishes a multi-hop reasoning process description method, converts direct solution of complex problems into multi-step simple question and answer reasoning combination problems, and reduces the difficulty of multi-hop reasoning of complex problems; the second is the information retrieval link, which automatically extracts structured information from the retrieved text blocks based on the large model multi-task learning framework, and constructs a knowledge graph to give a structured reasoning path representation for the process reasoning of knowledge question and answer, and improve the explainability of multi-hop reasoning of the question and answer system; the third is the answer reasoning link, which constructs a cumulative reasoning learning framework based on a logical reasoning large language model (Logical Reasoning-Large Language Model, LR-LLM), iteratively verifies the process results in multi-hop reasoning, and corrects the reasoning path to improve the accuracy of answer reasoning; the fourth is to construct an intelligent question and answer system based on a knowledge graph retrieval enhanced generation model, and realize the correctness reasoning of multi-hop reasoning question and answer.

[0306] Specifically, in the problem analysis link, in order to solve the problem of low accuracy of multi-hop reasoning for complex problems, the present application proposes a complex problem logical reasoning process description method based on a large model thinking chain, which converts direct solution of complex problems into multi-step simple question and answer reasoning combination problems, as shown in FIG. 1, which is divided into three steps.

[0307] Step one: first, based on the large model thinking chain, the complex problem is decomposed into a series of smaller and more manageable sub-problems, and then these sub-problems are solved step by step to finally solve the original problem. The present application first constructs a complex problem step-by-step logical solution data set, fine-tunes based on a general basic large model, strengthens the logical reasoning ability of the large model, uses instruction fine-tuning to conditionally constrain the output of the large model, ensures that each sub-problem of complex problem decomposition includes only one triple, so that each sub-problem can be solved by a basic function, and becomes a simple problem containing only a single relationship.

[0308] Step two: The present application takes each sub-problem as an agent, uses a basic function call model based on multi-agent reinforcement learning, establishes a consistent matching relationship between the split sub-problems and the basic functions, and performs matching degree analysis on simple problems and basic functions. Multi-agent reinforcement learning can enable each agent to optimize its selection strategy through interaction with multiple basic functions, thereby realizing the calling of appropriate basic functions to match the corresponding sub-problems. In addition, in this step, by analyzing the general basic operations for solving complex problems, a function library containing 13 basic functions such as counting, comparison, searching, association, and logical operation is designed, which specifically includes: Find: find all entities with a specific name; FilterConcept: find all entities with a specific concept; FilterStr: find all entities with a specific attribute value; Relate: find all entities and corresponding triples that have a specific relationship with the input entity; And: return the intersection of two entity sets; Or: return the union of two entity sets; QueryName: query the name of an entity; QueryAttr: query the specific attribute value of an entity; QueryRelation: query the relationship between two entities; QueryRelationQualifier: query the specific modifier value of the relationship triple; SelectBetween: in two entities, query the entity with a larger or smaller specific attribute value; SelectAmong: in a set of entities, query the entity with a larger or smaller specific attribute value; Count: query the number of entities in the set.

[0309] Step three: A variable-length reasoning path description method of inverse binary tree is proposed, which decomposes the program modeling of complex problems into a multi-step program, and uses step-by-step intermediate program solving to simulate the complex logical reasoning process of answering questions. Each intermediate step program involves a basic function containing entity parameters, which can be represented as a binary tree. As shown in FIG. 3, the directed edge between two nodes represents the dependency relationship between the two functions, and the left subtree of each intermediate binary tree is a basic function, and the right subtree is the corresponding entity parameter. The root node represents the output result, and is also regarded as the entity parameter of the upper-level binary tree. That is, the target function takes the output of the source function as its parameter. The tree-structured program is serialized by post-order traversal and formalized as a sequence of i functions. The general form is as follows:

[0310] F1(a1,b1)F2(a2,b2)F3(a3,b3)…Fi(ai,bi),

[0311] Wherein, each basic function receives a list of entity parameters (ai, bi), which need to be reasoned according to the problem.

[0312] In the information retrieval link, in view of the poor explainability of the question and answer paradigm of the large model mounting external data, the application proposes a domain knowledge graph construction method based on large model multi-task instruction optimization, converts the retrieved text block into structured knowledge, and explicitly represents the multi-hop reasoning path of a complex problem, which is the key to realizing the correctness verification of the complex reasoning process. The application converts the information extraction (IE) task into a natural language generation problem, designs a large model-based multi-task learning framework, automatically performs named entity recognition (NER), relation extraction (RE) and event extraction (Named Entity Recognition, EE), and uses a graph neural network to structure the domain knowledge, as shown in FIG. 4, which is divided into two steps.

[0313] Step one: the application designs a multi-task learning framework based on a large model, uses human-readable instructions to guide the output of the LLM, uniformly models various information extraction tasks, and captures the dependency between tasks, thereby realizing information extraction based on large model multi-task instruction optimization. When given the source text and task-specific instructions, the model is trained to generate a token sequence representing the desired output structure and its corresponding label. For the source sentence, a descriptive instruction is designed to enable the model to understand different tasks and adopt an option mechanism including all candidate categories as a constraint on the output space. Then, the pre-trained language model generates the target structure and the corresponding type in natural language. Instructions are provided for all tasks during training, and the model is fine-tuned according to a set of labeled data for each task. This allows the model to learn task-specific functions and optimize for each task. Each task instance has four attributes: task instruction, option, input text and output. The task instruction provides detailed instructions on how to extract relevant information from the input text and generate the required output structure. It includes information such as the type of information to be extracted, the format of the output structure, and any additional constraints or rules that need to be followed during the extraction process. The task instruction serves as a bridge between the original input text and the structured output representation, enabling the model to understand the extraction task and generate accurate and meaningful output. The option is a label constraint for the task, representing a set of possible outputs that the model can generate for a given input. These label constraints are specific to each task and provide information on how to map the predicted output to the corresponding semantic concept. The text is the input sentence of the task instance, and then the sequence is input into the pre-trained language model along with the task instruction and option, enabling the model to generate the required output sequence for the given task. The output is a sentence converted from the original label of the sample.

[0314] Step two: The present application uses Graph Neural Networks (GNN) to construct the field knowledge graph. Graph Neural Networks have strong representation learning capabilities, can effectively integrate the structural and attribute features in the knowledge graph, and learn low-dimensional vector representations for entities and relationships, while containing rich semantic information. Based on named entity recognition, relationship extraction, and event extraction, GNN aggregates and updates node representations through node domain information, uses its information propagation capabilities to learn semantic relationships and potential information between data, and processes node information, node relationship information, and global structure information in knowledge reasoning. For complex multi-hop relationships and paths, GNN can aggregate neighborhood information through graph convolution and other methods to discover and reason about implicit relationships in the knowledge graph. In addition, the information propagation mechanism of GNN is interpretable, which helps to understand the decision-making process of the model in logical reasoning of the knowledge graph.

[0315] In the answer reasoning stage, the present application addresses the knowledge error and bias problems of large language models, as well as the defect that the reasoning error increases with the increase of reasoning depth in multi-hop reasoning question answering, which can lead to deviation from the correct reasoning path. The cumulative reasoning framework based on the large model of logical reasoning (LR-LLM) is proposed. On the one hand, the logical reasoning ability of the large model is strengthened through fine-tuning optimization technology, and on the other hand, the cumulative reasoning learning framework is constructed to iteratively verify the reasoning process results to ensure the correctness of the reasoning path.

[0316] In terms of strengthening the logical reasoning ability of the large model, the present application collects rich logical problems and detailed multi-step reasoning process descriptions, such as mathematical proofs, logical test questions, and programming problems, when constructing the data set. During data preprocessing, the collected data is cleaned and formatted, including standardizing text, labeling questions and answers, etc. In model design, a basic base large model is selected, and a recurrent neural network is embedded in the model output layer to enhance the model's logical reasoning ability. In the model training stage, fine-tuning optimization strategies and multi-step reasoning mechanisms are developed to enable the model to track and execute complex reasoning processes, providing solutions for complex problem decomposition.

[0317] In constructing the cumulative reasoning learning framework, the application constructs a cumulative reasoning learning framework based on LR-LLM. The Chain of Thought (CoT) prompting and the Tree of Thought (ToT) method can guide the LLM to describe the structured reasoning process, however, these methods lack the mechanism of dynamically storing and utilizing the intermediate results. The application arranges two types of roles in the cumulative reasoning learning framework: decision makers and verifiers. The decision makers are responsible for selecting potential reasoning paths or generating possible decision results according to the current context, and the verifiers are responsible for judging the accuracy of the current reasoning path according to the accumulated context and evaluating whether the current result is the final reasoning result. The cumulative reasoning learning framework allows the output of each processing unit to be used as the input of the next unit, and the reasoning results of each unit can be accumulated. The LR-LLM iteratively verifies the output of each processing unit, which means that the model evaluates the current reasoning result at each intermediate step. In addition, the application also establishes a feedback loop mechanism, so that the LR-LLM can dynamically adjust the reasoning path according to the verification result. This reasoning framework can simulate the human problem-solving thought process, decompose complex tasks and solve them step by step, while utilizing the powerful reasoning ability of the LR-LLM to verify and optimize the intermediate reasoning steps.

[0318] After completing the above three steps, the application optimizes the three steps of the intelligent question and answer system based on retrieval enhancement generation respectively, deeply cooperates the large model with the knowledge graph, and constructs an intelligent question and answer system based on a knowledge graph retrieval enhancement generation model. In the problem analysis step, the large model thought chain is used to decompose complex problems, and an inverse binary tree is used to describe the logical reasoning process. In the information retrieval step, the large model multi-task optimization instruction model is used to extract information from the retrieved text and automatically construct a knowledge graph. In the answer generation step, the cumulative reasoning learning framework is used to infer the correct answer from the knowledge graph according to the problem description, thereby changing the existing knowledge question and answer paradigm, improving the logical analysis ability of complex problems, the knowledge structured representation ability, and the process reasoning ability of multi-hop question and answer, and realizing the inference of interpretable answers from a large amount of text library. A new way is found for the collaborative development mode of large models and knowledge graphs.

[0319] Embodiment 3

[0320] A computer program product containing instructions which, when run on a device, cause the device to perform steps in implementing an intelligent question and answer method based on the collaboration of large language models and knowledge graphs.

[0321] Embodiment 4

[0322] A computer non-volatile readable storage medium, which stores a program, the program implements steps in an intelligent question answering method based on large language model and knowledge graph collaboration when executed by a processor.

[0323] Embodiment 5

[0324] An electronic device, comprising a memory, a processor, and a program stored on the memory and executable on the processor, the processor implements steps in an intelligent question answering method based on large language model and knowledge graph collaboration when executing the program.

[0325] The places not described in the application can be implemented by using or referring to the existing technology.

[0326] Each of the embodiments in the specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment mainly describes the difference from other embodiments.

[0327] The above is only an embodiment of the application and is not used to limit the application. The application can have various changes and modifications for those skilled in the art. Any modification, equivalent replacement, improvement, etc. within the spirit and principle of the application shall be included in the scope of the claims of the application.

Claims

1. An intelligent question and answer method based on large language model and knowledge graph cooperation, characterized in that, The method comprises the following steps: Decompose a complex problem into multiple simple problems, analyze the correlation between the simple problems and basic functions to form a multi-hop reasoning path; Extract structured information from the simple problems automatically based on a large model multi-task learning framework to construct a knowledge graph; Construct a cumulative reasoning learning framework based on a logic reasoning large model, iteratively verify the process results of the knowledge graph based on the multi-hop reasoning path to correct the reasoning path until the correct answer is reasoned out.

2. The method of claim 1, wherein, The complex problem is decomposed into multiple simple problems by: Fine-tuning a general basic large model to strengthen the logic reasoning capability of the large model, using instruction fine-tuning to conditionally constrain the output of the large model, ensuring that each sub-problem after the decomposition of the complex problem contains only one triple, so that each sub-problem is solved by a basic function, and each sub-problem contains only a single relationship, thereby becoming a simple problem.

3. The method of claim 3, wherein, The triple refers to an information unit containing a subject-predicate-object structure.

4. The method of claim 2, wherein, The correlation between the simple problems and the basic functions is analyzed to form a multi-hop reasoning path by: Regarding each simple problem as an intelligent agent, using a basic function call model of multi-agent reinforcement learning to establish a matching relationship between the simple problem and the basic function, and optimizing the selection strategy; Using a variable-length reasoning path description method based on an inverse binary tree to decompose the program modeling of the complex problem into a multi-step program, and using step-by-step intermediate program solving to simulate the complex logic reasoning process of answering the question.

5. The method of claim 4, wherein, The basic functions include counting functions, comparison functions, lookup functions, association functions, and logic operation functions.

6. The method of claim 4, wherein, The basic functions are configured to find all entities with a specific name, or find all entities with a specific concept, or find all entities with a specific relationship to the input entity and the corresponding triples.

7. The method of claim 4, wherein, The multi-task learning framework based on a large model automatically extracts structured information from the simple problems to construct a knowledge graph by: Decomposing the complex problem into multiple simple problems and performing vectorization representation, performing semantic similarity matching between the vectorized simple problems and the content of the vector library, finding the words closest in semantics to the simple problems, embedding the corresponding text blocks, and automatically extracting structured information from the retrieved text blocks; The multi-task learning framework based on a large model guides the output through human instructions, uniformly models the information extraction task, and captures the dependency relationship between tasks, trains the large model to generate a token sequence representing the required output structure and its corresponding label after giving the source text and the instruction of a specific task, uses a graph neural network to construct a domain knowledge graph, and uses the information propagation mechanism of the graph neural network to learn the semantic relationship between data.

8. The method of claim 7, wherein, For complex multi-hop relationships and paths, the graph neural network aggregates neighborhood information through graph convolution to discover and reason about implicit relationships in the knowledge graph.

9. The method of claim 7, wherein, The information extraction task includes named entity recognition, relationship extraction, event extraction, attribute value extraction, timeline construction, and event causal relationship analysis.

10. The method of claim 7, wherein, The method further comprises: constructing the domain knowledge graph by using a heterogeneous information network or a graph attention network.

11. The method of claim 7, wherein, The knowledge graph should be configured as an intelligent question answering system, a recommendation system, a semantic search system, and a personalized advertising system.

12. The method of claim 7, wherein, The construction is based on a cumulative reasoning learning framework of a logic reasoning large model, and iterative verification is performed on a process result of the knowledge graph based on the multi-hop reasoning path to correct the reasoning path until a correct answer is reasoned out, specifically: Based on the multi-hop reasoning path generated by the complex question, different knowledge graphs give their own logic reasoning paths; A decision maker and a verifier are introduced, the decision maker is responsible for selecting potential reasoning paths or generating possible results according to the current context, and the verifier judges the accuracy of the current reasoning path and evaluates whether the current result is the final reasoning result according to the accumulated context; The output of each processing unit is used as the input of the next unit, and the reasoning results of each unit are accumulated, and the output of each processing unit is iteratively verified by using the logic reasoning large model to ensure that the current reasoning result can be evaluated at each intermediate link in reasoning; A feedback loop mechanism is established, so that the logic reasoning large model can dynamically adjust the reasoning path according to the verification result.

13. The method of claim 12, wherein, The method further comprises: developing a user-friendly interface or tool to enable users to view the reasoning path and the verification process of the reasoning path.

14. The method of claim 12, wherein, The method further comprises: after the reasoning path obtains a correct reasoning result, stopping dynamically adjusting the reasoning path.

15. The method of claim 12, wherein, After the given source text and the instructions of the specific task, the large model is trained to generate a token sequence representing the required output structure and its corresponding label, specifically: Design descriptive instructions that help the large model understand different information extraction tasks and adopt an option mechanism including all candidate categories as a constraint for the output space; task instructions provide sufficient information to ensure that the large model can extract relevant information from the input text and generate the required output structure, including the type of information to be extracted, the format of the output structure, and any additional constraints or rules that need to be followed during the extraction process; During training, instructions for all tasks are provided, and the model is fine-tuned according to a set of labeled data for each task; For the source text, the designed descriptive instructions will guide the pre-trained language model to generate the target structure and its corresponding type, and the model will generate the target structure in natural language form while generating the corresponding label; Each task instance contains four attributes: task instructions, options, input text, and output; The finally generated token sequence is configured to construct the knowledge graph.

16. The method of claim 15, wherein, The labeled data refers to sample data that has been correctly labeled with output structures and labels corresponding to the output structures.

17. The method of claim 15, wherein, The task instructions describe how to extract relevant information from the input text and generate the required output structure; the options are output label constraints for the task; the input text is the input sentence of the task instance, and the output is a sentence converted from the original label of the sample.

18. A computer program product comprising instructions which, when executed on a device, characterised in that, The device is caused to perform the steps in the method for intelligent question answering based on large language model and knowledge graph collaboration as claimed in any one of claims 1-17.

19. A computer non-volatile readable storage medium having stored thereon a program, characterized in that, The program is executed by the processor to implement the steps in the method for intelligent question answering based on large language model and knowledge graph collaboration as claimed in any one of claims 1-17.

20. An electronic device comprising a memory, a processor, and a program stored on the memory and executable on the processor, the program comprising instructions for: The processor implements the steps in the method for intelligent question answering based on large language model and knowledge graph collaboration as claimed in any one of claims 1-17 when executing the program.

Citation Information

Patent Citations

  • Question and answer reasoning method and device

    CN114817512A

  • Intelligent question and answer method and device based on fusion type progressive reasoning network

    CN118114768A

  • Knowledge graph multi-hop question and answer method and device based on big language model enhancement

    CN118551001A

  • Intelligent question and answer method based on cooperation of large language model and knowledge graph

    CN118797017A

  • Inferring logical clauses for answering complex multi-hop open domain questions

    US20210216601A1

Cited By

  • Multi-agent collaborative reasoning method and system based on memory sharing and conflict resolution

    CN121881288A

  • Large and small model collaborative agent optimization method for vertical domain tasks

    CN121882086A

  • Multi-modal large model adaptive iterative reasoning method and system for long video

    CN121936607A

  • Long video-oriented multi-modal large model self-adaptive iterative inference method and system

    CN121936607B

  • Intelligent decision-making method and system jointly driven by data and knowledge

    CN121959473A