Time sequence knowledge graph retrieval enhancement generation method and device and medium
By introducing time series knowledge graphs and historical case learning, combined with logical reasoning optimization, a time series knowledge graph retrieval enhancement generation method is designed, which solves the problem of error generation and insufficient understanding of time constraints in the handling of complex tense problems, and achieves more efficient and accurate timing inference and answer generation.
Patent Information
- Application Number
- CN202510040689.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-10
- Publication Date
- 2025-05-30
AI Technical Summary
Large language models are prone to generate errors or non-existent information when dealing with complex tense problems, and lack understanding of time constraints and logical reasoning capabilities, resulting in a decrease in the accuracy of timing reasoning.
By introducing a time series knowledge graph as a supplement to dynamic knowledge, combining historical case learning and logical reasoning optimization, a time series knowledge graph retrieval enhancement generation method is designed. The method includes fine-tuning of the large language model, enabling it to identify different types of time-related problems, and through the design of prompts and task decomposition examples, the model can decompose complex timing problems into multiple subtasks, generate specific query statements, extract data from the knowledge graph, and finally generate answers, and ensure the accuracy of the answers through back-checking and corrections.
It effectively enhances the answering ability of tense questions of the large language model, improves the accuracy and efficiency of timing reasoning, enhances the interpretability of the model, makes each step transparent and easy to track, and improves the usability and reliability of the large language model in practical applications.
Smart Images

Figure CN120069060A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical fields of temporal knowledge graphs and natural language processing, and specifically relates to a method, device, and medium for temporal knowledge graph retrieval-enhanced generation for temporal knowledge question answering. Background Art
[0002] Knowledge in the real world is dynamic and time-sensitive, and many facts change or are updated over time. Against this backdrop, relying solely on static knowledge bases or knowledge learned once is clearly insufficient to meet real-world needs.
[0003] In recent years, large language models (LLMs) have performed well in some semantic understanding and generation tasks, but still face some challenges in dealing with complex temporal problems. When the task involves complex temporal reasoning, LLMs are prone to providing incorrect results. For example, when answering "Who was the Speaker of the House of Representatives after Bob Halverson?", it is first necessary to determine the time when Bob Halverson served as the Speaker of the House of Representatives, and then retrieve the person who served as the Speaker of the House of Representatives after that time. In the first step, due to the limitations of the training data and the parametric uncertainty of the model's knowledge, it is easy to generate incorrect or non-existent information (hallucinations); in the second step, due to the insufficient understanding of time constraints and logical reasoning ability of LLMs, problems such as inaccurate time filtering may occur, leading to incorrect answers. In such temporal reasoning tasks, any misjudgment of temporal knowledge or error in the reasoning process may lead to incorrect conclusions. The limitations of LLMs in temporal reasoning are as follows:
[0004] (1) Large language models build a parametric internal knowledge base by learning knowledge in a large amount of data without directly accessing external knowledge bases. This makes it impossible for the model to expand or modify its knowledge without retraining.
[0005] (2) Large language models generate outputs based on the maximum probability and have limited ability for complex reasoning. When dealing with complex temporal reasoning involving multiple steps, LLMs may accumulate errors during the generation process, resulting in a decline in the accuracy of reasoning.
[0006] Therefore, it is of practical research significance to propose a method that can enhance the temporal understanding and reasoning ability of large language models. Summary of the Invention
[0007] Object of the Invention: The present invention proposes a method, device, and medium for temporal knowledge graph retrieval-enhanced generation. By introducing a temporal knowledge graph as a supplement to dynamic knowledge and combining historical case learning and logical reasoning optimization, the temporal question answering ability of large language models is effectively enhanced.
[0008] Technical solution: A method for enhancing the retrieval and generation of a temporal knowledge graph according to the present invention includes the following steps:
[0009] (1) Fine-tune a large language model so that it can recognize different types of time-related questions;
[0010] (2) Through the design of prompts and task decomposition examples, enable the large language model to learn from multiple examples how to decompose complex temporal problems into multiple subtasks, where each subtask is an atomic operation; at the same time, design a query statement template for each type of subtask to let the large language model learn how to generate specific query statements according to each subtask;
[0011] (3) The large language model receives a user's question, uses the fine-tuned model to identify the question type; and matches the corresponding prompt according to the question type, and decomposes it into multiple subtasks;
[0012] (4) The large language model generates a query statement for each operation and executes the query to extract data from the knowledge graph; integrates the recalled knowledge with the original question to generate a final answer;
[0013] (5) Input the original question and the finally generated answer into the large language model for verification; if the answer meets the expectation, return the final answer; otherwise, perform backtracking check and correction until the loop upper limit is reached.
[0014] Further, the implementation process of the step (1) is as follows:
[0015] Randomly extract a part of the data from the existing standard temporal knowledge graph question-answering dataset QA, retain the question Q and its corresponding type T, and obtain the question-type pair (Q i , T i ), and use it as a fine-tuning dataset to perform Lora fine-tuning on the pre-trained large language model so that it can accurately classify the temporal question types.
[0016] Further, the implementation process of the step (2) is as follows:
[0017] (21) According to the requirements of temporal questions, design a series of standard atomic operations, which are the smallest granularity units for solving temporal knowledge graph problems and the smallest units for querying the knowledge graph; in addition, the combination of these atomic operations can cover the solutions of various temporal knowledge graph problems;
[0018] (22) From the temporal question-answering dataset QA, for each question type, select representative questions Q, manually annotate their task decomposition process C and atomic operation list L, and obtain example data D = {Q, C, L};
[0019] (23) Design corresponding prompts according to the characteristics of different problem types, specifically describe the steps and logic of task decomposition, guide the model to decompose the problem step by step, and select appropriate atomic operations;
[0020] (24) For operations that need to perform database queries, design corresponding query statement templates according to the output and input parameters of each atomic operation; use the output of the atomic operation as the return value of the query, and use placeholders to represent the input parameters of the atomic operation, which are replaced with specific entities, relationships, or times during actual queries; for atomic operations that do not require knowledge graph interaction, the large model can execute them to obtain the answer, and there is no need to design query statements for them, and set their query templates to be empty; finally, obtain the query statement template library T = {T 1 , T 2 , T 3 , …, T n};
[0021] (25) Design an answer evaluation prompt to determine whether the model has correctly answered the original question. The prompt requires the large model to check whether the answer meets the time constraints and logical structure of the question, ensure that the answer covers all key information and entities in the question, and ensure that the semantics of the answer are consistent with the question.
[0022] Further, the atomic operations include getHeadEntity(tail, rel, time), getTailEntity(head, rel, time), getTime(head, rel, tail), getBetween(entities, Time1, Time2), getBefore(entities, time), getAfter(entities, time), getFirst(entities), getLast(entities).
[0023] Further, the implementation process of the step (23) is as follows:
[0024] First, the prompt provides the model with all optional atomic operations, the description of each atomic operation, and when to use the atomic operation; then, randomly select several examples from the dataset D and add them to the prompt. Through specific example questions and problem-solving ideas, further activate the task decomposition ability of the large language model, and help the large model understand how to decompose problems and select atomic operations in actual situations; finally, the prompt takes the order and structure of the atomic operation combinations corresponding to the problem type as constraints and inputs them to the large language model, allowing the large model to verify and check the generated atomic operation list.
[0025] Further, the implementation process of the step (3) is as follows:
[0026] Based on the knowledge learned during fine-tuning, the model analyzes the structure and content of the user's question, identifies the type of the question, and obtains the question type P. According to the question type P, corresponding prompts are matched, and under the guidance of the prompts, the question is decomposed into multiple subtasks, with each subtask corresponding to an atomic operation. The model extracts the corresponding entities, relationships, or time from the question as the parameters of the atomic operation. If the parameter of an operation is the output of the nth subtask in the task list, then response n is used to represent this parameter. Finally, an atomic operation list O = {O 1 , O 2 , …, O n} is obtained.
[0027] Further, the implementation process of step (4) is as follows:
[0028] The large language model sequentially executes these atomic operations according to the order of the atomic operation list O, and records the executed atomic operations and the output of each atomic operation. When executing the atomic operation Q i , first query the corresponding query statement template in the statement template library T. If there is a non-empty query statement template corresponding to this atomic operation in the template library, then fill in the query statement. If the query statement template is empty, the model will directly generate a result based on the existing knowledge. When filling in the query statement, if the parameter is response n , then the output of the nth subtask needs to be used as a parameter for filling, obtaining the query statement CQ and executing it, and recalling knowledge from the knowledge graph as the output of this step. After completing all subtasks, the large language model integrates the information of each subtask and generates the final answer.
[0029] Further, the implementation process of step (5) is as follows:
[0030] If the answer is unreasonable, then perform a backtracking check, check the answers of each subtask one by one, and analyze the source of the error. First, review the answers of each subtask to determine whether there are any deviations or errors. Then, check the dependency relationships between the subtasks to identify whether the error of a certain subtask has caused the overall reasoning problem. Then locate the error source, correct and re-execute the relevant subtasks, and adjust the reasoning process. If the correct answer still cannot be obtained after re-executing the subtasks, it is considered that the problem decomposition is incorrect, adjust the problem decomposition method or the processing strategy of the original question. After correction, the model will regenerate the answer and verify it again. If the answer meets the expectations, return the final answer; otherwise, continue to backtrack and correct until the loop limit is reached.
[0031] An electronic device according to the present invention includes a memory and a processor, wherein:
[0032] A memory for storing a computer program that can run on a processor;
[0033] A processor for performing the steps of a method for enhanced generation of temporal knowledge graph retrieval as described above when running the computer program.
[0034] A storage medium according to the present invention, on which a computer program is stored, and when the computer program is executed by at least one processor, the steps of a method for enhanced generation of temporal knowledge graph retrieval as described above are implemented.
[0035] Advantageous effects: Compared with the prior art, the advantageous effects of the present invention are as follows: By introducing the mechanisms of problem decomposition and multi-step reasoning, the present invention automatically decomposes complex problems into multiple subtasks, and effectively obtains relevant information by querying the temporal knowledge graph, ensuring the accuracy and comprehensiveness of the answers; at the same time, by fine-tuning the large language model, the present invention enhances its reasoning ability under various time constraints, enabling the model to handle complex time relationship problems such as equality, multiple equalities, and time sequence; the present invention not only improves the efficiency of temporal reasoning, but also enhances the interpretability of the model, making each step of the reasoning process transparent and easy to track, effectively improving the usability and reliability of the large language model in practical applications. Description of the Drawings
[0036] Figure 1 It is a flowchart of the present invention. Detailed Description of the Invention
[0037] The present invention will be further described in detail below with reference to the drawings.
[0038] As Figure 1 shown, the present invention proposes a method for enhanced generation of temporal knowledge graph retrieval, including a preparation stage and an answering stage, and specifically includes the following steps:
[0039] S1: In the preparation stage, first fine-tune the large language model so that it can recognize different types of time-related problems. Next, through the design of prompts and task decomposition examples, enable the model to learn from multiple examples how to decompose complex temporal problems into multiple subtasks, where each subtask is an atomic operation. At the same time, design query statement templates for each type of subtask, and let the large model learn how to generate specific query statements according to each subtask.
[0040] S101: Randomly extract part of the data from the existing standard temporal knowledge graph question-answering dataset QA, retain the question Q and its corresponding type T, and obtain the question-type pair (Q i , T i ), and use it as a fine-tuning dataset to perform Lora fine-tuning on the pre-trained large language model so that it can accurately classify temporal problem types.
[0041] S102: Design a series of standard atomic operations according to the requirements of temporal problems. These operations are the smallest granularity units for solving temporal knowledge graph problems and the smallest units for querying the knowledge graph. In addition, the combination of these atomic operations can cover the solutions to various temporal knowledge graph problems. The atomic operations and their descriptions are shown in Table 1.
[0042] Table 1 Atomic operations and their descriptions
[0043]
[0044] S103: From the temporal question-answering dataset QA, for each question type, select representative questions Q, and manually annotate their task decomposition process C and atomic operation list L to obtain the example data D = {Q, C, L}.
[0045] S104: Design corresponding prompts according to the characteristics of different question types, specifically describe the steps and logic of task decomposition, and guide the model to decompose the problem step by step and select appropriate atomic operations. First, the prompt provides all optional atomic operations, the description of each atomic operation, and when the atomic operation should be used for the model. Then, randomly select several examples from the dataset D generated in (13) and add them to the prompt. Through specific example questions and problem-solving ideas, further activate the task decomposition ability of the large language model and help the large model understand how to decompose problems and select atomic operations in actual situations. Finally, the prompt inputs the order and structure of the atomic operation combinations corresponding to this question type as constraints to the large language model, and let the large model verify and check the generated atomic operation list. The atomic operation combinations corresponding to the question types are shown in Table 2.
[0046] Table 2 Atomic operation combinations corresponding to question types
[0047]
[0048]
[0049] S105: For operations that require database queries, including getHeadEntity(tail, rel, time), getTailEntity(head, rel, time), and getTime(head, rel, tail), design corresponding query statement templates according to the output and input parameters of each atomic operation. Use the output of the atomic operation as the return value of the query, and use placeholders to represent the input parameters of the atomic operation, which will be replaced with specific entities, relationships, or times during actual queries. For atomic operations that do not require knowledge graph interaction, such as getBefore(entities, time), getLsat(entities), etc., these operations can obtain answers by being executed by the large model and do not require query statements to be designed for them. Therefore, set their query templates to be empty. Finally, obtain the query statement template library T = {T 1 , T 2 , T 3 , …, T n}.
[0050] S106: Design answer evaluation prompts to determine whether the model has correctly answered the original question. The prompts require the large model to check whether the answer meets the time constraints and logical structure of the question, ensure that the answer covers all key information and entities in the question, and ensure that the semantics of the answer are consistent with the question. The prompts are as follows:
[0051] First, check whether the answer meets the time constraints and logical structure. If the question involves a time point or time interval, ensure that the time information in the answer meets these constraints. If the question asks for the order of a certain event (such as the first or last occurrence), check whether the order of events in the answer is correct. Ensure that there are no jumping logics or unreasonable reasoning steps in the answer. Second, check whether the answer covers all key information in the question, especially entities and relationships. If the question involves multiple entities or time points, ensure that there are no omissions in the answer. If there are incorrect entities or times, mark them as incomplete or incorrect. Finally, ensure that the semantics of the answer are consistent with the question. Check whether the answer accurately answers the core intention of the question and ensure that the expression method is consistent with the requirements of the question. If the answer is ambiguous or unclear, these problems should be pointed out.
[0052] S2: In the answer stage, the model receives the user's question and uses the fine-tuned model to identify the question type. Then, the model matches the corresponding prompts according to the question type, decomposes it into multiple subtasks. Next, the model generates query statements for each operation and executes the queries to extract data from the knowledge graph. Finally, the model integrates the recalled knowledge with the original question to generate the final answer.
[0053] S201: Identify the question type using the fine-tuned model. Based on the knowledge learned during fine-tuning, the model analyzes the structure and content of the user's question, identifies the type of the question, and obtains the question type P.
[0054] Specifically, for the question "When did World War I end?", this question belongs to the equivalent question type because it only requires one query to obtain the clear answer of "November 11, 1918". If the question raised by the user is: "Who is the Speaker of the House of Representatives after Bob Halverson?", this question requires multiple steps of query. The model must first find out the end time when Bob Halverson served as the Speaker of the House of Representatives, and then obtain the person who served as the Speaker of the House of Representatives after that time. The model determines that this question belongs to the "before / after" category.
[0055] S202: The model matches the corresponding prompt according to the question type P, and under the guidance of the prompt, decomposes the question into multiple subtasks, each subtask corresponding to an atomic operation. In addition, the model extracts the corresponding entities, relationships, or times from the question as the parameters of the atomic operation. If the parameter of an operation is the output of the previous step n, then use response n to represent this parameter. Finally, obtain the atomic operation list O = {O 2 , …, O n}. Table 3 illustrates the atomic operation list obtained by decomposing each type of question.
[0056] Table 3 Atomic operation list obtained by decomposing each type of question
[0057]
[0058]
[0059] S203: The model sequentially executes these atomic operations according to the order of the atomic operation list O, and records the historical steps and the output of each step. When executing the atomic operation O i , first query the statement template library T to match the corresponding query statement template. If there is a non-empty query statement template corresponding to this atomic operation in the template library, then perform the filling of the query statement; if the query statement template is empty, the model will directly generate the result according to the existing knowledge. When performing the filling of the query statement, if the parameter is response n , then it is necessary to use the output of the nth step as a parameter for filling, obtain the query statement CQ and execute it, and recall the knowledge from the knowledge graph as the output of this step.
[0060] Specifically, for the question "When did the Militant of Taliban first commend the Government of Pakistan?", the atomic operation list obtained by S202 is getTime(Militant_of_Taliban, Commend, Government_of_Pakistan), getFirst(response1). For the atomic operation getTime(Militant_of_Taliban, Commend, Government_of_Pakistan), the query statement template MATCH(head{name:$head})-[rel:REL_TYPE]->(tail{name:$tail}) RETURN rel.time AS time is matched. The system fills the entities "Militant_of_Taliban" and "Government_of_Pakistan" and the relationship "Commend" into the query template, generates the final query statement and executes the query to obtain Response1 = {2015, 2021}. For step 2, since the query template matched by getFirst in the template library is empty, it indicates that this question is answered by the large model. Therefore, the large model obtains the earliest time from Response1 = {2015, 2021}, which is 2015.
[0061] S204: After completing all subtasks, the model integrates the information of each subtask and generates the final answer.
[0062] Specifically, for the above example, the model generates the answer "The Taliban first publicly commended the Government of Pakistan in 2015".
[0063] S205: The model inputs the original question and the finally generated answer into the large language model for verification. If the answer is unreasonable, it performs a backtracking check, checks the answers of each subtask one by one, and analyzes the source of the error. First, review the answers of each subtask to determine if there are any deviations or errors; then, check the dependencies between subtasks to identify if an error in a certain subtask has caused an overall reasoning problem; then locate the error source, correct and re-execute the relevant subtasks, adjust the reasoning process, and if necessary, adjust the problem decomposition method or the processing strategy of the original question. After correction, the model will regenerate the answer and verify it again. If the answer meets the expectations, it returns the final answer; otherwise, it continues to backtrack and correct until the loop limit is reached.
[0064] The present invention also provides an electronic device, including a memory and a processor, wherein: the memory is used for storing a computer program capable of running on the processor; the processor is used for executing the steps of a method for enhancing generation of temporal knowledge graph retrieval as described above when running the computer program.
[0065] The present invention also provides a storage medium, on which a computer program is stored. When the computer program is executed by at least one processor, the steps of a method for enhancing generation of temporal knowledge graph retrieval as described above are implemented.
[0066] For complex temporal problems involving relationships such as multiple time nodes, time order, time interval, or event persistence, the present invention obtains knowledge according to the problem requirements by first reasoning and then querying the graph, effectively improving the ability of the large language model to handle such problems that require multi-step reasoning to solve, enhancing the accuracy and efficiency of temporal reasoning, enhancing the generation ability, and improving the interpretability of the large language model.
[0067] The above are only the preferred embodiments of the present invention. It should be noted that for those of ordinary skill in the art in the technical field, without departing from the principle of the present invention, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of the present invention.
Claims
1. A method for enhancing the generation of temporal knowledge graph retrieval, characterized in that: The following steps are involved: (1) Fine-tune the large language model to enable it to recognize different types of time-related questions; (2) By designing prompts and task decomposition examples, the large language model can learn from multiple examples how to decompose complex time series problems into multiple subtasks, where each subtask is an atomic operation. At the same time, query statement templates are designed for each subtask, allowing the large language model to learn how to generate specific query statements based on each subtask. (3) The large language model receives user questions and uses the fine-tuned model to identify the question type. It also matches corresponding prompts based on the question type and decomposes it into multiple subtasks. (4) The large language model generates query statements for each operation and executes the query to extract data from the knowledge graph; the recalled knowledge is integrated with the original question to generate the final answer; (5) The original question and the final generated answer are input into the large language model for verification; if the answer meets expectations, the final answer is returned; otherwise, backtracking is performed and corrections are made until the loop limit is reached.
2. According to claim 1, a temporal knowledge graph retrieval enhancement generation method is characterized in that: The implementation process of step (1) is as follows: We randomly extract some data from the existing standard time series knowledge graph question answering dataset QA, retain the question Q and its corresponding type T, and obtain the question-type pair (Q i ,T i ), as a fine-tuning dataset, to fine-tune the pre-trained large language model, so that it can accurately classify the types of time series questions.
3. According to claim 1, a temporal knowledge graph retrieval enhancement generation method is characterized in that: The implementation process of step (2) is as follows: (21) According to the requirements of time series problems, a series of standard atomic operations are designed. These operations are the smallest granularity units for solving time series knowledge graph problems and the smallest units for querying knowledge graphs. In addition, the combination of these atomic operations can cover the solution of various time series knowledge graph problems. (22) From the sequential question answering dataset QA, for each question type, select representative questions Q, manually annotate their task decomposition process C and atomic operation list L, and obtain sample data D = {Q, C, L}; (23) Design corresponding prompts based on the characteristics of different problem types, specifically describe the steps and logic of task decomposition, guide the model to decompose the problem step by step, and select appropriate atomic operations; (24) For operations that require database query, design a corresponding query statement template based on the output and input parameters of each atomic operation; The output of the atomic operation is used as the return value of the query. Placeholders are used to represent the input parameters of the atomic operation, which are replaced with specific entities, relationships, or time in the actual query. For atomic operations that do not require knowledge graph interaction, the big model can get the answer without designing query statements for them. The query template can be set to empty. Get the query statement template library T = {T1, T2, T3, ..., T n }; (25) Design answer evaluation prompts to determine whether the model correctly answers the original question. The prompts require the large model to check whether the answer meets the time constraints and logical structure of the question, ensure that the answer covers all key information and entities in the question, and ensure that the semantics of the answer is consistent with the question.
4. A method for enhancing the generation of temporal knowledge graph retrieval according to claim 3, characterized in that: The atomic operations include getHeadEntity(tail,rel,time), getTailEntity(head,rel,time), getTime(head,rel,tail), getBetween(entities,Time1,Time2), getBefore(entities,time), getAfter(entities,time), getFirst(entities), getLast(entities).
5. According to claim 3, a temporal knowledge graph retrieval enhancement generation method is characterized in that: The implementation process of step (23) is as follows: First, the prompt provides the model with all optional atomic operations, a description of each atomic operation, and when the atomic operation should be used. Then, several examples are randomly selected from the dataset D and added to the prompt. Through specific example problems and problem-solving ideas, the task decomposition ability of the large language model is further activated, helping the large model understand how to decompose problems and select atomic operations in actual situations. Finally, the prompt inputs the order and structure of the atomic operation combination corresponding to the problem type as constraints to the large language model, allowing the large model to verify the generated atomic operation list.
6. A method for enhancing the generation of temporal knowledge graph retrieval according to claim 1, characterized in that: The implementation process of step (3) is as follows: Based on the knowledge learned during fine-tuning, the model analyzes the structure and content of the user's question, identifies the type of question, and obtains the question type P. According to the type P of the question, the corresponding prompt is matched, and under the guidance of the prompt, the question is decomposed into multiple subtasks, each of which corresponds to an atomic operation. The model extracts the corresponding entities, relations or times from the problem as the parameters of the atomic operation. If the parameter of an operation is the output of the nth subtask in the task list, the response is used. n Indicates the parameter; finally, the atomic operation list O = {O1, O2, ..., O n }.
7. A method for enhancing the generation of temporal knowledge graph retrieval according to claim 1, characterized in that: The implementation process of step (4) is as follows: The large language model executes these atomic operations in the order of the atomic operation list O, and records the executed atomic operations and the output of each atomic operation; i When , first match the corresponding query statement template in the query statement template library T. If there is a query statement template corresponding to the atomic operation in the template library and it is not empty, fill in the query statement; If the query statement template is empty, the model will directly generate results based on existing knowledge; When filling in a query statement, if the parameter is response n , you need to use the output of the nth subtask as a parameter to fill in, get the query statement CQ and execute it, and recall knowledge from the knowledge graph as the output of this step; After completing all subtasks, the large language model integrates the information of each subtask and generates the final answer.
8. The method for enhancing the generation of temporal knowledge graph retrieval according to claim 1, characterized in that: The implementation process of step (5) is as follows: If the answer is unreasonable, backtrack and check the answers to each subtask one by one to analyze the source of the error. First, review the answer to each subtask to determine whether there is any deviation or error. Then, check the dependencies between subtasks to identify whether the error in a subtask causes the overall reasoning problem. Then locate the source of the error, correct and re-execute the relevant subtasks, and adjust the reasoning process. If the correct answer still cannot be obtained after re-executing the subtask, it is considered that the problem decomposition is wrong, and the problem decomposition method or the processing strategy of the original problem is adjusted; after the correction, the model will regenerate the answer and verify it again. If the answer is as expected, the final answer will be returned, otherwise it will continue to backtrack and correct until the loop limit is reached.
9. An electronic device, characterized in that: comprising a memory and a processor, wherein: A memory for storing computer programs that can be run on the processor; A processor, used to execute the steps of a temporal knowledge graph retrieval enhancement generation method as described in any one of claims 1 to 8 when running the computer program.
10. A storage medium, characterized in that: The storage medium stores a computer program, which, when executed by at least one processor, implements the steps of a temporal knowledge graph retrieval enhancement generation method as described in any one of claims 1 to 8.
Citation Information
Cited By
Financial information query method and system based on atlas analysis
CN120256647A
Database query statement generation method based on retrieval enhancement and execution feedback
CN121117021A
A database query statement generation method based on retrieval enhancement and execution feedback
CN121117021B
Digital research and development demand automatic disassembling method based on knowledge reasoning
CN121390756A