Quick answer: How does ChatGPT work?
- Tokens — text is split into tokens, small chunks that are often parts of words; in English one token is roughly three-quarters of a word.
- Prediction — for each step, the model assigns a probability to every possible next token and one is chosen.
- Transformer — the network architecture, introduced in 2017, uses 'attention' to weigh how each word relates to every other.
- Training — first on huge amounts of text to predict the next token, then with human feedback to follow instructions.
- Limits — it can state false things confidently ('hallucinate'), because it generates plausible text rather than looking up facts.
Key takeaways
- ChatGPT does not search a database of answers; it generates text one token at a time from learned patterns.
- GPT stands for generative pre-trained transformer, which describes exactly how it works.
- Attention is the key innovation: it lets the model connect a word to the words that give it meaning, however far apart.
- Human feedback training is what turned a raw text predictor into a helpful assistant.
- Hallucinations are partly a training incentive problem: models are rewarded for confident guesses over saying 'I don't know'.
Ask ChatGPT "What is the capital of India?" and it answers "New Delhi" in a blink. It feels like it looked the answer up. It didn't. It wrote the answer one small piece at a time, each piece chosen because it was the most likely thing to come next given everything before it. That single idea, repeated with a very large neural network trained on a very large amount of text, explains almost everything ChatGPT does well, and most of the things it gets wrong. This guide walks through it visually, with the research papers it comes from.

How ChatGPT works in one diagram
ChatGPT is a large language model: a neural network that, given some text, predicts what text comes next. It does this in small units called tokens.

- Split the text into tokens — your message becomes a sequence of tokens: words, parts of words and punctuation.
- Turn tokens into numbers — each token becomes a long list of numbers (an embedding) that captures something of its meaning.
- Run the transformer — layers of the network let every token "attend" to every other, building up a representation of what the text means.
- Score every possible next token — the output is a probability for each token in the vocabulary.
- Pick one and repeat — a token is sampled, added to the text, and the whole process runs again until the reply ends.
- The transformer architecture is published
- 2017
- ChatGPT launches
- 30 Nov 2022
- Average English token
- ~¾ word
- Weekly ChatGPT users OpenAI reported in October 2025
- 800 million
What is a token?
A token is the unit of text the model reads and writes. Common words are often a single token; longer or rarer words are split into pieces. OpenAI's guidance is that one token is roughly four characters of English text, or about three-quarters of a word, so 100 tokens is about 75 words5. Text in Hindi, Tamil or other Indian languages usually needs more tokens per word, because tokenisers were built mostly from English-heavy data.
Thinking in tokens explains small oddities, such as why models used to struggle to count the letters in a word: they never saw the letters, only the tokens.
What is a transformer, and what is attention?
The transformer is the neural network design behind ChatGPT. It was introduced in 2017 by researchers at Google in a paper titled "Attention Is All You Need"1. Its key mechanism, attention, lets the model, for each word, look at every other word in the text and decide how much each matters.
Earlier language models read text step by step and tended to forget the start of long sentences. Attention lets the connection between "it" and "metro" be made directly, however many words apart they are, and it can be computed for all words at once, which made it practical to train much bigger models on much more text. GPT stands for Generative Pre-trained Transformer: a model that generates text, is pre-trained on a large body of text, and uses this architecture.
How is ChatGPT trained?
ChatGPT is trained in two broad stages.
Pre-training. The model is shown enormous amounts of text and trained to predict the next token, over and over, adjusting billions of internal numbers (parameters) each time it is wrong. OpenAI's 2020 GPT-3 paper showed that a model trained this way at large scale, 175 billion parameters, could perform many tasks just from instructions and examples in the prompt2. Pre-training gives a model broad knowledge of language and facts, but it produces a text predictor, not an assistant: ask it a question and it might continue with more questions.
Fine-tuning with human feedback. To turn the predictor into an assistant, OpenAI fine-tuned it on example conversations written by people and then used reinforcement learning from human feedback (RLHF): people ranked several model answers, a separate "reward model" learned their preferences, and the language model was trained to produce answers that score well3. In OpenAI's 2022 InstructGPT study, people preferred answers from a 1.3 billion parameter model trained this way over the 175 billion parameter GPT-33. ChatGPT, launched on 30 November 2022, applied the same approach to dialogue4.

Pre-training
Learns language by predicting the next token across a huge body of text. Produces broad knowledge, no manners.
Supervised fine-tuning
Learns from example conversations showing what a good answer looks like.
Reinforcement learning from feedback
Learns from human (and later AI-assisted) rankings of answers which responses are more helpful and safe.
Tools and reasoning
Newer versions can search the web, run code and spend extra steps reasoning before answering.
Why does ChatGPT sometimes make things up?
ChatGPT sometimes states false things fluently because it generates plausible text, not checked facts. When the right answer is rare or absent in its training, the most plausible continuation can be wrong but confident: a fake citation, a non-existent law, a wrong date. These errors are called hallucinations.
In a 2025 paper, researchers at OpenAI argued that hallucinations persist partly because of how models are graded: most training and evaluation reward a correct answer and give nothing for "I don't know", so guessing scores better than admitting uncertainty, like a student guessing on a multiple-choice test6. Their proposed fix is to change evaluations to penalise confident errors more than abstentions. OpenAI said in 2026 that newer default models produce markedly fewer hallucinated claims on high-stakes prompts, but the problem has not disappeared8.
How ChatGPT is different from Google Search
ChatGPT and Google Search answer questions in different ways. Search retrieves and ranks existing pages from an index; a language model generates new text from what it learned in training. The two are converging: Google adds AI-generated overviews to results, and ChatGPT can run web searches and cite what it finds. Our guide to how Google Search works covers the retrieval side.
| Google Search | ChatGPT (without search) | |
|---|---|---|
| How it answers | Retrieves and ranks existing pages | Generates new text token by token |
| Knowledge | Live web index | Training data up to a cut-off |
| Sources | Links to pages | None, unless it uses a search tool |
| Typical error | Irrelevant or low-quality pages | Fluent but false statements |
Table: How a search engine and a language model answer differently
What this means for people building products with AI

- Design for being wrong — show sources, let people check, and make corrections easy.
- Ground answers in your own data — retrieval from your documents reduces invention on product-specific questions.
- Tell users what it can't do — clear limits build more trust than confident failures.
- Watch the tokens — long prompts and Indian-language text cost more tokens, which affects speed and price.
- Test with real users — people's trust in AI answers rises and falls quickly; measure it.
We cover the practical side in our guides to adding AI to an app and comparing ChatGPT, Claude and Gemini.
Key terms, defined
Large language model (LLM) — a neural network trained on large amounts of text to predict the next token.
Token — a chunk of text, often part of a word, that the model processes.
Transformer — the neural network architecture that uses attention to relate all parts of a text to each other.
Parameters — the internal numbers adjusted during training; large models have billions.
RLHF — reinforcement learning from human feedback: training a model on human preferences between answers.
Hallucination — a fluent, confident statement that is false.
How we researched this
The explanation follows the primary research papers: the transformer (Vaswani et al., 2017), GPT-3 (Brown et al., 2020), InstructGPT and RLHF (Ouyang et al., 2022) and OpenAI's 2025 analysis of hallucinations, plus OpenAI's own documentation on tokens and ChatGPT's launch. Usage figures are OpenAI's as reported by TechCrunch. The diagrams are our own simplified illustrations; probabilities and attention weights in them are illustrative. Last reviewed October 2026.
Frequently asked questions
What does GPT stand for?
GPT stands for Generative Pre-trained Transformer. Generative because it produces new text; pre-trained because it first learns from a large body of text before being specialised; and Transformer because that is the type of neural network architecture it uses, introduced by Google researchers in 2017.
Does ChatGPT search the internet?
The core model generates answers from patterns learned in training rather than by looking things up. ChatGPT can also use a search tool to retrieve current web pages and cite them, which it does for some questions or when asked. Without search, its knowledge stops at its training cut-off date.
What is a token in ChatGPT?
A token is a chunk of text the model reads and writes: often a word, part of a word or a punctuation mark. In English, one token is on average about four characters, or roughly three-quarters of a word. Indian-language text often uses more tokens per word, which affects speed and cost.
Why does ChatGPT make things up?
Because it generates the most plausible continuation of text, not verified facts, it can produce fluent but false statements, called hallucinations. OpenAI researchers argued in 2025 that training and evaluation reward confident guessing over admitting uncertainty, much like a multiple-choice test that gives no credit for leaving a blank.
How is ChatGPT trained?
In two broad stages. Pre-training teaches a transformer to predict the next token across enormous amounts of text, which gives it broad knowledge of language. Then fine-tuning, including reinforcement learning from human feedback (RLHF), trains it on demonstrations and human rankings of answers so it follows instructions and responds helpfully and safely.
How many people use ChatGPT?
OpenAI said in October 2025 that ChatGPT had 800 million weekly users, up from 100 million weekly users in November 2023. Reports in 2026 put the figure higher, but OpenAI's own confirmed numbers are the safest reference.
Sources
- Vaswani et al. — Attention is all you need (2017), arXiv
- Brown et al. — Language models are few-shot learners (GPT-3, 2020), arXiv
- Ouyang et al. — Training language models to follow instructions with human feedback (2022), arXiv
- OpenAI — Introducing ChatGPT (30 November 2022)
- OpenAI Help Center — What are tokens and how to count them
- Kalai et al. — Why language models hallucinate (2025), arXiv
- TechCrunch — Sam Altman says ChatGPT has hit 800M weekly active users (October 2025)
- TechCrunch — OpenAI releases GPT-5.5 Instant, a new default model for ChatGPT (May 2026)
- Checked October 25, 2026. Figures that change — fees, salaries, prices — are reviewed every six months; if something is out of date, tell us.
Where to go from here
- How Google Search works — the other way people find answers
- ChatGPT vs Claude vs Gemini — which assistant to use for what
- Tech stackWhat is an API? A plain-English explanation with a restaurant analogy and real app examplesWhat is an API? A plain-English explanation using a restaurant analogy, with real examples from UPI, maps and login, plus REST, keys, webhooks and security.
- AI & vibe codingWhat is an AI agent? A plain-English explanation, with examples you already useWhat an AI agent is, how it differs from a chatbot and a workflow, the loop that powers it, everyday examples and the risks.
- Tech explainedHow does Google Search work? Crawling, indexing, ranking and AI Overviews, explained simplyHow Google Search works in three stages, crawling, indexing and serving, and how PageRank, BERT and AI Overviews fit in. With diagrams and Google's own docs.
- AI & vibe codingWhat is RAG? Retrieval-augmented generation explained simply — then properlyWhat RAG (retrieval-augmented generation) is, explained simply and then for builders: how retrieval works, embeddings, chunking, evaluation and when to use RAG.
- Career guidesGenerative AI skills employers want in 2027: tokens, context, grounding and the plain-language fundamentals every role now needsGenerative AI skills employers want in 2027: tokens, context windows, grounding, temperature and limits explained, with interview answers and a plan.
- How to make an appWhat is a PWA? Progressive web apps explained simplyA PWA is a website that installs and works like an app, offline and with push. How PWAs work, Indian success stories, iPhone limits and when to choose one.
Get the ideas, not the noise.
Sign up with Google and we’ll send you short UX psychology tips by email — why people tap, stall and leave, and what to do about it. Unsubscribe anytime. Prefer something to keep? Get the free Laws of UX guide as a PDF.
Adoption is where products win or fail.
A behavioral UX audit of your app or SaaS product: why users hesitate, stall and leave, and a prioritized fix list. Fixed price, 2–4 weeks.





