使用 TripleNet, TensorFlow 训练基于检索的聊天机器人

给定上下文 (context), 查询条件 (query) 和 回复 (reply),判断该 reply 是否适合该上下文,作为一个合格的答案。

We consider the importance of different utterances in the context for selecting the response usually depends on the current query. In this paper, we propose the model TripleNet to fully model the task with the triple ( c o n t e x t , q u e r y , r e s p o n s e ) (context, query, response) (context,query,response) instead of ( c o n t e x t , r e s p o n s e ) (context, response) (context,response) in previous works. The heart of TripleNet is a novel attention mechanism named triple attention to model the relationships within the triple at four levels. The new mechanism updates the representation for each element based on the attention with the other two concurrently and symmetrically. We match the triple C , Q , R {C, Q, R} C,Q,R centered on the response from char to context level for prediction. Experimental results on two large-scale multi-turn response selection datasets show that the proposed model can significantly outperform the state-of-the-art methods.
使用 TripleNet, TensorFlow 训练基于检索的聊天机器人

开源项目地址:

https://github.com/chatopera/triplenet