The textbox is the least interesting part of a chat assistant. The real story starts when you hit Send. I mapped the journey from a cybersecurity and AI/ML perspective: what leaves your device, what gets added, where the model’s numbers come in, and how the answer gets back to your screen. 1. Your message leaves the device When you tap Send, the app packages your message with session and conversation information and sends it to the service over an encrypted connection. The service handles the request and routes it to the relevant model or workflow. So your sentence doesn’t travel straight from the textbox into a “brain.” It enters a larger system. 2. The service builds the context The model may receive more than the line you just typed. The app can assemble your current message with higher-level instructions, relevant earlier turns, and saved memory if that feature is enabled and the information seems useful. Files, search results, or other tool outputs may also be included. Memory does not necessarily mean every past chat is copied into every new request. Think of it as context the product may retrieve when relevant. The exact assembly and routing depend on the product and aren’t fully public for every ChatGPT request. 3. The text becomes tokens and numbers The assembled input is divided into tokens: pieces that may be whole words, parts of words, punctuation, or other text units. Each token is mapped to an integer ID the model can process. A useful English estimate is about 1 token per 4 characters, or roughly ¾ of a word. That’s only a rule of thumb: “100 tokens ≈ 75 words” is not a universal conversion, and languages, punctuation, and tokenizers change the count. The model’s context window is its working capacity for the request and response. It has a limit. For scale, OpenAI’s published model examples include 128,000 tokens for GPT-5.2 Chat and 400,000 for GPT-5.2 in the API. Those are model-specific examples, not a promise about every ChatGPT mode or plan. Input, conversation history, and output all use context; some models also count reasoning tokens. 4. The model processes the sequence Token IDs are turned into vectors: arrays of numbers. Transformer layers use attention to let each token’s representation draw information from relevant earlier context. Here’s a distinction I wish more AI explainers made: attention is over token representations; it is not a spotlight sweeping across billions of parameters. Parameters are learned numerical weights that shape the calculations inside the model. OpenAI has published parameter counts for its open-weight gpt-oss models: 21 billion and 117 billion total parameters. They use a mixture-of-experts design, so only 3.6 billion and 5.1 billion, respectively, are active for each token. Those are useful examples of scale, but they are not the sizes of the closed models powering ChatGPT. Exact parameter counts for those models are not public. 5. The model scores what could come next After processing the context, the model produces scores for possible next tokens, which can be turned into probabilities. A decoding method selects a token from those possibilities. One setting used in some model APIs is temperature. Lower temperature makes the probability distribution more concentrated; higher temperature makes output more random. OpenAI’s API docs use 0.2 and 0.8 as examples. A chat product may set this internally, and some models or modes do not support the setting. Temperature changes how the model selects among possibilities. It does not add facts or guarantee a better answer. 6. Safety checks can happen around generation Safety is not just one switch. Systems can assess prompts and generated responses, while the model itself is also trained and instructed to respond safely. Depending on the product and feature, a check may allow, warn, refuse, or block content.








