Conversational AI 22-RETRIEVAL-BASED RESPONSE GENERATION
The generation-based methods are used widely for producing responses in neural dialogue systems. An alternative method is to retrieve a pre-defined response from a data source such as a dialogue corpus by matching against the input. One problem is that the input-response matching algorithm has to deal with possible semantic gaps between the input and the response. Matching the input and the response in single-turn dialogues involves encoding the input and candidate responses as vectors and computing matching scores using a ranking algorithm. Multi-turn matching involves encoding the current input as well as previous utterances into a context vector, encoding each candidate response into response vectors, and computing a matching score that selects the response that is most relevant to the whole context.