Dynamic knowledge graph complex question answering method based on prompt word engineering and graph structure

CN118427325BActive Publication Date: 2026-08-21CHONGQING TECH & BUSINESS UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410489915.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-23
Publication Date
2026-08-21
Estimated Expiration
2044-04-23

AI Technical Summary

Technical Problem

然而,将知识图谱结构信息以文本形式呈现并不是一个很好的选择

Benefits of technology

[0061]本发明的有益效果:利用提示词工程融合图结构来进行知识图谱复杂问答,将知识图谱的图结构融合到输入序列作为提示,结合大型语言模型强大的自然语言处理能力,加以路径优化算法,不仅减少了输入参数的数量,还有效提高大语言模型的回答准确度。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118427325B_ABST
    Figure CN118427325B_ABST
Patent Text Reader

Abstract

The application discloses a dynamic knowledge graph complex question and answer method based on a prompt word engineering and a graph structure, and is characterized in that the method comprises the following steps: step 1, acquiring a given question; step 2, graph database query; step 3, correlation scoring; step 4, path optimization; step 5, mind map updating; step 6, graph structure fusion; and step 7, prompting graph reasoning. Effects: the method uses the prompt word engineering and the graph structure to perform the knowledge graph complex question and answer, fuses the graph structure of the knowledge graph into an input sequence as a prompt, combines the powerful natural language processing capability of a large language model, and uses a path optimization algorithm, so that the number of input parameters is reduced, and the answering accuracy of the large language model is effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of large-scale language model technology, and in particular to a complex question-answering method for dynamic knowledge graphs based on prompt word engineering and graph structure. Background Technology

[0002] Currently, the development of large language models has brought about some troubling problems, one of which is the emergence of the "illusion phenomenon." The most mainstream solution to this problem is to improve model performance through knowledge augmentation. Knowledge augmentation involves embedding a domain-specific knowledge base into the large language model to compensate for its shortcomings in certain domains or tasks. This knowledge base can take various forms, such as text documents, vector data, and knowledge graphs. Among these forms, knowledge graphs are highly favored due to their clarity and structure.

[0003] A knowledge graph is a graphical representation of knowledge. Based on the relationships between entities, it presents vast amounts of knowledge in a graph format. Compared to other forms of knowledge bases, knowledge graphs are of higher quality and are therefore considered a highly ideal means of knowledge enhancement.

[0004] However, existing large language model question answering systems have some limitations when using knowledge graphs as a knowledge source. One problem is that current systems simply add the triples from the knowledge graph to the input sequence as plain text. However, presenting the structural information of the knowledge graph as text is not a good choice. This not only introduces more invalid or redundant information but also increases the complexity of the model in processing the input. Furthermore, since knowledge graphs often store a great deal of information, simply increasing the length of the prompts when constructing the input sequence for large language models is not advisable. Excessively long contexts can reduce the model's processing capacity while also increasing computational complexity and resource consumption.

[0005] Therefore, when performing knowledge augmentation, it is necessary to find a balance that provides enough structural information to support the model's learning without overloading the model's processing capacity. Summary of the Invention

[0006] This invention provides a dynamic knowledge graph-based complex question-answering method based on prompt word engineering and graph structure, which not only reduces the number of input parameters but also effectively improves the answer accuracy of large language models.

[0007] To achieve the above objectives, this invention provides a dynamic knowledge graph-based complex question-answering method based on prompt word engineering and graph structure. The key features include the following steps:

[0008] Step 1: Obtain the given question: The acquisition module obtains the given question, performs preprocessing operations on it to obtain the standard question, and sends it to the query module;

[0009] Step 2: Graph Database Query: The query module executes a query statement based on the problem entities or relations in the standard problem, retrieves candidate triples connected to the problem entities or relations from the graph database, and then feeds the candidate triples into the input of the large language model LLM.

[0010] Step 3: Relevance scoring: The large language model LLM scores and sorts the candidate triples based on their relevance through prompt word engineering. The scores are divided into 5 levels, and the candidate triples with the two highest scores are retained and enter the path optimization module.

[0011] Step 4: Path optimization: The path optimization module uses the A* algorithm to optimize the search process. It performs heuristic evaluation and sorts each search path, and then takes the candidate triples related to the three paths with the highest heuristic evaluation as the target triples. The target triples are then sent to the mind map update module and the graph structure fusion module.

[0012] Step 5: Mind Map Update: The mind map update module uses a Python script to stitch the target triples into a mind map and then transmits the mind map to the graph structure fusion module.

[0013] Step 6: Graph Structure Fusion: The graph structure fusion module performs an embedding operation on the target triple and the mind map to obtain a feature triple that carries both textual information and graph structure information, and transforms the graph structure information of the feature triple into a feature sequence with the same feature representation as the input of the large language model LLM;

[0014] Step 7: Prompt for graph reasoning: The graph structure fusion module feeds the feature sequence into the input sequence of the large language model LLM. The large language model LLM uses prompt word engineering to determine whether it can answer the question based on the given question and the feature sequence. If the result is positive, the answer is output; otherwise, it returns to step 2 for iteration.

[0015] The above design firstly scores the candidate triples for relevance. Based on the scores, examples are pre-loaded into the input of the Large Language Model (LLM), retaining the two highest-scoring relationships to improve the model's understanding and accuracy of the question, while filtering out irrelevant or low-relevance information to optimize the efficiency of subsequent processing steps. Further, path optimization introduces heuristic estimation to optimize the search process, comprehensively considering the relevance scores and rankings of entities and relationships to reduce the computational burden of subsequent operations. Then, the path-optimized target triples are embedded to carry both textual and structural information. A simple projection layer transforms the structured triples into features identical to the LLM input sequence for better integration into the LLM. Finally, by pre-loading the feature sequence carrying textual and graph structure information into the input sequence, the LLM agent is invoked for graph reasoning to determine whether the question can be answered. The algorithm iterates based on the result until it terminates.

[0016] This invention addresses the correlation between a given problem and triples in a graph database, further optimizes the path of the triple information and fuses the graph structure, and finally solves the problem through graphical reasoning with hints. It effectively combines the textual information of triples and the graph structure information, thereby improving the efficiency and accuracy of problem processing.

[0017] The rating is divided into five levels, as shown in the table below:

[0018]

[0019] At the start of the relevance scoring step, a set of prompt examples {Q} is constructed. v G v Score v} v This is used to help some large language models (LLMs) with low parameters better understand the input and output; where Q represents the question, G represents the candidate triple, Score represents the rating level, and v represents the v-th prompt example.

[0020] Cue word engineering is a method for optimizing language models by designing and adjusting input cue words to guide the model in generating more accurate and targeted output text. The key to cue word engineering lies in creating carefully designed cue words or instructions that improve model performance and accuracy. This includes steps such as text preprocessing, cue word generation, and preprocessing operations such as converting text to lowercase, removing punctuation, and using word segmentation, as well as generating appropriate cue words based on the input text.

[0021] In addition, cue word engineering also involves how to improve cue words through structured text and other methods to guide large language models (LLMs) to output the desired results.

[0022] Preferably, in step 1, the preprocessing operations include, but are not limited to, text cleaning, text segmentation, and preposition removal.

[0023] Text cleaning can remove noise and redundant information from text, improve data quality, and reduce interference with subsequent processing.

[0024] Text segmentation can divide a whole text into segments and extract meaningful words or phrases, laying the foundation for text understanding and feature extraction.

[0025] Preposition removal preserves essential text features while removing unnecessary ones, making the text more concise, standardized, and easier for subsequent calculations and analysis, thus improving processing efficiency and accuracy.

[0026] Preferably, in step 2, the graph database is the Neo4j graph database.

[0027] Preferably, in step 3, the large language model LLM is either the GPT model or the Tongyi Qianwen model.

[0028] Preferably, in step 4, the formula for calculating the heuristic valuation is as follows:

[0029]

[0030]

[0031]

[0032] in, The score represents the cost function value. entity The score represents the relevance of an entity to a problem. relation A score indicating the relevance of the relationship to the problem;

[0033] This indicates that the entity relationships along the entire path are calculated, rank_e i rank_r represents the relevance score ranking of the i-th entity among all candidate entities and relations. i represents the relevance score ranking of the i-th relation among all candidate entities and relations, and j represents the number of triples on a path;

[0034] s j+1This represents a heuristic estimation, j+1 indicates the next retrieval step, argmax is a function that evaluates the parameters or set of parameters, φ represents summation, and k represents the k-th path. This represents the cost function value of the k-th path. In this expression, n represents the number of paths currently waiting to be calculated, and the entire expression represents the calculation from the first path to the nth path.

[0035] The cost function value g(X) is used to represent the relevance score of entities and relations. The heuristic function h(X) assigns weights based on the relevance score ranking of entities or relations among all candidate entities and relations. The evaluation function takes into account both the actual cost and the heuristic evaluation to rank the paths.

[0036] Preferably, in steps 2 to 7, each iteration of steps 2 to 7 constitutes one iteration query. When step 5 is in the first iteration query, the mind map update module uses a Python script to stitch the target triples into a mind map and transmits the mind map to the graph structure fusion module. When step 5 is in the w-th iteration query, the mind map update module uses a Python script to stitch the target triples with the mind map from the (w-1)-th iteration query, completing the mind map update, and transmits the updated mind map to the graph structure fusion module.

[0037] Through the above design, the target triple obtained from the w-th iteration query is combined with the mind map obtained from the previous query to complete the update of the mind map, continuously improve and enrich the information in the mind map, and enhance the ability of the knowledge graph to answer complex questions.

[0038] Preferably, in step 6, the graph structure fusion module is provided with an embedding unit and a projection layer, and the projection layer is provided with a fully connected layer and a reshaping layer;

[0039] The embedding unit performs an embedding operation on the target triple and the mind map to obtain a feature triple that carries both textual information and graph structure information, and passes it to the projection layer; the projection layer transforms the graph structure information of the feature triple into a feature sequence with the same feature representation as the input of the large language model LLM.

[0040] After path optimization, the target triples need to undergo an embedding operation. The purpose of the embedding operation is to allow the triples to carry both textual and structural information. This embedding operation is similar to encoding the triples so that they can be correctly interpreted and utilized in a large language model (LLM).

[0041] The target triples after path optimization and the input sequence of the large language model LLM belong to different representation spaces. Therefore, it is necessary to transform the structured triples into features identical to the input sequence. A simple projection layer is used to transform the structured information of the triples into feature representations compatible with the language model. Through this transformation, the textual and graph structure information carried by the triples in the knowledge graph can be better integrated into the large language model, thereby improving the model's understanding and performance capabilities.

[0042] The input sequence is a token sequence.

[0043] As a preferred embodiment, the steps for the embedding unit to perform the embedding operation on the target triple and the mind map are as follows:

[0044] Step S1: The graph structure fusion module embeds the mind map into the target triple using the TransE embedding method, as shown in the following expression:

[0045] f r (h,t)=-||h+rt|| 1 / 2

[0046] Where h is the head entity, r is the relation, t is the tail entity, and f is the tail entity. r (h,t) represents the relevance between the head entity and the tail entity;

[0047] Step S2: Represent the pre-trained embeddings of the head entity, relation, and tail entity as matrices, as shown below:

[0048]

[0049] Where H represents the head entity embedding matrix, R represents the relation embedding matrix, and T represents the tail entity embedding matrix. Let N represent a real number, D represent the number of entities, and D represent the embedding dimension.

[0050] Step S3: Concatenate the head entity embedding matrix H, the relation embedding matrix R, and the tail entity embedding matrix T into a feature triple matrix M, as shown in the following expression:

[0051]

[0052] The steps by which the projection layer transforms the graph structure information of the feature triples into a feature sequence with the same feature representation as the input of a large language model (LLM) are as follows:

[0053] Step S4: The fully connected layer performs a linear transformation on the feature triple matrix M to adjust the embedding dimension, as shown in the following expression:

[0054] M ′ =A(M)

[0055] Among them, M ′ Let A denote the adjusted triplet matrix, and A denote the linear transformation.

[0056] Step S5: The reshaping unit will adjust the triplet matrix M. ′ Resize to match the size of a large language model LLM input, as shown in the following expression:

[0057] K = reshape(M) ′ ,(-1,P,D))

[0058] Where P represents the number of prefixes, reshape represents reshaping, and K represents the feature sequence.

[0059] The embedding operation is a vectorized embedding process.

[0060] Preferably, in step 7, when the text information or graph structure information in the feature sequence contains the answer information for a given question, the judgment result is positive and the answer is output; otherwise, the judgment result is negative.

[0061] The beneficial effects of this invention are as follows: By using prompt word engineering to fuse graph structures for complex question answering based on knowledge graphs, the graph structure of the knowledge graph is fused into the input sequence as prompts. Combined with the powerful natural language processing capabilities of large language models and path optimization algorithms, this not only reduces the number of input parameters but also effectively improves the answer accuracy of large language models. Attached Figure Description

[0062] Figure 1 This is an overall flowchart of the present invention;

[0063] Figure 2 This is a flowchart of the structural fusion part in this invention;

[0064] Figure 3 This is an example diagram of mind map updating in the embodiment;

[0065] Figure 4 Example diagrams used to determine whether a mind map can answer a given question. Detailed Implementation

[0066] The present invention will be further described in detail below with reference to the accompanying drawings and specific examples. The following embodiments or drawings are used to illustrate the present invention, but are not intended to limit the scope of the present invention.

[0067] like Figure 1 The following describes a complex question-answering method based on dynamic knowledge graphs using prompt word engineering and graph structures, characterized by the following steps:

[0068] Step 1: Obtain the given question: The acquisition module obtains the given question, performs preprocessing operations on it to obtain the standard question, and sends it to the query module;

[0069] Step 2: Graph Database Query: The query module executes a query statement based on the problem entities or relations in the standard problem, retrieves candidate triples connected to the problem entities or relations from the graph database, and then feeds the candidate triples into the input of the large language model LLM.

[0070] Step 3: Relevance scoring: The large language model LLM scores and sorts the candidate triples based on their relevance through prompt word engineering. The scores are divided into 5 levels, and the candidate triples with the two highest scores are retained and enter the path optimization module.

[0071] Step 4: Path optimization: The path optimization module uses the A* algorithm to optimize the search process. It performs heuristic evaluation and sorts each search path, and then takes the candidate triples related to the three paths with the highest heuristic evaluation as the target triples. The target triples are then sent to the mind map update module and the graph structure fusion module.

[0072] Step 5: Mind Map Update: The mind map update module uses a Python script to stitch the target triples into a mind map and then transmits the mind map to the graph structure fusion module.

[0073] Step 6: Graph Structure Fusion: The graph structure fusion module performs an embedding operation on the target triple and the mind map to obtain a feature triple that carries both textual information and graph structure information, and transforms the graph structure information of the feature triple into a feature sequence with the same feature representation as the input of the large language model LLM;

[0074] Step 7: Prompt for graph reasoning: The graph structure fusion module feeds the feature sequence into the input sequence of the large language model LLM. The large language model LLM uses prompt word engineering to determine whether it can answer the question based on the given question and the feature sequence. If the result is positive, the answer is output; otherwise, it returns to step 2 for iteration.

[0075] In step 1, the preprocessing operations include text cleaning, text segmentation, and preposition removal.

[0076] In step 2, the graph database is the Neo4j graph database.

[0077] In step 3, the large language model LLM is a GPT model.

[0078] In step 4, the formula for calculating the heuristic valuation is as follows:

[0079]

[0080]

[0081]

[0082] in, The score represents the cost function value. entity The score represents the relevance of an entity to a problem. relation A score indicating the relevance of the relationship to the problem;

[0083] This indicates that the entity relationships along the entire path are calculated, rank_e i rank_r represents the relevance score ranking of the i-th entity among all candidate entities and relations. i represents the relevance score ranking of the i-th relation among all candidate entities and relations, and j represents the number of triples on a path;

[0084] s j+1 This represents a heuristic estimation, j+1 indicates the next retrieval step, argmax is a function that evaluates the parameters or set of parameters, φ represents summation, and k represents the k-th path. This represents the cost function value of the k-th path. In this expression, n represents the number of paths currently waiting to be calculated, and the entire expression represents the calculation from the first path to the nth path.

[0085] In steps 2 to 7, each iteration of steps 2 to 7 constitutes one iteration query. When step 5 is in the first iteration query, the mind map update module uses a Python script to stitch the target triples into a mind map and transmits the mind map to the graph structure fusion module. When step 5 is in the w-th iteration query, the mind map update module uses a Python script to stitch the target triples with the mind map from the (w-1)-th iteration query, completing the mind map update. Figure 3 As shown, the updated mind map is then sent to the graph structure fusion module.

[0086] In step 6, the graph structure fusion module is provided with an embedding unit and a projection layer, and the projection layer is provided with a fully connected layer and a reshaping layer;

[0087] The embedding unit performs an embedding operation on the target triple and the mind map to obtain a feature triple that carries both textual information and graph structure information, and passes it to the projection layer; the projection layer transforms the graph structure information of the feature triple into a feature sequence with the same feature representation as the input of the large language model LLM.

[0088] In step 7, if the text information or graph structure information in the feature sequence contains the answer information for a given question, the judgment result is positive, and the answer is output; otherwise, the judgment result is negative, such as... Figure 4 As shown.

[0089] like Figure 2 As shown: The steps of the embedding unit to embed the target triple and mind map are as follows:

[0090] Step S1: The graph structure fusion module embeds the mind map into the target triple using the TransE embedding method, as shown in the following expression:

[0091] f r (h,t)=-||h+rt|| 1 / 2

[0092] Where h is the head entity, r is the relation, t is the tail entity, and f is the tail entity. r (h,t) represents the relevance between the head entity and the tail entity;

[0093] Step S2: Represent the pre-trained embeddings of the head entity, relation, and tail entity as matrices, as shown below:

[0094]

[0095] Where H represents the head entity embedding matrix, R represents the relation embedding matrix, and T represents the tail entity embedding matrix. Let N represent a real number, D represent the number of entities, and D represent the embedding dimension.

[0096] Step S3: Concatenate the head entity embedding matrix H, the relation embedding matrix R, and the tail entity embedding matrix T into a feature triple matrix M, as shown in the following expression:

[0097]

[0098] The steps by which the projection layer transforms the graph structure information of the feature triples into a feature sequence with the same feature representation as the input of a large language model (LLM) are as follows:

[0099] Step S4: The fully connected layer performs a linear transformation on the feature triple matrix M to adjust the embedding dimension, as shown in the following expression:

[0100] M ′=A(M)

[0101] Among them, M ′ Let A denote the adjusted triplet matrix, and A denote the linear transformation.

[0102] Step S5: The reshaping unit will adjust the triplet matrix M. ′ Resize to match the size of a large language model LLM input, as shown in the following expression:

[0103] K = reshape(M) ′ ,(-1,P,D))

[0104] Where P represents the number of prefixes, reshape represents reshaping, and K represents the feature sequence.

[0105] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A complex question-answering method for dynamic knowledge graphs based on prompt word engineering and graph structure, characterized in that, Includes the following steps: Step 1: Obtain the given question: The acquisition module obtains the given question, performs preprocessing operations on it to obtain the standard question, and sends it to the query module; Step 2: Graph Database Query: The query module executes a query statement based on the problem entities or relations in the standard problem, retrieves candidate triples connected to the problem entities or relations from the graph database, and then feeds the candidate triples into the input of the large language model LLM. Step 3: Relevance scoring: The large language model LLM scores and sorts the candidate triples based on their relevance through prompt word engineering. The scores are divided into 5 levels, and the candidate triples with the two highest scores are retained and enter the path optimization module. Step 4: Path optimization: The path optimization module uses the A* algorithm to optimize the search process. It performs heuristic evaluation and sorts each search path, and then takes the candidate triples related to the three paths with the highest heuristic evaluation as the target triples. The target triples are then sent to the mind map update module and the graph structure fusion module. Step 5: Mind Map Update: The mind map update module uses a Python script to stitch the target triples into a mind map and then transmits the mind map to the graph structure fusion module. Step 6: Graph Structure Fusion: The graph structure fusion module performs an embedding operation on the target triple and the mind map to obtain a feature triple that carries both textual information and graph structure information, and transforms the graph structure information of the feature triple into a feature sequence with the same feature representation as the input of the large language model LLM; Step 7: Prompt for graph reasoning: The graph structure fusion module feeds the feature sequence into the input sequence of the large language model LLM. The large language model LLM uses prompt word engineering to determine whether it can answer the question based on the given question and the feature sequence. If the result is positive, the answer is output; otherwise, return to step 2 for iteration. In step 4, the formula for calculating the heuristic valuation is as follows: ; ; ; in, This represents the cost function value. The score represents the relevance of the entity to the problem. A score indicating the relevance of the relationship to the problem; This indicates that the entity relationships along the entire path are calculated. This represents the relevance score ranking of the i-th entity among all candidate entities and relations. represents the relevance score ranking of the i-th relation among all candidate entities and relations, and j represents the number of triples on a path; This represents a heuristic valuation, where j+1 indicates the next step in the search. A function that evaluates a function to its parameters or a set of parameters. This represents summation, where k represents the k-th path. This represents the cost function value of the k-th path. In this expression, n represents the number of paths currently waiting to be calculated, and the entire expression represents the calculation from the first path to the nth path.

2. The dynamic knowledge graph complex question answering method based on prompt word engineering and graph structure according to claim 1, characterized in that: In step 1, the preprocessing operations include, but are not limited to, text cleaning, text segmentation, and preposition removal.

3. The dynamic knowledge graph complex question answering method based on prompt word engineering and graph structure according to claim 1, characterized in that: In step 2, the graph database is the Neo4j graph database.

4. The dynamic knowledge graph complex question answering method based on prompt word engineering and graph structure according to claim 1, characterized in that: In step 3, the large language model LLM is either the GPT model or the Tongyi Qianwen model.

5. The dynamic knowledge graph complex question answering method based on prompt word engineering and graph structure according to claim 1, characterized in that: In steps 2 to 7, each iteration of steps 2 to 7 constitutes one iterative query. When step 5 is in the first iterative query, the mind map update module uses a Python script to stitch the target triples into a mind map and transmits the mind map to the graph structure fusion module. When step 5 is in the w-th iterative query, the mind map update module uses a Python script to stitch the target triples with the mind map from the (w-1)-th iterative query, completing the mind map update, and transmits the updated mind map to the graph structure fusion module.

6. The dynamic knowledge graph complex question answering method based on prompt word engineering and graph structure according to claim 1, characterized in that: In step 6, the graph structure fusion module is provided with an embedding unit and a projection layer, and the projection layer is provided with a fully connected layer and a reshaping layer; The embedding unit performs an embedding operation on the target triple and the mind map to obtain a feature triple that carries both textual information and graph structure information, and passes it to the projection layer; the projection layer transforms the graph structure information of the feature triple into a feature sequence with the same feature representation as the input of the large language model LLM.

7. The dynamic knowledge graph complex question answering method based on prompt word engineering and graph structure according to claim 6, characterized in that: The steps for the embedding unit to perform the embedding operation on the target triple and the mind map are as follows: Step S1: The graph structure fusion module embeds the mind map into the target triple using the TransE embedding method, as shown in the following expression: ; Where h is the head entity, r is the relation, and t is the tail entity. Indicates the relevance between the head entity and the tail entity; Step S2: Represent the pre-trained embeddings of the head entity, relation, and tail entity as matrices, as shown below: ; Where H represents the head entity embedding matrix, R represents the relation embedding matrix, and T represents the tail entity embedding matrix. Let N represent a real number, D represent the number of entities, and D represent the embedding dimension. Step S3: Concatenate the head entity embedding matrix H, the relation embedding matrix R, and the tail entity embedding matrix T into a feature triple matrix M, as shown in the following expression: ; The steps by which the projection layer transforms the graph structure information of the feature triples into a feature sequence with the same feature representation as the input of a large language model (LLM) are as follows: Step S4: The fully connected layer performs a linear transformation on the feature triple matrix M to adjust the embedding dimension, as shown in the following expression: ; in, Let A denote the adjusted triplet matrix, and A denote the linear transformation. Step S5: The reshaping unit will adjust the triplet matrix. Resize to match the size of a large language model LLM input, as shown in the following expression: ; Where P represents the number of prefixes. denoted as reshaping, and K represents the feature sequence.

8. The dynamic knowledge graph complex question answering method based on prompt word engineering and graph structure according to claim 1, characterized in that: In step 7, if the text information or graph structure information in the feature sequence contains the answer information for a given question, the judgment result is positive and the answer is output; otherwise, the judgment result is negative.