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

By disassembling complex problems into simple problems and using the collaborative method of large language models and knowledge graphs to build multi-hop inference paths and iterative verification frameworks, the problem of interpretability and accuracy of intelligent question-answer systems in the processing of complex problems is solved. , realizes efficient interpretable answer generation.

CN118797017BActive Publication Date: 2025-02-25INSPUR GENERSOFT CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411274109.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-12
Publication Date
2025-02-25
Estimated Expiration
2044-09-12

AI Technical Summary

Technical Problem

Existing intelligent question-and-answer systems are difficult to provide interpretable and accurate answers when dealing with complex problems, especially when multi-hop reasoning and multiple reasoning techniques.

Method used

By disassembling complex problems into multiple simple problems, using the collaborative method of large language models and knowledge graphs, a multi-hop inference path is constructed, and the inference path is iteratively verified through the cumulative inference learning framework to ensure the accuracy and interpretability of the answers. .

Benefits of technology

The interpretability reasoning for complex problems is realized, the logical analysis ability, knowledge structured representation ability and process reasoning ability of multi-hop question and answer are improved, and the problem of lack of interpretability and accuracy in answer generation in existing systems is solved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118797017B_ABST
    Figure CN118797017B_ABST
Patent Text Reader

Abstract

The present application provides an intelligent question-answering method based on the collaboration of a large language model and a knowledge graph, which relates to the technical fields of artificial intelligence and natural language processing, including: decomposing a complex problem into multiple simple problems, analyzing the degree of correlation between the simple problems and basic functions to form a multi-hop reasoning path; automatically extracting structured information from the simple problems based on a multi-task learning framework of a large model to construct a knowledge graph; constructing a cumulative reasoning learning framework based on a large model of logical reasoning, iteratively verifying the process results of the knowledge graph formed based on the multi-hop reasoning path, so as to correct the reasoning path until the correct answer is inferred.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] With the rapid development of generative AI technology, intelligent question-answering systems based on large language models have become an important research hotspot in the field of natural language processing. Such systems aim to improve users' search experience by providing accurate and reliable answers to questions in natural language and in context. 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 user questions to final answers is efficient and accurate.

[0003] The development of intelligent question-answering systems has roughly 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 and CQA), question-answering systems based on knowledge graphs, and question-answering systems based on large-scale language models. The technologies in each stage have their specific advantages and limitations. For example, question-answering systems based on large-scale document sets can access a large amount of unstructured data, but their understanding of complex problems is not accurate enough; although question-answering systems based on question-answer pairs can provide high-quality answers, the cost of obtaining and maintaining these question-answer pairs is high, and they perform poorly when facing diverse user questions; question-answering systems based on knowledge graphs can provide structured and detailed answers, but the cost of building and maintaining knowledge graphs is high; and question-answering systems based on large-scale language models, such as ChatGPT, are known for their powerful natural language understanding and generation capabilities, but there are accuracy issues when answering knowledge in vertical fields.

[0004] Although intelligent question-answering systems have made significant progress in intent recognition, information retrieval, and answer generation, existing intelligent question-answering systems face challenges in dealing with problems that require multi-step reasoning and multiple reasoning techniques, such as multi-hop reasoning, counting, etc. It is difficult to decompose complex problems into simple ones and accurately describe their logical reasoning processes. Although large language models have powerful language understanding and content generation capabilities, the content they generate lacks interpretability and contains factual errors. At the same time, although knowledge graphs are highly structured and interpretable, they are expensive to build and are relatively weak in natural language processing. Large language models are slow in updating knowledge, have difficulty integrating long-tail knowledge, and are at risk of data leakage. In addition, the high cost of training and reasoning limits their ability to acquire new knowledge. Summary of the invention

[0005] This application provides an intelligent question-answering method based on the collaboration of a large language model and a knowledge graph to solve the problem of poor interpretability of complex questions.

[0006] The technical solution adopted in this application is:

[0007] The embodiment of the present application provides an intelligent question answering method based on the collaboration of a large language model and a knowledge graph, including:

[0008] Decompose a complex problem into multiple simple problems, and analyze the degree of correlation between the simple problems and basic functions to form a multi-hop reasoning path;

[0009] A multi-task learning framework based on a large model automatically extracts structured information from the simple questions to build a knowledge graph;

[0010] A cumulative reasoning learning framework based on a large model of logical reasoning is constructed, and the process results of the knowledge graph formed based on the multi-hop reasoning path are iteratively verified to correct the reasoning path until the correct answer is inferred.

[0011] The intelligent question answering method based on the collaboration of a large language model and a knowledge graph provided in this application also includes the following additional technical features: the complex question is decomposed into multiple simple questions, specifically:

[0012] Fine-tuning training is performed based on the general basic large model to enhance the logical reasoning ability of the large model. Instruction fine-tuning is used to conditionally constrain the output of the large model to ensure that each sub-problem after the complex problem is split contains only one triple. In this way, each sub-problem is solved with a basic function, and each sub-problem contains only a single relationship, thus becoming the simple problem.

[0013] According to an embodiment of the present application, the analysis of the correlation between the simple problem and the basic function to form a multi-hop reasoning path is specifically as follows:

[0014] Treat each of the simple problems as an intelligent agent, use the basic function call model of multi-agent reinforcement learning, establish a matching relationship between the simple problems and the basic functions, and optimize the selection strategy;

[0015] Based on the variable-length reasoning path description method of the inverse binary tree, the program modeling of the complex problem is decomposed into a multi-step program, and the complex logical reasoning process of answering the question is simulated by using step-by-step intermediate program solutions.

[0016] According to an embodiment of the present application, a multi-task learning framework based on a large model automatically extracts structured information from the simple question to construct a knowledge graph, specifically:

[0017] Decomposing the complex question into multiple simple questions and performing vectorization representation, performing semantic similarity matching between the vectorized simple questions and the content of the vector library, finding the words closest in semantics to the simple questions, embedding the words into the corresponding text blocks, and automatically extracting structured information from the retrieved text blocks;

[0018] A multi-task learning framework based on a large model guides the output through human instructions, uniformly models information extraction tasks, and captures the dependencies between tasks. 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 labels, and a domain knowledge graph is constructed using a graph neural network. The information propagation mechanism of the graph neural network is used to learn the semantic relationship between data.

[0019] According to an embodiment of the present application, the cumulative reasoning learning framework based on the large model of logical reasoning is constructed, and the process results of the knowledge graph formed based on the multi-hop reasoning path are iteratively verified to correct the reasoning path until the correct answer is inferred, specifically:

[0020] Based on the multi-hop reasoning path generated by the complex problem, different knowledge graphs give respective logical reasoning paths;

[0021] Introducing a decision maker and a verifier, wherein the decision maker is responsible for selecting a potential reasoning path or generating a possible result based on the current context, and the verifier judges the accuracy of the current reasoning path based on the accumulated context and evaluates whether the current result is the final reasoning result;

[0022] 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 using the large logical reasoning model to ensure that the current reasoning results can be evaluated at each intermediate link of the reasoning;

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

[0024] According to one embodiment of the present application, after the source text and the instructions of the specific task are given, the large model is trained to generate a token sequence representing the required output structure and its corresponding label, specifically:

[0025] Design descriptive instructions that help the large model understand different information extraction tasks and adopt an option mechanism that includes all candidate categories as constraints on 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 that need to be followed during the extraction process;

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

[0027] 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 the form of natural language and generate the corresponding label at the same time;

[0028] 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 desired 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;

[0029] The final generated token sequence is used to construct the knowledge graph.

[0030] According to one embodiment 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 output label constraints of 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.

[0031] A computer program product containing instructions, when running on a device, enables the device to execute the steps in an intelligent question-answering method based on the collaboration of a large language model and a knowledge graph.

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

[0033] An electronic device includes a memory, a processor, and a program stored in the memory and executable on the processor. When the processor executes the program, the steps in an intelligent question-answering method based on the collaboration of a large language model and a knowledge graph are implemented.

[0034] Due to the adoption of the above technical solution, the beneficial effects achieved by this application are as follows:

[0035] 1. This application deeply collaborates the big model with the knowledge graph to build an intelligent question-answering system based on the knowledge graph retrieval enhancement generation model. In the problem analysis phase, complex problems are decomposed based on the big model thinking chain, and the inverse binary tree is used to describe its logical reasoning process; in the information retrieval phase, the retrieved text is extracted based on the big model multi-task tuning instruction model, and the knowledge graph is automatically constructed; in the answer generation phase, the cumulative reasoning learning framework is used to infer the correct answer from the knowledge graph according to the question description, thereby changing the existing knowledge question-answering paradigm, improving the logical analysis ability of complex problems, the knowledge structured representation ability and the process reasoning ability of multi-hop question-answering, and realizing the reasoning of explainable answers from massive text libraries.

[0036] 2. This application uses a method for describing the logical reasoning process of complex problems based on a large model thinking chain to transform complex problems into simple question-answer reasoning combination problems, thereby improving the accuracy of multi-hop reasoning answers to complex problems.

[0037] 3. This application uses a large model to improve the accuracy of knowledge graph construction, constructs a domain knowledge graph based on multi-task instruction tuning of the large model, and enhances the interpretability of the question-answering paradigm of the large model mounting external data.

[0038] 4. This application builds a cumulative reasoning learning framework based on a large model of logical reasoning, which solves the problem of knowledge errors and reduces the reasoning error in multi-hop reasoning question and answering.

[0039] 5. This application constructs a new intelligent question-answering system that is collaboratively driven by a large model and a knowledge graph. The system has a deeper semantic understanding capability, powerful knowledge representation and reasoning capabilities, realizes explainable reasoning for complex problems, and further promotes the development of this field. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0041] Figure 1 A framework diagram of an intelligent question-answering method based on the collaboration of a large language model and a knowledge graph provided in an embodiment of the present application;

[0042] Figure 2 A flowchart of an intelligent question-answering method based on the collaboration of a large language model and a knowledge graph provided in an embodiment of the present application;

[0043] Figure 3 A schematic diagram of question analysis of an intelligent question-answering method based on collaboration between a large language model and a knowledge graph provided in an embodiment of the present application;

[0044] Figure 4 A schematic diagram of knowledge graph construction for an intelligent question-answering method based on collaboration between a large language model and a knowledge graph provided in an embodiment of the present application. DETAILED DESCRIPTION

[0045] In order to more clearly illustrate the overall concept of the present application, a detailed description is given below in an illustrative manner in conjunction with the accompanying drawings.

[0046] In the following description, many specific details are set forth to facilitate a full understanding of the present application. However, the present application may 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 may be combined with each other without conflict.

[0047] In the present application, unless otherwise clearly specified and limited, a first feature "above" or "below" a second feature may be that the first and second features are in direct contact, or the first and second features are in indirect contact through an intermediate medium. In the description of this specification, the description with reference to 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 this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in an appropriate manner in any one or more embodiments or examples.

[0048] Example 1

[0049] like Figure 1 to Figure 2 As shown, an intelligent question answering method based on the collaboration of a large language model and a knowledge graph includes:

[0050] Decompose complex problems into multiple simple problems, analyze the degree of correlation between simple problems and basic functions, and form a multi-hop reasoning path.

[0051] Specifically, complex problems are broken down into:

[0052] First, break down complex problems into a series of smaller, more manageable sub-problems based on the big model thinking chain, and then gradually solve these sub-problems to ultimately solve the original problem.

[0053] To this end, a dataset of step-by-step logical solutions to complex problems is constructed, and fine-tuning training is performed based on a general basic large model to enhance the logical reasoning capabilities of the large model.

[0054] Use instruction fine-tuning to conditionally constrain the output of the large model to ensure that each sub-problem after the complex problem is split 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, thus becoming a simple problem.

[0055] Analyze how simple problems relate to basic functions:

[0056] Each subproblem is regarded as an intelligent agent, and the basic function calling model of multi-agent reinforcement learning is used to establish a matching relationship between the split subproblems and the basic functions to optimize the selection strategy.

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

[0058] During this process, a function library containing 13 basic functions such as counting, comparison, search, association, and logical operations was designed. These functions cover operations such as Find (find all entities with a specific name), FilterConcept (find all entities with a specific concept), and Relate (find all entities and corresponding triples that have a specific relationship with the input entity).

[0059] Form a multi-hop reasoning path:

[0060] A variable-length reasoning path description method for the inverse binary tree is proposed to decompose the program modeling of complex problems into a multi-step program.

[0061] Each intermediate step procedure involves a basic function containing entity parameters and can be represented as a binary tree.

[0062] like Figure 2 As shown, the directed edge between two nodes represents the dependency relationship between the two functions. The left subtree of each intermediate binary tree is the 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.

[0063] This means that the target function takes the output of the source function as its argument. The tree-structured program is serialized by post-order traversal and is formalized as a sequence of i functions in the following form: , where each basic function receives an entity parameter These parameters need to be reasoned about based on the problem.

[0064] In this way, the direct solution of complex problems is transformed into a multi-step simple question-answering reasoning combination problem, reducing the difficulty of multi-jump reasoning for complex problems.

[0065] Example, step 1: decomposition of complex problems

[0066] Goal: Break a complex problem into a series of smaller, more manageable sub-problems.

[0067] Methods: By constructing a dataset of step-by-step logical solutions to complex problems, fine-tuning training is performed based on a general basic large model to strengthen the logical reasoning ability of the large model. Instruction fine-tuning is used to condition the output of the large model to ensure that each sub-problem after the complex problem is split 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, thus becoming a simple problem.

[0068] Step 2: Analyze the degree of correlation

[0069] Goal: Establish a consistent match between the split sub-problems and the basic functions.

[0070] Method: Treat each sub-problem as an agent, use the basic function call model based on multi-agent reinforcement learning, 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, search, association, and logical operations.

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

[0072] Objective: To propose a method for describing reasoning paths for complex problems.

[0073] Method: The variable-length reasoning path description method of the inverse binary tree is used to model the complex problem as a multi-step program. Each intermediate step involves a basic function containing entity parameters, forming a binary tree structure, which is serialized into a function sequence through post-order traversal.

[0074] Example

[0075] Consider a complex problem like this: "Find all science fiction novels published before 1980 and written by famous authors."

[0076] Step 1: Break this problem down into multiple simpler questions.

[0077] Subproblem 1: "Find all science fiction novels."

[0078] Sub-question 2: "Select novels published before 1980."

[0079] Sub-problem 3: “Identify books written by famous authors.”

[0080] Step 2: Match the corresponding basic function for each sub-problem.

[0081] Subproblem 1: "Find all science fiction novels."

[0082] You can use the FilterStr function to find all entities with a specific property value (i.e., the type is Science Fiction).

[0083] Sub-question 2: "Select novels published before 1980."

[0084] You can use the SelectAmong function to query a collection for entities with a greater value for a specific attribute (publication date less than 1980).

[0085] Sub-problem 3: “Identify books written by famous authors.”

[0086] You can use the Relate function to find all entities and corresponding triples that have a specific relationship (author relationship) with the input entity (famous writer).

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

[0088] Organize the above sub-questions in a logical order.

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

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

[0091] Finally, the Relate function is used to identify novels written by famous writers.

[0092] Through this step-by-step reasoning method, a multi-hop reasoning path is eventually formed that can answer the original complex problem.

[0093] Furthermore, the basic function library can be improved in one step: although a basic function library including counting, comparison, search, 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.

[0094] Furthermore, the multi-agent reinforcement learning model can be enhanced in one step: the multi-agent reinforcement learning model is used to establish a matching relationship between the split sub-problems and the basic functions. We can try to improve the existing multi-agent reinforcement learning algorithm to improve its adaptability and efficiency in complex environments, or explore new multi-agent reinforcement learning frameworks to better cope with diverse sub-problem matching tasks.

[0095] Furthermore, the variable-length reasoning path description method of the inverse binary tree can be optimized in one step: the inverse binary tree method is a way to describe the reasoning path of complex problems. We can study how to further simplify and optimize this method to make it more suitable for large-scale, high-dimensional problems while maintaining its flexibility and expressiveness.

[0096] Furthermore, more training data and data sets can be developed in one step: Building a data set for step-by-step logical solutions to complex problems is crucial to strengthening the logical reasoning ability of large models. More targeted training data and data sets can be continuously developed, especially those containing complex logical reasoning processes, to enhance the model's ability to handle complex problems.

[0097] Furthermore, the fine-tuning strategy of large models can be improved in one step: the existing fine-tuning strategy includes using instruction fine-tuning to constrain the output of large models. In the future, more advanced fine-tuning techniques and methods can be explored, such as using transfer learning or adaptive learning strategies to enable the model to learn and adapt to new tasks more efficiently.

[0098] Furthermore, the performance of the cumulative reasoning learning framework can be improved in one step: the cumulative reasoning learning framework verifies the reasoning path through iteration to ensure the correctness of the reasoning process. The design of the framework can be further optimized, such as introducing a more efficient verifier algorithm or developing a new feedback loop mechanism to accelerate the correction process of the reasoning path.

[0099] The multi-task learning framework based on large models automatically extracts structured information from simple questions to build a knowledge graph.

[0100] Specifically, we design a multi-task learning framework: We design a large model-based multi-task learning framework that uses human-readable instructions to guide the output of a large language model (LLM). This framework can uniformly model various information extraction tasks and capture the dependencies between tasks.

[0101] Providing task instructions: Given source text and task-specific instructions, the model is trained to generate token sequences that represent the desired output structure and its corresponding labels. These instructions help the model understand different tasks and adopt the option mechanism that includes all candidate categories as constraints on the output space.

[0102] Generate structured information: The task instructions provide enough information to ensure that the model can extract relevant information from the input text and produce the desired 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), then the instructions will guide the model to identify entities in the text and label their types, such as names of people, places, or organizations.

[0103] 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 features and be optimized for each task.

[0104] Using Graph Neural Networks (GNNs) to build knowledge graphs: Based on information extraction, we use Graph Neural Networks (GNNs) to build domain knowledge graphs. GNNs have powerful representation learning capabilities and can effectively integrate structural features and attribute features in knowledge graphs, learn low-dimensional vector representations for entities and relationships, and contain rich semantic information. Based on named entity recognition, relationship extraction, and event extraction, GNNs aggregate and update node representations through node domain information, use their information dissemination capabilities to learn semantic relationships and potential information between data, and process node information, node relationship information, and global structure information in knowledge reasoning.

[0105] Interpretability of knowledge graphs: GNN’s information propagation mechanism is interpretable, which helps to understand the decision-making process of the model in the logical reasoning of knowledge graphs. 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 knowledge graphs.

[0106] Through the above steps, the multi-task learning framework based on the large model can automatically extract structured information from the retrieved text blocks, and use this information to build a knowledge graph, provide a structured reasoning path representation for subsequent multi-hop reasoning, and improve the interpretability of multi-hop reasoning in the question-answering system.

[0107] For example, breaking down complex problems into simple ones

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

[0109] Designing a multi-task learning framework

[0110] Build a large model-based multi-task learning framework that guides the model's output through human-readable instructions, uniformly models various information extraction tasks, and captures dependencies between tasks.

[0111] Provide task instructions

[0112] Given source text and task-specific instructions, the model is trained to generate a sequence of tokens representing the desired output structure and its corresponding label. For example, for the question "Who is the winner of the 2019 Nobel Prize in Chemistry?", descriptive instructions are designed to help the model understand different information extraction tasks and adopt an option mechanism that includes all candidate categories as constraints on the output space.

[0113] Generate structured information

[0114] The model will generate target structures and their corresponding types based on the source text and the designed descriptive instructions. For example, the model will generate the names of Nobel Prize winners in Chemistry and label them as "names".

[0115] Building a knowledge graph

[0116] Graph neural networks (GNNs) are used to build domain knowledge graphs. GNN's information propagation mechanism can learn semantic relationships between data. For example, by aggregating domain information of nodes and updating node representations, semantic relationships and potential information between data can be learned. For the question "Who is the winner of the 2019 Nobel Prize in Chemistry?", the model may construct a node representing "2019 Nobel Prize in Chemistry" and another node representing the name of the winner, and the two are connected by a "received" relationship.

[0117] 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 is the winner of the 2019 Nobel Prize in Chemistry?" as an example, the system will identify the information of the winner of the 2019 Nobel Prize in Chemistry and add it to the knowledge graph in a structured form to form links between entities, such as the "received" relationship between "John B. Goodenough" and "2019 Nobel Prize in Chemistry".

[0118] Furthermore, the information extraction tasks can be improved: in addition to named entity recognition, relationship extraction, and event extraction, more information extraction tasks can be considered to be included 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 richer and more complete.

[0119] Furthermore, 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 ability to adapt to unseen data, such as through technical means such as data enhancement and domain adaptation, so that the model can maintain high performance when facing data in different fields or with large changes.

[0120] Furthermore, the multi-task learning framework can be optimized: the existing framework improves the accuracy of information extraction by unified modeling and capturing the dependencies between tasks. More effective multi-task learning strategies can be explored, such as hierarchical multi-task learning and dynamic task scheduling, to further improve the learning efficiency of the model and the accuracy of information extraction.

[0121] Furthermore, the way of constructing knowledge graphs can be expanded: in addition to using graph neural networks (GNNs), other graph representation learning methods can also be studied, such as heterogeneous information networks (HINs), graph attention networks (GATs), etc., to enrich the structural representation of knowledge graphs and improve the quality of graphs.

[0122] Furthermore, the interpretability of the knowledge graph can be improved: the information propagation mechanism of GNN helps to understand the decision-making process of the model. Visualization tools can be further developed to allow users to intuitively see how information propagates in the graph, so as to better understand the reasoning process.

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

[0124] Furthermore, specialized tools or platforms can be developed to provide a complete set of solutions 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.

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

[0126] Specifically, enhance logical reasoning ability:

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

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

[0129] Select a large base model and embed a recursive neural network into the model output layer to enhance the model's logical reasoning capabilities.

[0130] Develop fine-tuning optimization strategies and multi-step reasoning mechanisms to enable the model to track and execute complex reasoning processes, providing solutions for the decomposition of complex problems.

[0131] Construction of cumulative reasoning learning framework:

[0132] The large model Chain of Thought (CoT) prompts and Tree of Thought (ToT) method can guide LLM to describe a structured reasoning process, but introduces the roles of decision maker and verifier in the cumulative reasoning learning framework.

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

[0134] The verifier 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.

[0135] The output of each processing unit serves as the input of the next unit. The reasoning results of each unit can be accumulated, and the output of each processing unit is iteratively verified using the large logical reasoning model (LR-LLM). This means that the model will evaluate the current reasoning results at each intermediate link of the reasoning.

[0136] In addition, a feedback loop mechanism is established so that LR-LLM can dynamically adjust the reasoning path according to the verification results.

[0137] Implement correctness reasoning for multi-hop reasoning:

[0138] Through the cumulative reasoning learning framework, the human problem-solving thinking process is simulated to decompose complex tasks and solve them step by step.

[0139] The powerful reasoning ability of LR-LLM is used to verify and optimize the intermediate reasoning links until the correct answer is inferred.

[0140] In summary, the framework verifies the reasoning path through continuous iteration, dynamically adjusts the reasoning direction, ensures the correctness of the reasoning process, and ultimately draws the correct conclusion.

[0141] For example, we build a cumulative reasoning learning framework based on the large logical reasoning model (LR-LLM). To solve the problem that the reasoning error in multi-hop reasoning question answering increases with the increase of reasoning depth, we use the iterative verification process results to correct the reasoning path until the correct answer is inferred. This process can be explained in detail through the following steps:

[0142] Constructing datasets: First, collect datasets containing rich logical problems and detailed descriptions of multi-step reasoning processes. These datasets may include mathematical proofs, logic tests, programming problems, etc., in order to strengthen the logical reasoning ability of large models.

[0143] Data preprocessing: Clean and format the collected data, including standardizing text, labeling questions and answers, etc., to ensure data quality and facilitate model training.

[0144] Model design and training: Select a large model as a base and embed a recursive neural network into the model output layer to enhance the model's logical reasoning ability. In the training phase, develop fine-tuning optimization strategies and multi-step reasoning mechanisms to enable the model to track and execute complex reasoning processes.

[0145] Cumulative reasoning learning framework: In the cumulative reasoning learning framework, the roles of decision makers and verifiers are designed. The decision maker selects potential reasoning paths or generates possible results based on the current context, while the verifier judges the accuracy of the current reasoning path based on the accumulated context and evaluates whether the current result is the final reasoning result. 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 using the logical reasoning large model (LR-LLM).

[0146] Iterative verification and path correction: Through continuous iterative verification, LR-LLM will evaluate the current reasoning results at each intermediate link of reasoning, and dynamically adjust the reasoning path according to the verification results until the correct answer is inferred.

[0147] To give a concrete example, suppose you are dealing with a problem that involves multi-hop reasoning: "Who are the co-winners of the 2019 Nobel Prize in Chemistry, and what were they awarded for?"

[0148] Step 1: The decision maker chooses the reasoning path of “Find the winner of the 2019 Nobel Prize in Chemistry”.

[0149] Step 2: Using the information in the knowledge graph, the verifier confirms whether the list of winners is correct and evaluates whether further refinement is needed.

[0150] Step 3: If the preliminary result is correct, proceed to the next step, and the decision maker chooses the reasoning path of "finding the reason for the award."

[0151] Step 4: Using the information in the knowledge graph again, the verifier checks whether the reason for the award is accurate and evaluates whether the path needs to be corrected.

[0152] Step 5: Repeat the above process until all relevant information is accurately retrieved and the final answer is formed.

[0153] Through such a process, the cumulative reasoning learning framework ensures the correctness of each step of reasoning, thereby ultimately obtaining a complete and correct answer.

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

[0155] Furthermore, the verifier’s evaluation mechanism can be optimized: the verifier is responsible for evaluating the accuracy of the reasoning path, and the verifier’s algorithm can be improved to make it more intelligent and efficient, such as introducing more complex evaluation criteria or using more advanced models to improve the accuracy of verification.

[0156] Furthermore, new decision-making mechanisms can be introduced: in addition to the existing decision-maker roles, new decision-making 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 decisions.

[0157] Furthermore, the model's adaptive ability can be improved: the model's adaptive learning ability can be enhanced so that the model can adjust itself according to feedback information during the reasoning process, thereby better adapting to different types of reasoning tasks.

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

[0159] The intelligent question answering method based on the collaboration of a large language model and a knowledge graph provided in this application also includes the following additional technical features: decomposing a complex question into multiple simple questions, specifically:

[0160] Fine-tuning training is performed based on the general basic large model to enhance the logical reasoning ability of the large model. Instruction fine-tuning is used to conditionally constrain the output of the large model to ensure that each sub-problem after the complex problem is split contains only one triple. In this way, each sub-problem is solved with a basic function, and each sub-problem contains only a single relationship, thus becoming a simple problem.

[0161] Specifically, fine-tuning training is performed based on a common basic large model.

[0162] Choose a basic model: Choose a general basic 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.

[0163] Fine-tuning training: Fine-tune the base model using a specific dataset that contains complex problems and their gradually broken down sub-problems. The goal of fine-tuning is to enable the model to understand complex problems and break them down into smaller, more manageable parts. This step strengthens the logical reasoning ability of the large model, enabling it to better understand and handle complex problems.

[0164] Use instruction fine-tuning to condition the output of large models

[0165] 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 task instructions described in natural language, such as "split the following problem into multiple sub-problems, each sub-problem should contain only one triple."

[0166] Conditional constraints: Through these instructions, the output generated by the model will be constrained to meet the requirements of a specific format, that is, each sub-question contains only one triple. For example, for the question "Who did what, when and where?" the model will generate multiple sub-questions, each of which contains only one triple, such as "Who did what?", "When did it happen?", "Where did it happen?", etc.

[0167] Make sure each subproblem contains only one triple

[0168] Triple definition: A triple usually refers to an information unit 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.

[0169] Single relation: Through instruction fine-tuning, the subproblems generated by the model are restricted to contain only one triple, which means that each subproblem involves only a single relation. The purpose of this is to ensure that each subproblem can be solved with a basic function, rather than dealing with complex multi-relation problems.

[0170] Subproblems become simple problems

[0171] Simplify the problem: Through the above steps, the original complex, multi-relational problem is broken down into multiple independent, simple relational problems. Each sub-problem contains only one triple and involves only a single relation.

[0172] Basic function solution: Since each subproblem consists of 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 to determine the relationship between two entities.

[0173] Solving complex problems: By breaking down complex problems into multiple simple problems and solving these simple problems one by one, we can eventually get an overall solution to the complex problem. This method greatly reduces the difficulty of solving complex problems and improves the efficiency and accuracy of problem solving.

[0174] 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 goal of solving complex problems.

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

[0176] Treat each simple problem as an intelligent agent, use the basic function call model of multi-agent reinforcement learning to establish a matching relationship between simple problems and basic functions, and optimize the selection strategy;

[0177] The variable-length reasoning path description method based on the inverse binary tree decomposes the program modeling of complex problems into a multi-step program, and uses step-by-step intermediate program solutions to simulate the complex logical reasoning process of answering questions.

[0178] Specifically, consider each simple problem as an agent

[0179] At this stage, each simple problem is considered as an independent agent. Each agent has its own specific goal, which is to solve the sub-problem it represents. The purpose of this is to simulate the solution process of each sub-problem in the multi-agent system.

[0180] Basic function call model using multi-agent reinforcement learning

[0181] In a multi-agent system, each agent (i.e., subproblem) needs to choose the appropriate basic function to solve its own problem. The basic function here refers to operations that can directly handle simple problems, such as finding entities, comparing 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.

[0182] How to implement:

[0183] Define a basic function library: First, define a basic function library that contains a variety of basic operations, such as search, comparison, calculation, reasoning, etc.

[0184] Establishing a matching relationship: Multi-agent reinforcement learning is then used to establish a matching relationship between the agent (simple problem) and the basic function. Each agent learns how to choose the most appropriate basic function to complete the task through trial and error.

[0185] Optimizing selection strategies: Through continuous learning and adjustment, agents can optimize their selection strategies and find the most efficient way to call basic functions to solve sub-problems.

[0186] A variable-length reasoning path description method based on inverse binary tree

[0187] After solving each simple problem, you need to combine these simple solutions to form a reasoning path to solve 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.

[0188] How to implement:

[0189] Construct an inverse binary tree structure: The solution process of a complex problem is modeled as an inverse binary tree structure, where each leaf node represents the solution to a simple problem, and the internal nodes represent the solution to the intermediate steps.

[0190] Step-by-step reasoning: Serialize the post-order traversal of the inverse binary tree into a function sequence, starting from the bottom and gradually deducing upwards until the final answer is obtained.

[0191] Simulate complex logical reasoning process: The inverse binary tree can not only represent the reasoning path, but also simulate the complex logical reasoning process when answering questions, and reach the final answer through step-by-step intermediate program solutions.

[0192] Specific Examples

[0193] Consider a complex question: “Who are the co-winners of the 2019 Nobel Prize in Chemistry, and for what achievements?”

[0194] Break down the problem: Break the problem down into multiple simple questions, such as "Who are the co-winners of the 2019 Nobel Prize in Chemistry?", "What achievements did these winners make?"

[0195] Matching agents to base functions: Treat each subproblem as an agent and use multi-agent reinforcement learning to learn how to choose the best base function to solve each subproblem. For example, the first subproblem might require using the base function of finding an entity to get the name of the recipient.

[0196] Construct the reasoning path: Use the inverse binary tree structure to represent the reasoning path. Each leaf node represents the solution to a sub-problem. Through step-by-step reasoning, we can eventually get the names of all the winners and the reasons for their winning.

[0197] Through the above steps, we can effectively analyze the degree of correlation between simple problems and basic functions, and form one or more multi-hop reasoning paths 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.

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

[0199] Decompose complex questions into multiple simple questions and represent them in vector form. Perform semantic similarity matching between the simple questions after vectorization and the content of the vector library, find the words that are closest to the semantics of the simple questions, embed the corresponding text blocks, and automatically extract structured information from the retrieved text blocks.

[0200] A multi-task learning framework based on a large model guides the output through human instructions, uniformly models information extraction tasks, and captures the dependencies between tasks. 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 labels, and a domain knowledge graph is constructed using a graph neural network. The information propagation mechanism of the graph neural network is used to learn the semantic relationship between data.

[0201] Specifically, complex problems are broken down into multiple simple problems and vectorized.

[0202] Decomposition of complex questions: First, decompose a complex query or question into several simple questions. These simple questions should be small enough that they can be solved individually, and each simple question usually involves only one triple (subject-predicate-object).

[0203] Vectorized representation: Convert the decomposed simple questions 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 question can be represented as a vector, which is convenient for computer processing and analysis.

[0204] The vectorized simple questions are matched with the vector library content for semantic similarity

[0205] Semantic similarity matching: Use the vectorized simple question to calculate the similarity with a pre-built vector library. The vector library can contain a large number of word vectors. By calculating the cosine similarity or other distance metrics between the simple question vector and each word vector in the library, find the word closest to the simple question semantics.

[0206] Embed text chunks: The closest words found are embedded into corresponding text chunks. These text chunks are retrieved from a large number of documents and contain information that may be relevant to simple questions.

[0207] Automatically extract structured information

[0208] Information Extraction: Automatically extract structured information from the retrieved text chunks. This can be achieved through various information extraction techniques such as named entity recognition (NER), relation extraction (RE), event extraction, etc. These techniques aim to identify entities, relations, and events in the text and convert them into structured forms such as triples.

[0209] Multi-task learning framework based on large model

[0210] Multi-task learning framework: Build a multi-task learning framework based on a large model (such as a large-scale pre-trained model of the Transformer architecture), guide the output of the model through human-readable instructions, and achieve unified modeling of information extraction tasks.

[0211] Task Dependencies: The framework is able to capture the dependencies between different information extraction tasks, allowing the model to not only perform a single task but also understand the connections between tasks.

[0212] Generate structured output: Given source text and task-specific instructions, a large model is trained to generate a sequence of tokens that represent the desired output structure and their corresponding labels. For example, the model generates a set of entity names with entity type labels, types of relationships between entities, etc.

[0213] Building a domain knowledge graph

[0214] Using Graph Neural Network (GNN): Use Graph Neural Network (GNN) to build domain knowledge graph. GNN is a special neural network that can process graph-structured data and learn node representations by transferring information between nodes.

[0215] Information propagation mechanism: GNN's information propagation mechanism can learn semantic relationships between data. In the process of building a knowledge graph, GNN captures the complex connections between entities by aggregating information about nodes (entities) and edges (relationships), and learns the structural features in the graph by iteratively updating node states.

[0216] Through the above steps, the multi-task learning framework based on the large model can automatically extract structured information from the text and use this information to build a domain knowledge graph, thereby 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.

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

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

[0219] Introducing decision makers and verifiers. The decision maker is responsible for selecting potential reasoning paths or generating possible results based on the current context, while the verifier judges the accuracy of the current reasoning path based on the accumulated context and evaluates whether the current result is the final reasoning result.

[0220] 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 a large logical reasoning model to ensure that the current reasoning results can be evaluated at each intermediate link of the reasoning.

[0221] Establish a feedback loop mechanism to enable the large logical reasoning model to dynamically adjust the reasoning path based on the verification results.

[0222] Specifically, multi-hop reasoning paths generated based on complex problems

[0223] First, for a complex problem, we use the decomposition techniques discussed earlier to decompose it into a series of simple problems and form a multi-hop reasoning path. 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.

[0224] Introducing deciders and validators

[0225] 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 reasoning action to take next based on the current context information (such as known facts, previous reasoning results, etc.).

[0226] 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 determines 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 question to the current moment).

[0227] Iteratively verify the reasoning path

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

[0229] Accumulate reasoning results: The reasoning results of each processing unit will be accumulated to form a part of the current reasoning path. LR-LLM will evaluate the output of each processing unit to ensure that feedback can be obtained at each intermediate link of the reasoning to judge the effectiveness of the current reasoning path.

[0230] Dynamically adjust the inference path

[0231] Feedback loop mechanism: By establishing a feedback loop mechanism, LR-LLM can dynamically adjust the reasoning path according to the verification results provided by the verifier. If a reasoning step is verified to be incorrect or insufficient to support further reasoning, LR-LLM will reselect or generate a new reasoning path.

[0232] Correct the reasoning path: This process is repeated until the reasoning path is corrected to the point where the correct answer can be inferred. Each adjustment is based on the feedback provided by the verifier, so that the reasoning path gradually approaches the correct solution.

[0233] Specific implementation examples

[0234] Suppose the question to be answered is: “Who are the co-winners of the 2019 Nobel Prize in Chemistry and for what achievements?”

[0235] Generate a multi-hop reasoning path:

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

[0237] Step 2: Identify each winner’s specific achievements.

[0238] Decision makers choose the path:

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

[0240] In the second step, decision makers will look for the achievements of each winner individually.

[0241] Validator evaluation path:

[0242] The verifier checks whether the search results in the first step contain a complete list of winners and assesses whether this information is accurate.

[0243] The verifier also assesses whether the information about each winner’s achievements in step 2 is correct and detailed.

[0244] Iterative verification and path adjustment:

[0245] If the verifier finds that the retrieval results of the first step are incomplete or incorrect, feedback will be given to the decision maker, requiring him to reselect or generate a new retrieval path.

[0246] Similarly, if the achievement information in the second step is not accurate or detailed enough, the verifier will also request to adjust the path.

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

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

[0249] Design descriptive instructions that help the big model understand different information extraction tasks and use an option mechanism that includes all candidate categories as constraints on the output space; the task instructions provide enough information to ensure that the big model can extract relevant information from the input text and generate the desired 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;

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

[0251] For the source text, 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 the form of natural language and generate the corresponding label at the same time;

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

[0253] The final generated token sequence is used to build the knowledge graph.

[0254] Specifically, design descriptive instructions

[0255] Descriptive instructions are designed to help large models understand different information extraction tasks. These instructions should clearly indicate the specific requirements of the task, including:

[0256] Information Type: Specify the type of information to be extracted from the source text, such as entity names, relationship types, event details, etc.

[0257] Output format: Specifies the format of the output structure, such as triples (subject-predicate-object), lists, tables, etc.

[0258] Constraints and Rules: List 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 a certain pattern, etc.

[0259] Output space constraints

[0260] To ensure the consistency and accuracy of 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 to generate output. For example, if the task is to identify the nationality of a person, the instructions should list all possible country names as candidate options.

[0261] Provide task instructions

[0262] During training, each task instance should contain four properties:

[0263] Mission Instructions: Clearly describe the objectives of the mission.

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

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

[0266] Output: Give the expected output structure and its corresponding type.

[0267] Use of labeled data

[0268] Fine-tune the model using a set of labeled data. Labeled data refers to sample data that has been correctly annotated with the output structure and its labels. With this data, the model can learn how to generate the correct output structure based on the given task instructions and input text.

[0269] Instructions guide the model to generate the target structure

[0270] 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 the form of natural language and generate the corresponding label. For example, if the task is named entity recognition (NER), the model will generate entity names and label each entity accordingly (such as person names, place names, etc.).

[0271] Generate token sequence

[0272] The resulting token sequences are used to construct the knowledge graph. These token sequences contain the extracted information and its corresponding labels, which can be used to construct structured knowledge representations, namely nodes and edges in the knowledge graph. In this way, the large model can not only extract information from the text, but also organize this information into meaningful structures to support subsequent multi-hop reasoning.

[0273] Practical application examples

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

[0275] Design Instructions: Instructions might include “Please extract the people, time, and place information from the text, and describe the characters’ actions.”

[0276] Output format: The output should be a structured information containing people, time, place and behavior.

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

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

[0279] Model training: Use labeled datasets to train the model so that it can generate correct structured information based on instructions.

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

[0281] 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, thereby providing the necessary information for building a knowledge graph.

[0282] In some embodiments of the present application, the task instructions describe how to extract relevant information from the input text and generate the desired output structure; the options are 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.

[0283] Specifically, the task instructions

[0284] Task instructions are instructions for how to teach the model how to extract relevant information from input text and generate the desired output structure. It includes the following elements:

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

[0286] Output structure: Specifies the format in which the output should be, such as triples (subject-predicate-object), lists, tables, etc.

[0287] Additional constraints or rules: List any additional constraints or rules that need to be followed during the information extraction process, such as entities must belong to specific categories, relations must conform to a certain pattern, etc.

[0288] 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 report, the instructions may be described as: "Please identify the time, place, participants and a brief description of the event from the text."

[0289] Options

[0290] Options refer to the output label constraints of a task, that is, the set of labels that the model can choose when generating output. These options are pre-defined and are intended to limit the range of outputs generated by the model and ensure that the output meets the expected standards. For example, in a named entity recognition task, options may include category labels such as "person name", "place name", and "organization". These labels act as constraints to help the model generate correct entity classifications.

[0291] Enter text

[0292] The input text is the actual input sentence or paragraph of the task instance. It is the raw material from which the model needs to extract information. 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 may be a news article or a text describing a person's activities.

[0293] Output

[0294] Output refers to the sentence converted from the original label of the sample, that is, the result generated by the model according to the task instruction. This result should conform to the output structure specified by the task instruction and be accompanied by the corresponding label. For example, in the named entity recognition task, the output may be "Li Hua is a teacher", where "Li Hua" is labeled as "name" and "teacher" is labeled as "occupation".

[0295] Practical application examples

[0296] Suppose the task is to extract the time, place, participants, and event itself of an event from a text.

[0297] Task Instructions: Instructions might be described as: “Please identify the time, place, participants, and a brief description of the event from the text.”

[0298] Options: may include time tags, location tags, person tags, event tags, etc.

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

[0300] Output: The output generated by the task instruction may be: "October 1, 2023 (time); Peking University (location); Li Hua (participant); gave a speech on artificial intelligence (event)."

[0301] From the above description, we can see that the task instructions clearly define the tasks that the model needs to complete, the options limit the possibility of the model generating results, the input text provides the object of the model processing, and the output is the result generated by the model based on this information. This structured processing method helps to improve the accuracy and consistency of information extraction tasks.

[0302] Example 2

[0303] In response to the current problems, the present invention proposes a collaborative driving method based on a large model and a knowledge graph, which is used to construct an intelligent question-answering system based on a knowledge graph retrieval enhanced generation model, obtain a deeper semantic understanding, richer knowledge representation and more powerful reasoning ability, change the existing question-answering paradigm, and realize the interpretable reasoning of complex problems. The large language model based on deep neural network technology has powerful natural language understanding and content generation capabilities. The disadvantage is that the knowledge therein is parameterized implicit knowledge, there are problems such as fabrication of facts and lack of interpretability, and the content generated by the large model has hallucinations. The advantages of the knowledge graph are that the knowledge is structured and explicit, and the interpretability is very strong, especially in certain specific fields, the knowledge quality is extremely high. The disadvantage is that the construction cost is too high, it is often not completely correct, and it is relatively poor in natural language processing. There is a clear knowledge structure in the knowledge graph, and the large model can provide powerful text understanding and generation capabilities. Therefore, based on the existing question-answering paradigm of mounting external data on a large model, the present invention synergistically integrates the large language model with the knowledge graph to effectively improve the coupling relationship between the logical parsing ability of complex problems, the knowledge structured representation ability and the multi-hop reasoning correctness verification, with the ultimate goal of achieving explainable reasoning for complex problems, and systematically studies the key core issues in multi-hop reasoning question-answering of complex problems.

[0304] The present invention is divided into four links. The first is the problem analysis link, which decomposes complex problems into simple problems step by step, analyzes the degree of correlation with basic functions, establishes a multi-hop reasoning process description method, and directly converts the solution of complex problems into multi-step simple question-answering reasoning combination problems, thereby reducing 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 provide a structured reasoning path representation for the process reasoning of knowledge question and answer, thereby improving the interpretability 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 the logical reasoning-large language model (LR-LLM), iteratively verifies the process results in multi-hop reasoning, corrects the reasoning path, and improves the accuracy of answer reasoning; the fourth is to construct an intelligent question and answer system based on the knowledge graph retrieval enhanced generation model to achieve correctness reasoning of multi-hop reasoning questions and answers.

[0305] Specifically, in the problem analysis phase, in order to solve the problem of low accuracy of multi-hop reasoning answers to complex problems, the present invention proposes a method for describing the logical reasoning process of complex problems based on a large model thinking chain, which transforms the direct solution of complex problems into a multi-step simple question-answering reasoning combination problem, such as Figure 1 As shown, there are three steps in total.

[0306] Step 1: First, break down the complex problem into a series of smaller and more manageable sub-problems based on the big model thinking chain, and then gradually solve these sub-problems to finally solve the original problem. The present invention first constructs a data set for step-by-step logical solution of complex problems, performs fine-tuning training based on a general basic big model, strengthens the logical reasoning ability of the big model, and uses instruction fine-tuning to conditionally constrain the output of the big model to ensure that each sub-problem of the complex problem only includes one triple, so that each sub-problem can be solved with a basic function and becomes a simple problem containing only a single relationship.

[0307] Step 2: The present invention treats 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 basic functions, and performs a matching degree analysis between simple problems and basic functions. Multi-agent reinforcement learning allows each agent to optimize its selection strategy by interacting with multiple basic functions, thereby realizing the call of appropriate basic functions to match the corresponding sub-problems. In addition, in this step, by analyzing the common basic operations for solving complex problems, a function library containing 13 basic functions such as counting, comparison, search, association, and logical operations is designed, including: 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 the entity; QueryAttr: query the specific attribute value of the entity; QueryRelation: query the relationship between two entities; QueryRelationQualifier: query the specific modifier value of the relational triple; SelectBetween: query the entity with a larger or smaller specific attribute value in two entities; SelectAmong: query the entity with a larger or smaller specific attribute value in an entity set; Count: query the number of entities in the set.

[0308] Step 3: A variable-length reasoning path description method of the inverse binary tree is proposed. The program modeling of complex problems is decomposed into a multi-step program, and the complex logical reasoning process of answering questions is simulated by solving the intermediate program step by step. Each intermediate step program involves a basic function containing entity parameters, which can be represented as a binary tree. Figure 3 As shown in the figure, the directed edge between two nodes represents the dependency relationship between two functions. The left subtree of each intermediate binary tree is the 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 binary tree. In other words, the target function takes the output of the source function as its parameter. The tree-structured program is serialized through post-order traversal and formalized as a sequence of i functions. The general form is as follows:

[0309] ,

[0310] Each basic function receives an entity parameter These parameters need to be reasoned about based on the problem.

[0311] In the information retrieval process, in order to solve the problem of poor interpretability of the question-answering paradigm of large models mounting external data, the present invention proposes a method for constructing a domain knowledge graph based on large model multi-task instruction tuning, converting the retrieved text blocks into structured knowledge, and explicitly representing the multi-hop reasoning path of complex problems, which is the key to verifying the correctness of the results of complex reasoning processes. The present invention converts the information extraction (IE) task into a natural language generation problem, designs a multi-task learning framework based on a large model, automatically performs named entity recognition (NER), relation extraction (RE) and event extraction (EE), and uses graph neural networks to perform structured representation of domain knowledge, such as Figure 4 As shown, it is divided into two steps.

[0312] Step 1: The present invention designs a multi-task learning framework based on a large model, uses human-readable instructions to guide the output of LLM, uniformly models various information extraction tasks, and captures the dependencies between tasks, thereby realizing information extraction based on large model multi-task instruction tuning. When the source text and task-specific instructions are given, the model is trained to generate a token sequence representing the desired output structure and its corresponding label. For the source sentence, descriptive instructions are designed to enable the model to understand different tasks, and an option mechanism including all candidate categories is adopted as a constraint on the output space. Then, the pre-trained language model generates the target structure and the corresponding type in the form of natural language. Instructions are provided for all tasks during training, 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. The format of each task instance has four attributes: task instructions, options, input text, and output. The task instruction provides detailed information on how to extract relevant information from the input text and generate the desired 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. Task instructions act as a bridge between the raw input text and the structured output representation, enabling the model to understand the extraction task and generate accurate and meaningful outputs. Options are output label constraints 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 about how to map the predicted output to the corresponding semantic concepts. The text is the input sentence of the task instance, and then, this sequence is input into the pre-trained language model along with the task instructions and options, enabling the model to generate the desired output sequence for the given task. The output is a sentence converted from the original label of the sample.

[0313] Step 2: The present invention uses Graph Neural Networks (GNN) to construct a domain knowledge graph. Graph neural networks have powerful representation learning capabilities, can effectively integrate the structural features and attribute features in the knowledge graph, learn low-dimensional vector representations for entities and relationships, and contain rich semantic information. On the basis of named entity recognition, relationship extraction, and event extraction, GNN aggregates and updates node representations through the domain information of nodes, uses its information propagation ability to learn semantic relationships and potential information between data, and processes node information, node relationship information, and global structural 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 the logical reasoning of the knowledge graph.

[0314] In the answer reasoning link, the present invention aims to address the knowledge error problems such as knowledge solidification, potential errors and biases in large language models, as well as the defect that the reasoning error in multi-hop reasoning question and answer increases with the increase of reasoning depth, which will lead to deviation from the correct reasoning path. This paper proposes a cumulative reasoning framework based on a large logical reasoning model (LR-LLM). On the one hand, it strengthens the logical reasoning ability of the large model through fine-tuning optimization technology. On the other hand, it constructs a cumulative reasoning learning framework to iteratively verify the results of the reasoning process to ensure the correctness of the reasoning path.

[0315] In terms of strengthening the logical reasoning ability of large models, the present invention collects rich logical problems and detailed multi-step reasoning process descriptions when constructing data sets, such as mathematical proofs, logic questions, programming problems, etc. During data preprocessing, the collected data is cleaned and formatted, including standardized text, labeled questions and answers, etc. When designing the model, a basic base large model is selected, and a recursive neural network is embedded in the model output layer to enhance the logical reasoning ability of the model. In the model training stage, fine-tuning optimization strategies and multi-step reasoning mechanisms are formulated to enable the model to track and execute complex reasoning processes, providing solutions for the disassembly of complex problems.

[0316] In terms of constructing a cumulative reasoning learning framework, the present invention constructs a cumulative reasoning learning framework based on LR-LLM. The large model chain of thought (CoT) prompts and the tree of thought (ToT) method can guide LLM to describe a structured reasoning process. However, these methods lack a mechanism for dynamically storing and utilizing intermediate results. The present invention arranges two types of roles in the cumulative reasoning learning framework: decision makers and verifiers. The decision maker is responsible for selecting potential reasoning paths or generating possible decision results based on the current context, and the verifier 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. 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 output of each processing unit is iteratively verified using the logical reasoning large model (LR-LLM), which means that the model will evaluate the current reasoning results at each intermediate link of the reasoning. In addition, the present invention also establishes a feedback loop mechanism so that LR-LLM can dynamically adjust the reasoning path according to the verification results. This reasoning framework can simulate the human problem-solving thinking process, decompose complex tasks and solve them step by step, and at the same time use the powerful reasoning ability of LR-LLM to verify and optimize the intermediate reasoning links.

[0317] After completing the work of the above three links, the present invention optimizes the three links of the intelligent question-answering system based on retrieval enhancement generation respectively, deeply collaborates the big model with the knowledge graph, and constructs an intelligent question-answering system based on the knowledge graph retrieval enhancement generation model. In the problem analysis link, complex problems are disassembled based on the big model thinking chain, and its logical reasoning process is described by an inverse binary tree; in the information retrieval link, information is extracted from the retrieved text based on the big model multi-task tuning instruction model, and a knowledge graph is automatically constructed; in the answer generation link, 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-answering paradigm, improving the logical analysis ability of complex problems, the knowledge structured representation ability and the process reasoning ability of multi-hop question-answering, and realizing the reasoning of explainable answers from massive text libraries, and finding a new path for the collaborative development model of big models and knowledge graphs.

[0318] Example 3

[0319] A computer program product containing instructions, when running on a device, enables the device to execute the steps in an intelligent question-answering method based on the collaboration of a large language model and a knowledge graph.

[0320] Example 4

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

[0322] Example 5

[0323] An electronic device includes a memory, a processor, and a program stored in the memory and executable on the processor. When the processor executes the program, the steps in an intelligent question-answering method based on the collaboration of a large language model and a knowledge graph are implemented.

[0324] Anything not described in this application can be achieved by adopting or drawing on existing technologies.

[0325] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.

[0326] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims

1. An intelligent question answering method based on the collaboration of a large language model and a knowledge graph, characterized in that: include: Decompose a complex problem into multiple simple problems, and analyze the degree of correlation between the simple problems and basic functions to form a multi-hop reasoning path; Treat each of the simple problems as an intelligent agent, use the basic function call model of multi-agent reinforcement learning, establish a matching relationship between the simple problems and the basic functions, and optimize the selection strategy; Based on the variable-length reasoning path description method of the inverse binary tree, the program modeling of the complex problem is decomposed into a multi-step program, and the complex logical reasoning process of answering the question is simulated by using step-by-step intermediate program solutions; A multi-task learning framework based on a large model automatically extracts structured information from the simple questions to build a knowledge graph; Constructing a cumulative reasoning learning framework based on a large model of logical reasoning, iteratively verifying the process results of the knowledge graph formed based on the multi-hop reasoning path, so as to correct the reasoning path until the correct answer is inferred; Based on the multi-hop reasoning path generated by the complex problem, different knowledge graphs give respective logical reasoning paths; Introducing a decision maker and a verifier, wherein the decision maker is responsible for selecting a potential reasoning path or generating a possible result based on the current context, and the verifier judges the accuracy of the current reasoning path based on the accumulated context and evaluates whether the current result is the final reasoning result; 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 using the large logical reasoning model to ensure that the current reasoning results can be evaluated at each intermediate link of the reasoning; Establishing a feedback loop mechanism so that the logical reasoning model can dynamically adjust the reasoning path according to the verification results; 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 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.

2. The method according to claim 1, characterized in that The complex problem is broken down into multiple simple problems, specifically: Fine-tuning training is performed based on the general basic large model to enhance the logical reasoning ability of the large model. Instruction fine-tuning is used to conditionally constrain the output of the large model to ensure that each sub-problem after the complex problem is split contains only one triple. In this way, each sub-problem is solved with a basic function, and each sub-problem contains only a single relationship, thus becoming the simple problem.

3. The method according to claim 1, characterized in that The multi-task learning framework based on the large model automatically extracts structured information from the simple question to construct a knowledge graph, specifically: Decomposing the complex question into multiple simple questions and performing vectorization representation, performing semantic similarity matching between the vectorized simple questions and the content of the vector library, finding the words closest in semantics to the simple questions, embedding the words into the corresponding text blocks, and automatically extracting structured information from the retrieved text blocks; A multi-task learning framework based on a large model guides the output through human instructions, uniformly models information extraction tasks, and captures the dependencies between tasks. 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 labels, and a domain knowledge graph is constructed using a graph neural network. The information propagation mechanism of the graph neural network is used to learn the semantic relationship between data.

4. The method according to claim 3, characterized in that Given the source text and the instructions for a specific task, the large model is trained to generate a sequence of tokens representing the desired output structure and its corresponding labels, specifically: Design descriptive instructions that help the large model understand different information extraction tasks and adopt an option mechanism that includes all candidate categories as constraints on 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 that need to be followed during the extraction process; During training, instructions for all tasks are provided and the model is fine-tuned on 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 the form of natural language and generate the corresponding label at the same time; Each task instance contains four attributes: task instructions, options, input text, and output; The final generated token sequence is used to construct the knowledge graph.

5. A computer program product comprising instructions, which, when executed on a device, is characterized in that: The device executes the steps of the intelligent question-answering method based on the collaboration of a large language model and a knowledge graph as described in any one of claims 1 to 4.

6. A computer-readable storage medium having a program stored thereon, characterized in that: When the program is executed by a processor, the steps in the intelligent question-answering method based on the collaboration of a large language model and a knowledge graph are implemented as described in any one of claims 1 to 4.

7. An electronic device comprising a memory, a processor, and a program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps of the intelligent question-answering method based on the collaboration of a large language model and a knowledge graph are implemented as described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Question and answer reasoning method and device

    CN114817512A

  • Professional domain question and answer library construction method, question and answer method and system

    CN115203356A