Conversation cost
Compare full history, a sliding window and summarization over many turns.
Up to 200 turns.
Tokens
Average tokens
Average tokens
Sliding window keeps the last N turns
Summaries keep 20% of the original
Full Context
Keep entire conversation history in context
$0.88
total for 10 turns
- Final context
- 23.5K
- Peak context
- 23.5K
- Avg cost per turn
- $0.088
- Best coherence
- No information loss
- Cost grows quadratically
Sliding Window
Keep only the last N turns in context
$0.79
total for 10 turns
- Final context
- 15.0K
- Peak context
- 15.0K
- Avg cost per turn
- $0.079
- Predictable costs
- Context size stays bounded
- Loses old context
Summarization
Compress older messages, keep recent ones fresh
$0.688
total for 10 turns
- Final context
- 11.9K
- Peak context
- 11.9K
- Avg cost per turn
- $0.0688
- Balanced approach
- Preserves key info
- Summary quality varies
Context size per turn
Tokens sent with each request.
- Full context
- Sliding window
- Summarize
Cumulative cost
Running total across all turns.
- Full context
- Sliding window
- Summarize
Turn by turn
Full context strategy, first 10 turns.
| Turn | Input | Output | Context | Turn cost | Cumulative |
|---|---|---|---|---|---|
| 1 | 5.5K | 1.5K | 5.5K | $0.052 | $0.052 |
| 2 | 7.5K | 1.5K | 7.5K | $0.06 | $0.112 |
| 3 | 9.5K | 1.5K | 9.5K | $0.068 | $0.18 |
| 4 | 11.5K | 1.5K | 11.5K | $0.076 | $0.256 |
| 5 | 13.5K | 1.5K | 13.5K | $0.084 | $0.34 |
| 6 | 15.5K | 1.5K | 15.5K | $0.092 | $0.432 |
| 7 | 17.5K | 1.5K | 17.5K | $0.10 | $0.532 |
| 8 | 19.5K | 1.5K | 19.5K | $0.108 | $0.64 |
| 9 | 21.5K | 1.5K | 21.5K | $0.116 | $0.756 |
| 10 | 23.5K | 1.5K | 23.5K | $0.124 | $0.88 |