def METHOD_NAME(utterances_histories, topics):
    if len(topics) > 0:
        characters = get_character(topics)
    else:
        characters = [""]
    if len(characters[0]) > 0:
        utterances_with_character = list(characters) + [utterances_histories[-1]]
        context_encoding = encode_context(utterances_with_character)
    else:
        context_encoding = encode_context(utterances_histories)
    scores = context_encoding.dot(response_encodings.T)
    indices = np.argsort(scores)[::-1][:10]
    filtered_indices = [ind for ind in indices if responses[ind] not in filter]
    if is_unanswerable_utters(utterances_histories):
        return "", 0.0
    clear_utterances_histories = [tokenize(utt) for utt in utterances_histories[1::2]]
    for ind in reversed(filtered_indices):
        tokenized_response = tokenize(responses[ind])
        if (len(tokenized_response) < 4 or len(tokenized_response) > 15) and len(characters[0]) == 0:
            filtered_indices.remove(ind)
        elif len(tokenized_response) == 0:
            filtered_indices.remove(ind)
        else:
            for utterance in clear_utterances_histories:
                if len(tokenized_response & utterance) / len(tokenized_response) > 0.6:
                    filtered_indices.remove(ind)
                    break
    if len(filtered_indices) > 0:
        return clear_answer(responses[filtered_indices[0]]), approximate_confidence(scores[filtered_indices[0]])
    else:
        return "", 0.0