DEV Community

The Context Window: an LLM's Short-Term Memory, Explained (opens in new tab)

Discussed on DEV

A chatbot feels like it remembers you. It doesn't — it's stateless. Everything it "knows" is just text resent each call, up to a fixed limit: the context window. When the box fills, the oldest messages fall off the edge and are genuinely gone. 🪟 Watch tokens fall off: The model is stateless reply = model(allMessagesSoFar); // the app resends the whole history every turn "Memory" is just text you keep pasting back in. The window is a hard token limit Prompt + conversation + pasted docs + the r...

Read the original article
Sign in to keep reading the full article.

Keyboard Shortcuts

Navigation

Next / previous post
j/k
Open post
oorEnter
Preview post
v

Post Actions

Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Save / unsave
s

Recommendations

Add interest / feed
Enter
Not interested
x

Go to

Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Discover
gb
Search
/

General

Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help