§ 5Context Window Visualizer

Every LLM operates within a finite context window, a fixed budget of tokens that must accommodate system instructions, conversation history, retrieved knowledge, and space for the model's reply. When the window fills up, something must be evicted. This module visualizes the filling process in real time and compares four eviction strategies: FIFO, importance-based, recency-weighted, and LRU. Drag and drop segments to explore how prioritization changes what the model remembers and what it forgets.

Evicts the oldest non-pinned segment first, regardless of its importance.

200 tokens
0 tokens2000 tokens
500 tokens
0 tokens2000 tokens
Available for Conversation3,396 tokens
Turn 0 / 30

Figure 8

Response
0 / 3,396 tokens used0.0% full
Turn 0 / 30
0 segments in window
system
user
assistant
retrieved
summary
Reserved
Real-time context window utilization. Each colored block represents a conversation segment proportional to its token count. Hatched zones are reserved for the system prompt and model response.

Figure 9

Drag to set priority (top = most important to keep)0 / 3,396 tokens
Drag segments to re-prioritize what stays in the context window. Pin critical segments to protect them from eviction. Lower items are evicted first when the window overflows.

Figure 10

FIFO
Best
Retained
0
Avg Importance
0.00
1st Eviction
Turn 0
Importance
Retained
0
Avg Importance
0.00
1st Eviction
Turn 0
Recency-Weighted
Retained
0
Avg Importance
0.00
1st Eviction
Turn 0
LRU
Retained
0
Avg Importance
0.00
1st Eviction
Turn 0

All four strategies process the same 0 segments with a 3,396-token available window. FIFO retains the highest average importance for this conversation.

Side-by-side comparison of all four eviction strategies applied to the same conversation. The strategy with the highest average importance retained is marked as best.

§ 5.5Validate Live: What Gets Evicted From Your Context Window?

Provide a conversation and set a token budget. The LLM decides what to keep and what to evict, showing the real tradeoffs of context window management on your data.

~271 tokens estimated

50 tokens (tight)500 tokens (full)