Method and apparatus for generating prompt data based on knowledge graph
AssigneeAlipay (Hangzhou) Information Technology Co., Ltd.
InventorsDeng ZHAO, Lei SHI, Bin HU, Jianshan HE
Life of this patent
Estimating the term…
Loading patent…
AssigneeAlipay (Hangzhou) Information Technology Co., Ltd.
InventorsDeng ZHAO, Lei SHI, Bin HU, Jianshan HE
Estimating the term…
Embodiments of this specification provide a method and an apparatus for generating a prompt based on a knowledge graph. In the method, a reasoning rule and an instance subgraph from the knowledge graph that match each other can be obtained in a plurality of manners. A question and answer template is constructed based on the reasoning rule. The question and answer template includes a question template and an answer template, and the answer template includes a cause template and a result template. A target text can be generated based on a combination of the question and answer template and the instance subgraph. The target text includes a question text and an answer text, and the answer text includes a cause text and a result text. The target text is used as a prompt to adjust a language model.
A method for generating a prompt based on a knowledge graph, comprising:
(canceled)
A non-transitory computer-readable storage medium, comprising instructions stored therein that, when executed by a processor of a computing device, cause the computing device to:
A computing device, comprising a memory and a processor, wherein the memory stores executable instructions that, in response to execution by the processor, cause the computing device to:
Dependencies are inferred from the claim text.