# Ranking candidate responses in Seq2seq model

I have a seq2seq model (already trained on some dataset). Now, I want to rank candidate responses to input text from most relevant to the least one. I tried to use hidden state of encoder and decoder and multiply them to find the best candidate but I'm not sure if this is the right way. Can anyone suggest a solution or even a code for this problem?