r/MachineLearning - [D] Finding the right loss function for matching questions and answers in chat

–#artificialintelligence 

I am currently struggling with a NLP task, for which I am unable to find any real relevant literature or other source of information. A chat consists of N messages where each message is sent by either person1 or a person2. In this chat questions from person1 are answered by person2. My goal is to label the individual messages as either a question, answer, or neither. Additionally, I am also trying to find which messages that are labelled as question constitute 1 question and messages that are labelled as answer constitute 1 answer and which questions and answers belong together.