autogen/website/docs/topics/handling_long_contexts/intro_to_transform_messages.md
# Introduction to Transform Messages  Why do we need to handle long contexts? The problem arises from several constraints and requirements:  1. Token limits: LLMs have token limits that restrict the amount of textual data they can process. If we exceed these limits, we may encounter errors or incur additional costs. By preprocessing the chat history, we can ensure that we stay within the acceptable token range.  2. Context relevance: As conversations progress, retaining the entire chat history may become less relevant or even counterproductive. Keeping only the most recent and pertinent messages can help the LLMs focus on the most crucial context, leading to more accurate and relevant responses.  3. Efficiency: Processing long contexts can consume more computational resources, leading to slower response times. 