Before we dive in, one quick disclaimer: this is a simplified explanation. I’m intentionally skipping a lot of the technical details so that anyone can understand what’s going on.
ChatGPT Is Not the AI
First things first, ChatGPT is the application. It isn’t the AI model itself. It’s a product built by OpenAI that lets you interact with one of its large language models.
What Happens When You Send a Prompt?
When you type a message into ChatGPT, your request gets packaged into what’s called a payload and sent as a POST request to the language model running on OpenAI’s servers.
The model processes your prompt, generates a response, and sends it back to the application.
Here’s something interesting though — the response doesn’t usually appear all at once. Instead, it’s streamed back to the interface using a technology called Server-Sent Events (SSE). That’s why you see the text appearing as it’s being generated, rather than waiting for the whole thing to load at once.
The Model Doesn’t Actually Remember You
Here’s the part that surprises most people: the language model itself doesn’t permanently remember your previous messages.
So how does it know what you said five messages ago?
Every time you send a new message, the ChatGPT application packages your latest prompt together with enough conversation history to give the model the context it needs. That entire bundle is sent to the model with each new request.
In other words — every new request includes the context the model needs to answer your question. There’s no persistent memory on the model’s side. It only knows what’s in the current payload.
What Is a Context Window?
Imagine your conversation keeps getting longer and longer. Eventually, you run into something called the context window — also known as the context limit.
Once the conversation becomes too large to fit inside that window, older parts may be removed or summarized so the request stays within the model’s limit. From the model’s perspective, anything that isn’t included in the current request simply doesn’t exist.
That’s why ChatGPT can sometimes “forget” something you mentioned much earlier in a long conversation — it was quietly dropped from the payload.
What Is a Token?
A token is not a word. And it’s not a character either.
A token is simply a chunk of text that the model has learned to process as a single unit. Sometimes one word equals one token. Sometimes a longer word becomes multiple tokens. Even punctuation can count as its own token.
The model doesn’t read your text letter by letter, or strictly word by word. It reads it token by token — because underneath the hood, everything is converted into numbers that the model can process mathematically.
Putting It All Together
So here’s the full picture:
- You type a message in the ChatGPT interface.
- The app packages your message + conversation history into a payload.
- That payload is sent as a POST request to the language model.
- The model processes the tokens, generates a response, and streams it back via SSE.
- The response appears in your chat — word by word, as it’s generated.
And the whole cycle repeats with every message you send.
Simple, right? That’s the basic idea behind how ChatGPT works — no magic, just clever engineering.