CPC G06F 40/35 (2020.01) [G06N 3/045 (2023.01); G06N 3/08 (2013.01); G06N 5/04 (2013.01)] | 20 Claims |
1. A method for training a dialog generation model, performed by a server, the method comprising:
acquiring 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;
encoding the post in the dialog data set by using an encoder in a dialog generation model to obtain a first encoded representation of the post;
fusing, by using a decoder in the dialog generation model, the first 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;
determining a value of a loss function of the dialog generation model based on the predicted response and the annotated response that corresponds to the post; and
updating a model parameter of the dialog generation model based on the value of the loss function.
|