Patent ID: 11841850

Abstract:
Provided are a computer-implemented method, a computer program and a system for determining a knowledge graph query having a response conforming to a plurality of training samples. The method may comprise receiving a knowledge graph; receiving the training samples, wherein each of the training samples is a relation, wherein each value in the training samples corresponds to one of the nodes of the knowledge graph, wherein the training samples include one or more positive training samples and one or more negative training samples; identifying one or more variables from the training samples. The method may further comprise determining a plurality of relations, wherein each of the relations includes a plurality of symbols, the symbols including the identified variables; determining a test metarule, the test metarule including a first relation from the plurality of relations; iteratively querying the knowledge graph using the test metarule and controlling development of the test metarule according to responses to the queries. Each of the responses may be one of the following: NOKP, which is returned when the test metarule does not match all of the positive training samples, OKP, which is returned when the test metarule matches all of the positive training samples but does not exclude all of the negative training samples; OKPN, which is returned when the test metarule matches all of the positive training samples and excludes all of the negative training samples. When the response to the querying is OKPN, the method may further comprise ending the querying and using the developed test metarule as a final metarule; and computing the knowledge graph query having a response conforming to the training samples from the final metarule.