Patent ID: 11875126
Assignee: SHENZHEN INSTITUTES OF ADVANCED TECHNOLOGY CHINESE ACADEMY OF SCIENCES
Field: Computer technology (Electrical engineering)
Classification: CPC G | IPC G

Claim 19:
20. An apparatus for training a dialog generation model, comprising:
at least one memory configured to store program code; and
at least one processor configured to read the program code and operate as instructed by the program code, the program code comprising:
acquisition code configured to cause the at least one processor to acquire a dialog data set, each piece of dialog data in the dialog data set that is used as a training sample comprising a post and an annotated response corresponding to the post; and
training code configured to cause the at least one processor to:
encode the post in the dialog data set by using an encoder in a dialog generation model to obtain an encoded representation of the post;
fuse, by using a decoder in the dialog generation model, the encoded representation of the post and knowledge information corresponding to the post, to obtain a predicted response corresponding to the post, the knowledge information being obtained from a knowledge base question answering model through transfer learning;
determine a value of a loss function of the dialog generation model based on the predicted response and the annotated response that correspond to the post; and
update a model parameter of the dialog generation model based on the value of the loss function.