# How do I stop my chatbot resending the whole conversation?

> How to keep chatbot context small: cap past turns, summarise older messages, retrieve what's relevant and cache fixed prompts, so input stops growing.

Source: https://greenai.guide/how-do-i/stop-resending-the-whole-conversation/  
Updated: 2026-11-19

## In short

Most chat features send the whole conversation back to the model on every turn, so input grows with every message. Cap how many past turns you send, summarise older ones into a short note, retrieve only the earlier messages or documents that matter, and cache fixed system prompts. Long inputs cost far more energy than short ones.

## Steps

1. Log input tokens per turn so growth is visible.
2. Send only the last few turns verbatim.
3. Replace older turns with a short running summary.
4. Retrieve earlier messages or documents only when they are relevant to the new question.
5. Use prompt caching for the fixed system prompt and shared context.

**Send the model what it needs for this turn, not everything that has ever been said.** Context that grows without
limit is one of the most common hidden costs in chat features.

## Why does it matter?

Energy rises with the amount of text a model reads. Delavande, Pierrard and Luccioni found energy grows linearly
with prompt and generation length. Epoch AI estimates that a typical query of about 0.3 Wh rises to about 2.5 Wh
with a 10,000-token input and almost 40 Wh with a 100,000-token input. A long support chat that resends every turn
can drift towards the expensive end without anyone noticing.

## How do I keep context small?

- **A sliding window.** Keep the last few turns word for word.
- **A running summary.** After each few turns, ask a small model (or your own code) to compress older history into a
  short note of decisions and facts.
- **Retrieval.** Store past messages and documents, and fetch only those relevant to the new question.
- **Prompt caching.** For fixed instructions, see [how to use caching](/how-do-i/cache-llm-calls/).
- **Start fresh.** Offer a "new topic" button that starts a clean context.

## Common mistakes

- **Re-attaching the same document every turn** instead of retrieving the relevant passage.
- **Summaries that lose key facts.** Test that answers stay correct after summarisation.
- **Not measuring.** Without input-token logs, growth is invisible.

Users can do the same in consumer tools: see [how to stop long AI chats wasting energy](/how-do-i/keep-long-ai-chats-efficient/).
For more habits, read [use AI efficiently](/practice/use-ai-efficiently/).

## Sources

- [How much energy does ChatGPT use?](https://epoch.ai/gradient-updates/how-much-energy-does-chatgpt-use), Epoch AI (2025)
- [Small talk, big impact: the energy cost of thanking AI](https://arxiv.org/abs/2601.22357), Delavande, Pierrard and Luccioni (arXiv 2601.22357) (2026)
- [What are tokens and how to count them?](https://help.openai.com/en/articles/4936856-what-are-tokens-and-how-to-count-them), OpenAI Help Center (2025)
