On this page
AI, machine learning and deep learning
These three words get used as if they were the same. They're nested, like dolls.
- Artificial intelligence is the goal: machines doing things that seem to need intelligence, such as understanding language, recognizing faces or planning.
- Machine learning is the main way we reach that goal today: instead of writing rules, we show a program examples and let it work out the rules itself.
- Deep learning is machine learning with large neural networks, many layers deep. It powers almost every AI you use.
- Large language models (LLMs) are deep learning models trained on text. They're the engines inside chat assistants like ChatGPT, Claude and Gemini.
Learning from examples, not rules
Imagine writing a program to spot spam email. You could write rules: "if it says free money, it's spam." Spammers would change one word and beat you.
Machine learning flips this around. You give the program thousands of emails already labelled spam or not spam. It adjusts itself, little by little, until it gets the labels right, finding thousands of subtle patterns no person would think to write down. That adjusting is called training. Using the finished model on new emails is called inference.
TRY IT · TENSORFLOW PLAYGROUNDTrain a tiny neural network in your browser(opens in a new tab) TRY IT · GOOGLE TEACHABLE MACHINETeach your webcam to recognize objects, no code(opens in a new tab)Neural networks in one picture
A neural network is a long chain of simple math steps. Each step takes in numbers, multiplies them by its own adjustable numbers, adds them up, and passes the result on. The adjustable numbers are called parameters or weights. Large models have billions of them.
Training nudges every parameter, a tiny bit at a time, in whatever direction makes the network's answers less wrong. Repeat that billions of times and the network gets very good at its task. Nobody sets the numbers by hand, which is why even the builders can't fully explain what each one does.
How a chatbot writes: one token at a time
Here is the single most useful idea for understanding AI chat assistants.
A language model does one thing: given some text, it predicts what comes next. Not a whole answer at once: just the next small chunk, called a token. A token is often a word, sometimes part of a word or a punctuation mark.
To write a reply, the model:
- reads everything so far: your question, plus any instructions and earlier messages;
- scores every possible next token by how likely it is;
- picks one (usually a likely one, with a little randomness so it doesn't sound robotic);
- adds it to the text, and goes back to step 1.
Try it: build a sentence one token at a time
Illustrative numbers, not a real model- ␣Paris (picked)91%
- ␣a3%
- ␣the2%
- ␣located1%
- ␣known1%
That's it. Everything impressive a chatbot does, from writing code to explaining a poem, comes from getting extremely good at this one prediction. To predict the next word of a physics explanation well, you have to have picked up a lot about physics.
TRY IT · OPENAI TOKENIZERSee how text splits into tokens(opens in a new tab)How a chatbot is made: three stages of training
- Pretraining. The model reads a vast amount of text (books, websites, code, articles) and learns to predict the next token. This is the expensive part, using thousands of specialized chips for weeks or months. The result is a base model: it knows a great deal but just continues text; it isn't yet a helpful assistant.
- Fine-tuning. It then studies many examples of good conversations: a question, a helpful answer. Now it behaves like an assistant.
- Learning from feedback. People, and increasingly automated checks, compare the model's answers and say which is better. The model is trained to produce more of the good kind. One well-known method is RLHF, reinforcement learning from human feedback. This stage shapes its manners, safety and style.
Because each company makes different choices at every stage, from what data to use to what "a good answer" means, their assistants end up with different strengths and personalities.
The trick that made it work: attention
For decades, language AI struggled to keep track of what referred to what across a long sentence. In 2017, Google researchers published a design called the transformer, built around a mechanism called attention.
Attention lets every word look at every other word and decide which ones matter for its meaning. In "The trophy didn't fit in the suitcase because it was too big", attention helps the model link it to the trophy. Transformers also train efficiently on many chips at once, which made it possible to scale them up enormously. Nearly every modern language model is a transformer.
TRY IT · TRANSFORMER EXPLAINER, GEORGIA TECHWatch a real transformer predict text, step by step(opens in a new tab)Thinking before answering: reasoning models
A standard model starts answering immediately. Reasoning models are trained to work through a problem first: they write out intermediate steps, check them and try other approaches, then give a final answer. This uses more computing time per question but makes them much better at math, coding, logic and planning.
Many assistants decide on their own how long to think, or let you choose a deeper mode for hard questions.
How AI knows about today: tools, search and agents
A model's built-in knowledge stops at its knowledge cutoff, when its training data was collected. On its own it doesn't know yesterday's news.
So assistants are given tools. A model can decide to run a web search, read the results and then answer, often with links. It can read a file you upload, run code to do exact math, or look things up in a company's documents (called RAG, retrieval-augmented generation). Giving a model the actual source text to work from is called grounding, and it makes answers far more reliable.
When a model chains many tool uses together to finish a task, such as researching, booking, writing and checking its work, it's called an agent.
Why AI makes things up
A language model produces what is likely, not what is checked. Usually the likely answer is also the true one. But when the model has little to go on (an obscure fact, a fake book title, a detail it never saw) the most likely-sounding answer can be confidently wrong. This is called hallucination.
Protect yourself: for anything that matters (health, money, law, citations, quotes) ask for sources and open them, give the AI the documents yourself instead of relying on its memory, tell it that "I don't know" is an acceptable answer, and verify before you use it.
Real failures, from fake legal citations to wrong medical claims, are collected in the AI Incident Database.
How image and video generators work
Most image generators use diffusion. During training, the model sees millions of pictures with captions. Noise is added to each picture step by step until it's pure static, and the model learns to reverse each step: to remove a little noise and recover the picture.
To make a new image, it starts from random static and removes noise step by step, steered at every step by your description, until a picture emerges that fits the words. Video generators extend the same idea through time, keeping each frame consistent with the next.

Why different AIs are good at different things
If they all predict tokens, why does one AI write better and another code better? Four reasons:
- Training data: what each model read, and how much of it was code, math, fiction or other languages.
- Training choices: what examples and feedback each company used to define a good answer.
- Size and thinking time: bigger models and reasoning modes handle harder problems but are slower and cost more.
- Tools and product design: search, file reading, code running, memory and the app around the model matter as much as the model.
That's why "which AI is best?" depends on what you're doing. Here is what people choose for each job, from this week's votes:
This week's top pick, by job
From real votes · updates every few minutes- CODINGClaude Opus 5.5Anthropic · 3 of 4 votes
- WRITINGGPT-6.1 SolOpenAI · 2 of 4 votes
- RESEARCHClaude Opus 5.5Anthropic · 2 of 3 votes
- VIDEOFLUX 3 VideoBlack Forest Labs · 1 of 1 votes
- EVERYDAY CHATClaude Sonnet 5.5Anthropic · 1 of 2 votes
- MARKETINGClaude Fable 5.1Anthropic · 1 of 2 votes
Does AI understand what it says?
Honest answer: experts disagree. Language models build detailed internal maps of concepts and can solve problems they've never seen, which looks like understanding. They also make mistakes no person would, have no body or lived experience, and don't learn from your conversation once training is done. Many researchers say they understand some things in some ways, and that the question needs better words than a yes or no.
What's clear is the practical rule: treat AI like a brilliant, fast, well-read assistant who sometimes bluffs.
Go deeper
One of the founding members of OpenAI explains how LLMs are built and where they're heading, for a general audience.
TRY IT · BRENDAN BYCROFTFly through a language model in 3D(opens in a new tab) TRY IT · QUICK, DRAW! BY GOOGLEDoodle and watch a neural network guess(opens in a new tab) TRY IT · ELEMENTS OF AI, UNIVERSITY OF HELSINKIA free course on how AI works, no coding(opens in a new tab) TRY IT · JAY ALAMMARThe Illustrated Transformer (more technical)(opens in a new tab)Questions people ask
How does AI work in simple terms?
AI learns patterns from examples instead of following hand-written rules. A chatbot such as ChatGPT has studied enormous amounts of text and learned which words tend to follow which. When you ask it something, it writes a reply one small piece at a time, each time picking a likely next piece given everything so far.
How does ChatGPT actually work?
It is a large language model: a neural network with billions of adjustable numbers, trained first to predict the next token in huge amounts of text, then trained further on example conversations and human feedback to be a helpful assistant. When you type, it predicts its reply one token at a time. It can also be connected to tools such as web search.
Does AI think or understand?
It's genuinely debated. AI models build rich internal representations and can solve new problems, which looks like understanding. But they work very differently from human minds, have no lived experience, and can fail in ways a person wouldn't. Most researchers avoid a simple yes or no.
Where does AI get its information?
From its training data, a large snapshot of text, code and images collected up to a cut-off date, plus anything you give it in the conversation. Many assistants can also search the web or read files, which lets them answer about things after their cut-off.
Why does AI make things up?
Because it generates text that is likely, not text that is checked. When it doesn't know something, the most likely-sounding answer can be wrong but confident. This is called hallucination. Asking for sources, giving it the material yourself, and checking important facts all help.
What is the difference between AI and machine learning?
AI is the broad goal of making machines do things that need intelligence. Machine learning is the main way we get there today: letting a program learn from data instead of writing every rule. Deep learning is a kind of machine learning that uses large neural networks.
How do AI image generators work?
Most use diffusion. They learn to remove noise from images, step by step. To make a new picture, they start from pure random noise and remove it bit by bit, steered by your text description, until an image appears.
How we made this
Parth Amin runs thisorthis.ai and has spent over a decade building software products, most recently enterprise generative-AI systems. @_aminparth on XHow we made this: drafted with AI assistance, then fact-checked against the linked sources and edited by hand. Reviewed . Spotted a mistake? Tell us.

AI glossary
How to write prompts
History of AI