How does ChatGPT handle multiple turns and long conversations?
ChatGPT handles multiple turns and long conversations by using a technique known as "context windowing." When responding in a conversation, ChatGPT takes into account not just the most recent message, but also a portion of the conversation history known as the "context." Due to computational constraints, the context window has a maximum token limit, typically around 4096 tokens. If a conversation exceeds this limit, the oldest part of the conversation is truncated. Therefore, it is important to be mindful of conversation length. Additionally, it is a good practice to include important instructions or answers to questions in the most recent message, as prior messages might not be effectively retained by ChatGPT if they were in the truncated part of the conversation. Overall, though ChatGPT can handle multiple turns and long conversations, it is necessary to remain within the context window's token limit and be considerate of the conversation structure.
This mind map was published on 1 December 2023 and has been viewed 130 times.