
History Selection module:  With complicated dialog behaviors like topic shift or topic return [1]}, simply selecting immediate turns may not work well. A history selection module, therefore, chooses a subset \(H^{\prime }_i\)  of the history turns \(H_i\)  based on a policy (dynamic or static) that is expected to be more helpful than the others. If the history selection module is based on a dynamic learned policy (e.g. ham), then feedback from the other modules can guide its update.

Encoder: The lexical tokens of the context passage \(C\) , selected conversational turns \(H^{\prime }_i\) , and the current question \(Q_i\)  need to be transformed into input embeddings for the reasoning module. Encoder facilitates this transition. The encoder steps may vary with every approach and reasoning inputs, at a high level, encoding involves transformation and combination of context-independent word embeddings called lexical embeddings such as GloVE [2]}, intra-sequence contextual embeddings e.g. ELMo [3]}, BERT [4]} or RNN, question-aware embeddings, and additional feature embeddings like POS tags [5]}, history embedding [6]} or conversation count. Conversational history \(H^{\prime }_i\)  is generally integrated with this module into any or all of the contextual input embeddings. This process is called History modeling and is the most significant aspect of a CMC encoder.

Contextual Integration layer: Contextual information accumulated in the passage, query, and/or history embeddings individually must be fused to generate query-aware and/or history-aware contextualized output embeddings. This process may involve a single layer (single-step reasoning) or repetition across multiple layers (multi-step reasoning). Input for this module generally consists of two (or more) sequence sets for every history turn, or aggregated across all turns, which are then fused in each layer and often inter-weaved [7]} with attention.

Output Predictor: The model output may be in the form of a text span, signals like dialog acts [8]} or a free-form (abstractive) answer [9]}. Contextual embeddings generated by the reasoning module have all the latent information about the question, context passage, and conversational history. To get the token-level output, a fully-connected network followed by a softmax layer is generally used for per-token probability (abstractive) or start/end probability (extractive). Besides, a linear neural network may be used to find the aggregated result of the sequence.

