P.K. SHARMA

Cyber security intelligence, AI governance, practitioner analysis

Interactive explainer

What actually happens when you press enter in ChatGPT

Your six-word question becomes thousands of tokens. Follow the whole pipeline, then fill the context window until your own instructions fall out.

A chat assistant looks like a conversation. Underneath, every turn is a fresh, stateless request that re-sends the entire transcript, and the window it fits into has a hard edge. Follow one message through the pipeline, then push the window until it starts dropping things, because what it drops first is the part most people assume is safest.

How this works: A deterministic simulation running entirely in your browser, not a live model. Nothing you do here is sent anywhere. The eviction arithmetic is real: token counts are added up and the oldest turns genuinely fall out of the budget. The counts themselves are illustrative and the window is deliberately small.

What you typed

Why did my payment fail?

Six words. What actually leaves your browser is the block on the right: an operator-written system prompt you never see, the entire conversation so far, and then your message.

The assistant has no memory between turns. Continuity is an illusion produced by re-sending the whole transcript every single time.

The prompt sent to the model

System instructions · written by the operator, not by you

You are a support assistant for Example Ltd. Be concise and professional. Never speculate about outages. If you do not know an answer, say so and offer to escalate.

Conversation history · every earlier turn, re-sent in full

user: Never quote full account numbers back to me. assistant: Understood, I will not include them. user: My payment failed this morning... assistant: Payments retry twice over 72 hours...

User question · the only part you typed

Why did my payment fail?

Step 1 of 5

Your message is not the prompt

What leaves your browser is an operator-written system prompt you never see, the entire conversation so far, and then your message. The assistant has no memory between turns; continuity is produced by re-sending the whole transcript every time.

Keep scrolling to advance

The pipeline, step by step

  1. 1

    Your message is not the prompt

    What leaves your browser is an operator-written system prompt you never see, the entire conversation so far, and then your message. The assistant has no memory between turns; continuity is produced by re-sending the whole transcript every time.

  2. 2

    The context window has a hard edge

    Everything must fit inside a fixed token budget, with room held back for the reply. When the conversation outgrows it, the oldest turns are simply left out of the request. No warning is shown, and nothing tells you what was dropped.

  3. 3

    One pass over everything

    The assembled text goes through the network once, in parallel, and produces a score for every possible next token. No database is consulted, no fact is checked, and nothing is remembered for next time.

  4. 4

    The reply is written one token at a time

    Each token is appended and the whole thing goes back through the model to produce the next. The typing effect is the generation itself. The model cannot revise what it has already emitted, so a wrong turn is built upon rather than corrected.

  5. 5

    The safety layer sits around the model

    Input screening, output screening, tool permissions, and retention are product decisions made by whoever built the assistant. They differ by vendor, by tier, and between the consumer app and the API.

Where this breaks

Where this breaks: your instructions expire without telling you

The rule you set in the first message is not a setting. It is text near the top of a transcript, and when the conversation outgrows the window that text stops being sent. The assistant has not forgotten it or chosen to ignore it; it is no longer in the request. Nothing in the interface marks the moment it happened. This is why long-running chat sessions drift, why a constraint agreed early quietly stops being honoured, and why anything that genuinely must hold has to live in the system prompt or in code, where the product controls it, rather than in a message the user typed and trusts.

This is the work behind AI Consultancy.

Common questions

Does ChatGPT remember our conversation?

Not in the way people assume. Each turn is a stateless request that re-sends the transcript, so the apparent memory is the transcript being pasted back in every time. Separate long-term memory features, where a product offers them, are a distinct mechanism that stores facts outside the conversation and injects them into later prompts.

What is a context window?

The maximum number of tokens a model can take in one request, covering the system prompt, the conversation history, your message, and the space reserved for the reply. It is a hard limit of the model, not a setting you can raise from the interface.

Why do long conversations get worse?

Two reasons. Earlier turns fall out of the window entirely, so instructions and details set at the start stop being sent. What remains also competes for attention, so relevant material further back has less influence than the same material would have in a short, focused conversation. Starting a fresh chat with a clean summary usually beats continuing a long one.

Can I see the system prompt?

It is not shown to you, and it is written by whoever built the assistant rather than by you. It should not be treated as a secret either: it is text sitting in the same request as everything else, and prompts have been extracted from plenty of production systems. Never put a credential or anything genuinely confidential in one.

Is my data used to train the model?

That depends entirely on the vendor, the plan, and the settings in force, and the answer changes over time. Consumer tiers and business or API tiers commonly differ. Treat it as a contractual question to check in the terms that apply to your account, not something to infer from how the product behaves.

Is the app the same as the API?

No, and the difference matters when you assess risk. The consumer app adds a system prompt, conversation management, retrieval, tools, and safety layers around the model. The API gives you the model and expects you to build those yourself. Two products on the same underlying model can behave very differently.

Share this explainer

Free to embed on your own site or newsletter.

LinkedInXWhatsAppEmail

Related analysis

Next explainer

Watch an agent plan, call tools and loop. Then poison one tool result, and take a permission away to watch the same attack achieve nothing.