Quick answer
ChatGPT is a chatbot built on a large language model. It breaks your message into small pieces called tokens, then predicts the most likely next token, one after another, to build a reply. It learned to do this by studying huge amounts of text, and was then fine-tuned with human feedback to be more helpful and safer. It does not look answers up in a database by default, which is why it can sound confident and still be wrong.
ChatGPT can write emails, explain physics and debug code, so it is easy to assume it “knows” things the way a person does. What is actually happening is both simpler and stranger: a very large prediction machine is choosing words one at a time, based on patterns it learned from an enormous amount of text.
- The short version: four steps from question to answer
- Step 1: your words become tokens
- Step 2: the model predicts the next token
- Step 3: where the knowledge comes from
- Step 4: memory, context and reasoning
- Why ChatGPT sometimes makes things up
- How to get better answers from ChatGPT
- What has changed in newer versions
- Key takeaways
- Frequently asked questions
- Sources
OpenAI launched ChatGPT on 30 November 2022 as a free research preview, and it quickly became one of the fastest-growing apps ever. This guide explains, without the maths, what happens between pressing Enter and seeing a reply, why it sometimes gets things wrong, and how to get better answers from it. For the bigger picture, start with our plain-English guide to AI.
The short version: four steps from question to answer
Every reply ChatGPT gives you comes out of the same basic loop. The details are complicated, but the shape is simple:
The rest of this guide walks through each step, then looks at how the model learned to do this in the first place.
Step 1: your words become tokens
A computer cannot read words directly, so ChatGPT first splits your message into tokens: whole words, parts of words or punctuation. A long or unusual word such as “unbelievable” may be split into several pieces, while common short words are usually a single token.
OpenAI’s own rule of thumb is that, in English, one token is roughly four characters or about three-quarters of a word, so 100 tokens is around 75 words. Other languages often need more tokens for the same meaning. Each token is then turned into a long list of numbers (an embedding) that captures something about its meaning and how it relates to other tokens.
Tokens matter to you for two practical reasons. First, every model has a limit on how many tokens it can consider at once. Second, paid AI services usually price usage in tokens, not words.
Step 2: the model predicts the next token
At its core, ChatGPT does one thing over and over: given all the text so far, it calculates which token is most likely to come next. It picks one, adds it to the text, and repeats, often dozens of times per second. Your answer is built piece by piece in this way, which is why it appears gradually on screen.
The calculation happens inside a transformer, a type of neural network introduced by Google researchers in the 2017 paper Attention Is All You Need. Its key trick, called attention, lets the model weigh which earlier words matter most for the next one. In “The cat sat on the mat because it was tired,” attention helps the model link “it” to “the cat” rather than “the mat”.
A worked example
Suppose you type: “Explain why the sky is blue in one sentence.” The model might rate possible first tokens like this: “The” is very likely, “Sunlight” fairly likely, “Because” less so. It chooses one, say “Sunlight”, then recalculates everything for the second token, and so on. Each choice is shaped by your instruction (“one sentence”), by everything it has already written, and by patterns it learned about how good explanations are usually phrased.
A setting often called temperature controls how adventurous these choices are. Low temperature means it almost always picks the most likely token, giving predictable answers; higher temperature allows less likely tokens, giving more varied, creative text. That small element of randomness is why asking the same question twice can give different wording.
Step 3: where the knowledge comes from
Before anyone chats with it, the model goes through pre-training: it reads an enormous amount of text and repeatedly tries to predict the next piece. Each wrong guess slightly adjusts billions of internal numbers called parameters. Over time, those numbers come to encode grammar, facts, writing styles and patterns of reasoning. Our guide to large language models explains this stage in more detail.
A model trained only this way is good at continuing text but not at following instructions. So developers add fine-tuning: they show it examples of good answers, and people rank its replies so it learns which responses are more helpful, honest and safe. OpenAI described this approach, known as reinforcement learning from human feedback (RLHF), in a 2022 research paper, and it was a key ingredient in making ChatGPT feel conversational.
Step 4: memory, context and reasoning
ChatGPT does not remember a conversation the way you do. Each time it replies, it re-reads the recent conversation, up to its context window: the maximum number of tokens it can take into account at once. Modern models can handle very long documents, but if a chat runs on long enough, the earliest parts can still fall out of view.
Some versions also offer a separate memory feature that saves facts you choose to share, such as your preferred writing style, and brings them into future chats. You can view and delete these in your settings.
Newer “reasoning” models add one more step: before writing the visible answer, they work through the problem internally, checking intermediate steps. This makes them noticeably better at maths, coding and multi-step questions, at the cost of being slower.
Why ChatGPT sometimes makes things up
Because the model generates the most plausible-sounding text, it can produce statements that read well but are false, an effect known as hallucination. It is especially likely with niche facts, exact numbers, quotes and citations.
- Its training data has a cut-off date, so it may not know recent events unless it is connected to web search.
- It has no built-in sense of whether a sentence is true, only whether it is likely.
- It can be over-confident, because confident writing is common in its training text.
- If your question contains a false assumption, it may go along with it rather than correct you.
Modern versions reduce this by searching the web, citing sources and reasoning step by step before answering, but checking important facts is still wise, especially for health, legal or financial decisions.
How to get better answers from ChatGPT
Knowing how it works makes it easier to use well. These habits make the biggest difference:
- Give context. Say who the answer is for and why: “Explain inflation to a 12-year-old” beats “Explain inflation”.
- Be specific about format. Ask for a table, three bullet points or a 100-word summary.
- Provide the material. Paste the email, data or document you want it to work on, rather than describing it.
- Ask for sources on factual questions, then open them to check they say what it claims.
- Iterate. Treat the first reply as a draft: ask it to shorten, simplify or fix a specific part.
- Keep private data out. Avoid pasting passwords, ID numbers or confidential work information.
What has changed in newer versions
OpenAI updates the models behind ChatGPT frequently. In 2026 it moved through the GPT-5 series and then the GPT-6 series; its model release notes list GPT-6.1 Terra, introduced in October 2026, as the latest model in that family. Newer models add longer context, better reasoning, the ability to see images and hear speech, and “agent” features that can use apps or a computer to complete tasks. Our guide to AI agents explains that last shift.
The core idea, though, has stayed the same since 2022: a transformer predicting the next token, shaped by training on text and by human feedback.
Key takeaways
- ChatGPT splits text into tokens (about ¾ of a word each) and predicts the next token, one at a time.
- A transformer network with an “attention” mechanism decides which earlier words matter.
- It learns from huge amounts of text, then is fine-tuned with human feedback (RLHF).
- It re-reads the conversation each turn, within a limited context window.
- It can hallucinate, so check important facts, numbers and sources.
- Clear context, a requested format and follow-up questions give much better answers.
Frequently asked questions
Does ChatGPT search the internet?
Only when a search or browsing feature is used. Otherwise it answers from patterns learned during training, which can be out of date.
Does ChatGPT understand what it says?
It has no human-style understanding or experiences. It is very good at modelling language, which can look like understanding, but it does not know whether its statements are true.
Is ChatGPT the same as GPT?
No. GPT is the family of language models; ChatGPT is the chat app built on top of them.
Why do I get different answers to the same question?
The model picks from several likely next words with a little randomness, so replies vary from one attempt to the next.
Does ChatGPT learn from my chats?
Depending on your settings, conversations may be used to improve future models. Check the data controls in your account if this matters to you.
What is a context window?
It is the maximum amount of text, measured in tokens, that the model can consider at once, including your messages and its own replies.
Is ChatGPT the same as Google search?
No. Search finds and ranks existing web pages; ChatGPT generates new text. Some versions can also search the web and summarise what they find.


