Compress Context: Summarize and Trim Irrelevant Information

Employ techniques like summarization and trimming to condense past conversations, tool outputs, and system prompts, retaining only critical information. This can achieve 70-94% cost savings by preventing context bloat and reducing the amount of data the model re-reads.

Sources

Open the full topic