ChatGPT works by predicting the next small piece of text, called a token, over and over, using patterns a large neural network learned from huge amounts of text and then refined with human feedback. This guide walks through what happens to your message, how the model was trained, how tools and memory fit in, and why it still makes confident mistakes.
- ChatGPT splits text into tokens (in English, about 4 characters each) and writes its answer one token at a time by predicting what comes next.
- Pre-training on public web text, licensed data and human-provided data teaches language and facts; post-training with human feedback teaches it to follow instructions and be helpful.
- The model does not store copies of its training data or look answers up in a database; it adjusts billions of numbers called parameters.
- Web search, file analysis and memory are add-ons around the model: they put extra text into the conversation before the model writes.
- Mistakes come from the method itself: the model produces likely-sounding text, and training has historically rewarded guessing over saying I don't know.
How does ChatGPT work, in one paragraph?
ChatGPT works by predicting text: it reads your message as a sequence of tokens and generates a reply one token at a time, each time choosing a likely next token based on everything before it. The model behind it is a large neural network trained in two broad stages. Pre-training on huge amounts of text teaches it language, facts and patterns of reasoning. Post-training, including feedback from people, teaches it to follow instructions, answer helpfully and refuse harmful requests.
OpenAI's own explanation, in its help article on how ChatGPT is developed, puts it the same way: during training the model analyzes how words typically appear together, then "uses that understanding to predict the next most likely word when generating a response, one word at a time."
The name hints at the design: GPT models generate text, are pre-trained on a large body of text, and use the Transformer architecture introduced in the 2017 paper Attention Is All You Need. The GPT-4 technical report describes GPT-4 as "a Transformer-based model pre-trained to predict the next token in a document," followed by a post-training alignment process.
Everything else you see in the app (web search, file uploads, memory, image generation) is built around that core. For the general picture of the technology, read what is a large language model.
What happens when you send ChatGPT a message?
When you press send, ChatGPT assembles a block of text, turns it into tokens, and the model then generates the reply token by token until it decides the answer is complete. Here is the sequence in plain steps:
- The input is assembled. Your new message is combined with the earlier messages in the chat, any custom instructions, relevant memory, and instructions from OpenAI that you normally don't see. OpenAI's Model Spec notes that it "may insert system messages into the input to steer GPT's behavior."
- The text becomes tokens. Words and word pieces are converted to numbers the network can process.
- The model scores every possible next token. Inside the network, attention layers weigh how each part of the input relates to every other part, then the model produces a probability for each token in its vocabulary.
- One token is picked. Usually a likely one, with some controlled randomness so answers don't sound mechanical.
- The loop repeats. The new token is appended to the input and the model predicts the next one. That is why answers appear word by word on screen.
- Tools may interrupt the loop. If the model decides it needs a web search or to read a file, it emits a tool request instead of plain text. The tool's result is added to the conversation and generation continues with that new information.
Step 4 explains a behavior people often notice. Because there are several plausible ways to continue a sentence, OpenAI says there is "an inherent element of randomness in how the model responds," so the same question can get different answers.
What are tokens, and why do they matter?
A token is the unit of text ChatGPT reads and writes: a whole word, part of a word, or a punctuation mark. OpenAI's API docs give a rule of thumb for English: 1 token is about 4 characters or 0.75 words.
OpenAI's example splits the string ChatGPT is great! into six tokens: Chat, G, PT, is, great and !. Other languages often need more tokens for the same meaning, and some tokens are shorter than one character.
Tokens explain several everyday quirks:
- Letter counting is hard for it. The model sees words as chunks rather than individual letters, so questions like "how many r's are in this word" can trip it up unless it reasons step by step or uses a tool.
- Long chats have limits. Each model has a context window, a maximum number of tokens it can consider at once, covering your input, its output and, for reasoning models, its hidden thinking. Very long conversations or documents can exceed it, and older details stop being considered.
- Cost and speed scale with tokens. In the API, you pay per token and longer answers take longer to write.
You can paste any text into OpenAI's tokenizer tool to see how it splits. Our guide to AI tokens covers counting and pricing in more depth.
How was ChatGPT trained?
ChatGPT's models were trained in stages: pre-training on a very large collection of text to learn to predict the next word, then post-training to turn that raw predictor into a helpful assistant. OpenAI describes the stages as preparing training data, pre-training, post-training, and ongoing evaluation after deployment.

Pre-training: learning to predict the next word
In pre-training, the model reads text and repeatedly guesses the next word. OpenAI's example is a sentence like "Instead of turning left, she turned ___." Early in training the guesses are random. Each wrong guess slightly adjusts the model's parameters (also called weights), the large set of numbers that make up the network, and after enormous numbers of examples the guesses become good.
To predict well across millions of different sentences, the model has to pick up grammar, facts, writing styles, and some ability to follow arguments and code. That is why a system trained only to predict text can answer questions, translate and write programs.
OpenAI lists three sources of training data for the models behind ChatGPT:
| Source | What it includes |
|---|---|
| Public internet content | Freely accessible webpages, forums, blogs and posts; not paywalled sites or the dark web |
| Third-party partners | Datasets licensed through agreements |
| Users, human trainers and researchers | Content they provide or generate, within OpenAI's policies |
OpenAI says it filters out hate speech, adult content, sites that aggregate personal information, and spam, and that it increasingly uses synthetic data generated with its own models. Website owners can block OpenAI's GPTBot crawler with robots.txt.
A trained model is not a database of its training text. OpenAI states that its models "do not store or retain copies of the data they are trained on"; training only adjusts parameter values. This is one reason ChatGPT can't reliably tell you where something it knows came from.
Post-training: from text predictor to assistant
A model that only predicts the next word continues text; it doesn't reliably answer. Ask it a question and it might write three more questions, because that pattern also appears online. Post-training fixes this. The best documented method is reinforcement learning from human feedback (RLHF), described in OpenAI's 2022 InstructGPT paper.
What is RLHF, and why does ChatGPT sound so helpful?
RLHF is a training method in which people demonstrate and rank good answers, a separate model learns those preferences, and the language model is then tuned to produce answers that score well. It is the main reason ChatGPT follows instructions, keeps a polite tone and declines some requests.
The InstructGPT paper describes three steps:
- Supervised fine-tuning. Human labelers write example answers to a set of prompts, and the pre-trained model is fine-tuned to imitate them.
- Reward model. Labelers rank several model answers to the same prompt from best to worst. A second model is trained to predict those rankings, producing a score for any answer.
- Reinforcement learning. The language model generates answers, the reward model scores them, and the language model is adjusted to earn higher scores.
The effect was large. In the paper's human evaluations, outputs from a 1.3 billion parameter InstructGPT model were preferred to those from the 175 billion parameter GPT-3, "despite having 100x fewer parameters." The authors also reported better truthfulness and less toxic output, while noting that InstructGPT "still makes simple mistakes."
| Stage | What the model learns | Result |
|---|---|---|
| Pre-training | Language, facts and patterns from huge amounts of text | A powerful but unfocused text predictor |
| Supervised fine-tuning | Imitating good example answers | Follows the question-and-answer format |
| RLHF | What people prefer between answers | Helpful, polite, more likely to follow instructions |
Today's models go through more elaborate post-training than this 2022 recipe, and OpenAI publishes the behavior it aims for in its Model Spec. The basic idea of shaping a pre-trained model with human preferences still holds. One side effect, which the Model Spec explicitly warns against, is sycophancy: a model trained on human approval can drift toward telling people what they want to hear.
Does ChatGPT think before it answers?
Newer ChatGPT models can, in a limited sense: reasoning models generate hidden reasoning tokens to work through a problem before writing the visible answer. OpenAI's reasoning guide says these models use reasoning tokens to break down the prompt and consider multiple approaches, which helps with math, coding, planning and multi-step tasks.
This is still next-token prediction, applied to a scratchpad first. The model works through intermediate steps (OpenAI does not expose the raw reasoning tokens), checks them, and then writes the answer. Reasoning costs more time and tokens, which is why ChatGPT offers model and reasoning-effort controls; the options vary by plan. As of November 2026, the model names and options in the picker change often, so choose by speed versus depth rather than memorizing names.
Use more reasoning for problems with a right answer you can check: calculations, logic, debugging, planning. Use a fast model for rewriting, brainstorming and short factual lookups. Our guide to reasoning models goes further.
How does ChatGPT search the web, use files and remember you?
ChatGPT's extra abilities work by adding text to the model's input: a tool fetches something (search results, file contents, saved memories) and that text becomes part of the conversation the model reads. The model itself stays the same.
| Feature | What it adds to the input | What it fixes |
|---|---|---|
| Web search | Current pages and their citations | Outdated knowledge, need for sources |
| File uploads | Text, tables or images from your files | Questions about your own documents |
| Memory | Saved details, past chats, custom instructions | Repeating your context every time |
| Custom instructions | Your standing preferences | Tone, format, background |
| Connected apps | Content from services such as email, where available | Working with your data |
Web search. OpenAI's ChatGPT documentation describes a built-in web search tool: ask for current information or sources and the results and citations appear in the chat. Without it, the model only knows what was in its training data, which stops at a cutoff date.
Memory. According to OpenAI's memory help page, when memory is on, ChatGPT can draw on past chats, saved memories, custom instructions, saved files and, depending on plan and region, connected apps. It "does not retain every detail from every conversation"; it picks what seems relevant. You manage it in Settings > Personalization > Memory, and you can ask ChatGPT what it remembers about you. Temporary chats don't create or update memories.
Memory feels like learning, but the underlying model does not change when you chat with it. Everything ChatGPT "knows" about you is text it retrieves and adds to the input, which is why you can view, correct and delete it.
Why does ChatGPT make mistakes?
ChatGPT makes mistakes because it generates the most plausible continuation, not a verified fact, and nothing in that process guarantees truth. A 2025 research paper by Kalai and colleagues, Why Language Models Hallucinate, argues that models guess when uncertain "because the training and evaluation procedures reward guessing over acknowledging uncertainty," much like students guessing on hard exam questions.
The common causes, and what to do about each:
| Cause | What you see | What helps |
|---|---|---|
| Plausible guessing | Confident, specific, wrong details (fake citations, made-up numbers) | Ask for sources, turn on web search, verify |
| Training cutoff | Outdated prices, versions or news | Ask it to search, or give it current text |
| Lost context | It forgets an instruction from early in a long chat | Start a new chat, restate key points |
| Tokenization | Miscounted letters, odd spelling tasks | Ask it to go step by step or use code |
| Sycophancy | Agrees with a wrong premise you supplied | Ask neutrally, invite disagreement |
| Ambiguous prompt | A reasonable answer to a different question | Say who, what, format and constraints |
A prompt that makes the model more careful:
Answer the question below. If you are not sure about a fact, say soinstead of guessing. Separate what you know well from what you areinferring, and search the web for anything that may have changedsince your training data. List your sources at the end.Question: ...Our guide to AI hallucinations covers detection and prevention in detail.
Is your ChatGPT data used for training?
ChatGPT does not learn during your chat: the model's parameters are fixed, and any "learning" you see within a conversation is the model reading earlier messages. Separately, OpenAI may use conversations to train future models, depending on your plan and settings.
According to OpenAI's data use help page, on services for individuals (Free, Plus, Pro) your content may be used for training unless you turn off Improve the model for everyone under Settings > Data controls, or choose Do not train on my content in OpenAI's Privacy Portal. Temporary chats are not used to improve models while they remain temporary. If you rate a response with a thumbs up or down, the whole conversation may be used for training even after opting out.
For handling work data safely, read our guide to AI privacy at work.
How to use ChatGPT better now that you know how it works
Knowing that ChatGPT predicts text from its input changes how you should use it. Each habit below follows from one of the mechanics above.
- Put the important context in the prompt. The model can only use what is in its input, so paste the relevant text, data or rules instead of hoping it knows them.
- Be specific about the output. Describe the format, length and audience; vague prompts get the most generic likely answer.
- Turn on search for anything current. Prices, laws, versions and news change after the training cutoff.
- Start new chats for new topics. Long, mixed conversations dilute the context window.
- Use reasoning for checkable problems and a fast model for drafting.
- Verify names, numbers and quotes before you reuse them, and ask for sources.
- Review your memory and data controls once, so you know what is saved and what may be used for training.
For a hands-on walkthrough of the app, see how to use ChatGPT. And if you start using AI coding agents built on the same technology for longer jobs, Orkio runs them on an always-on cloud box so they keep working after you close your laptop.
Frequently asked questions
Does ChatGPT copy answers from the internet?
No. According to OpenAI, its models do not store or retain copies of their training data and do not copy and paste from it; they generate new text from learned patterns. When ChatGPT uses its web search tool, it reads current pages and shows citations, which is the only time it works from specific live sources.
Is ChatGPT connected to the internet?
The model itself is not; it only knows what was in its training data. ChatGPT includes a web search tool that it can use when you ask for current information, and the results and citations appear in the chat. Workspace settings can turn search off for some business accounts.
Why does ChatGPT give different answers to the same question?
Generating text involves an element of randomness, because there are usually several plausible next words and the model picks among them. Memory, custom instructions and earlier messages in the chat also change the input. For consistent results, give precise instructions and the exact format you want.
Does ChatGPT learn from my conversations?
Not in real time; the model does not change while you chat. On Free, Plus and Pro plans, OpenAI may use conversations to train future models unless you turn off Improve the model for everyone in Settings, Data controls. Memory is separate: it saves context about you for future chats and can be managed or turned off in Settings, Personalization.
Does ChatGPT understand what it says?
It depends on what you mean by understand. ChatGPT builds detailed internal representations of how words, facts and ideas relate, which lets it reason through many problems, but it has no direct way to check its statements against the world unless it uses a tool. Treat it as a capable assistant whose factual claims you verify.
SOURCES
- OpenAI Help Center: How ChatGPT and our foundation models are developed
- OpenAI API docs: Advanced usage (managing tokens)
- Ouyang et al. (2022): Training language models to follow instructions with human feedback
- Vaswani et al. (2017): Attention Is All You Need
- OpenAI (2023): GPT-4 Technical Report
- Kalai et al. (2025): Why Language Models Hallucinate
- OpenAI Help Center: Memory in ChatGPT
- OpenAI API docs: Reasoning models

