System and method of efficient knowledge-enhanced chain-of-thought prompting
AssigneeHuawei Cloud Computing Technologies Co., Ltd.
InventorsMorgan Lindsay Heisler, Chendi Wang, Gursimran Singh, Yong Zhang
Life of this patent
Estimating the term…
Abstract
Methods and systems for processing a natural language input query that includes a question and a respective set of candidate answers for the question, including generating, based on the input query and a knowledge graph, natural language logic paths between at least some of the candidate answers and the question; forming a natural language prompt based on both the input query and the logic paths; and obtaining a response from a pretrained natural language processing model based on the natural language promp.
Claims18
A computer-implemented method for processing a natural language input query that includes a question and a respective set of candidate answers for the question, the method comprising:
- generating, based on the input query and a knowledge graph, natural language logic paths between at least some of the candidate answers and the question, the generating includes:
- identifying a question entity for the question included in the input query;
- identifying a respective candidate answer entity for each of the candidate answers included in the input query;
- identifying, for the question entity, a matching question node entity of the knowledge graph;
- identifying, for at least some of the candidate answer entities, respective matching node answer entities of the knowledge graph;
- and
- identifying, based on inter-node entity relationships specified in the knowledge graph, a respective logic path for each matching node answer entity to the matching question node entity as the natural language logic paths;
- forming a natural language prompt based on both the input query and the logic paths;
- and
- obtaining a response, based on the natural language prompt, from a pretrained natural language processing model based on a large neural network operating under a pretrain-finetune paradigm.
A computing system comprising:
- a processing unit configured to execute computer-readable instructions to cause the system to perform a method for processing a natural language input query that includes a question and a respective set of candidate answers for the question, the method including:
- generating, based on the input query and a knowledge graph, natural language logic paths between at least some of the candidate answers and the question, the generating includes:
- identifying a question entity for the question included in the input query;
- identifying a respective candidate answer entity for each of the candidate answers included in the input query;
- identifying, for the question entity, a matching question node entity of the knowledge graph;
- identifying, for at least some of the candidate answer entities, respective matching node answer entities of the knowledge graph;
- and
- identifying, based on inter-node entity relationships specified in the knowledge graph, a respective logic path for each matching node answer entity to the matching question node entity as the natural language logic paths;
- forming a natural language prompt based on both the input query and the logic paths;
- and
- obtaining a response, based on the natural language prompt, from a pretrained natural language processing model based on a large neural network operating under a pretrain-finetune paradigm.
A non-transitory computer-readable medium having instructions stored thereon, wherein the instructions are executable by a processing unit of a computing system to cause the computing system to perform a method of processing a natural language input query that includes a question and a respective set of candidate answers for the question, the method comprising:
- generating, based on the input query and a knowledge graph, natural language logic paths between at least some of the candidate answers and the question, the generating includes:
- identifying a question entity for the question included in the input query;
- identifying a respective candidate answer entity for each of the candidate answers included in the input query;
- identifying, for the question entity, a matching question node entity of the knowledge graph;
- identifying, for at least some of the candidate answer entities, respective matching node answer entities of the knowledge graph;
- and
- identifying, based on inter-node entity relationships specified in the knowledge graph, a respective logic path for each matching node answer entity to the matching question node entity as the natural language logic paths;
- forming a natural language prompt based on both the input query and the logic paths;
- and
- obtaining a response, based on the natural language prompt, from a pretrained natural language processing model based on a large neural network operating under a pretrain-finetune paradigm.
Dependencies are inferred from the claim text.