In a conversational setting where two sources of text (user and the model) follow each other like below

User: some text bla bla Model: another text bah bah User: bla bla bla Model: bah bah

and so on, how does the model differentiate the texts written by the user and the model? I assume in an encoder-decoder setting (like T5 or BART), texts from two sources can be differentiated by giving user texts as encoder input and model's earlier responses as decoder input.

How about GPT-like Decoder only models? Relating to that, what is the common method to train models for long conversational setting like above?

  • $\begingroup$ you can definitely encode it with some special token $\endgroup$
    – Alberto
    Aug 18, 2023 at 21:38

1 Answer 1


A decoder-only conversational model, like GPT-3, generates text based on the context provided to it. It doesn't inherently "distinguish" the source of the text in the way humans might identify different speakers in a conversation. Instead, it generates text continuation based on patterns and information it has learned during training.

Here's how it generally works:

  1. Training Data: The model is trained on a vast amount of text data from the internet. This data includes various sources of information, conversations, articles, books, and more. It learns patterns, language structures, and associations from this diverse dataset.

  2. Contextual Understanding: When given a prompt or context, the model uses its training to understand the context and generate text that follows coherently from that context. It doesn't "remember" specific sources or authors; it generates text based on patterns it has learned.

  3. Pattern Recognition: The model is adept at recognizing patterns in language, such as syntax, semantics, and even subtle context cues. It uses these patterns to generate text that appears to be a continuation of the given context.

  4. No Source Attribution: The model doesn't inherently attribute sources to text, unless specific source information is provided in the prompt. It doesn't have a memory of past interactions or contexts unless provided in the current conversation.

  5. Generating Responses: When generating responses in a conversation, the model generates text that fits the established conversational context. It's not aware of who said what in previous turns of the conversation; it simply generates text that continues the conversation based on patterns it has learned.

  6. Context Window: One limitation of the decoder-only architecture is that it has a limited "context window" or memory of previous input. Earlier parts of the conversation might not have as much influence on the current response as the most recent context.

In summary, the decoder-only conversational model generates text based on patterns it has learned during training and the context provided to it. It doesn't inherently differentiate between different sources of text, and it doesn't have an inherent awareness of the sources of its training data or specific conversations unless explicitly provided in the current context.



You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .