How AI works: tokens, prompts, agents and more, explained by doing
AI chat tools write by predicting text one small piece at a time, using patterns learned from huge amounts of writing. That explains both why they're so useful and why they sometimes make things up. Below, split a sentence into the pieces an AI reads, catch an AI getting facts wrong, and watch a chat reply next to an agent that actually does the job.
See how an AI reads your words
What the AI reads
- The
- cat
- sat
- on
- the
- mat
- .
- Words
- 6
- Tokens
- 7
- Characters
- 23
Short, common words are usually one token. Long or unusual words, numbers and punctuation split into more pieces. A dot (·) shows a token that starts with a space. This is a simplified version for learning: real AI tools split text slightly differently, but limits and prices are counted the same way, in tokens.
Catch the AI's mistakes
Tell me some facts about the Eiffel Tower.
AI reply
This reply has 3 mistakes. Tap each sentence you think is wrong.
Every sentence sounds equally sure of itself. That's what makes AI mistakes easy to miss.
Chat or agent: which one gets it done?
Book a table for 2 at an Italian place near me on Friday at 7pm.
What the agent can use
Chat AI: replies with text
Press send to see its reply.
Agent: takes actions
Press send to watch it work.
Same request, two very different results. The chat AI explains how; the agent plans steps and uses tools to do it.
The 14 words in this module
Each one has its own page with a demo and three quick questions. Work through them in order.
What is AI (artificial intelligence)?
AI is software that learns patterns from lots of examples, so it can do tasks that used to need a person, like writing, recognising photos or answering questions.
What is an LLM (large language model)?
An LLM is a kind of AI trained on huge amounts of text. It writes by predicting the next word, again and again.
What is an AI model?
A model is the trained system an AI tool runs on. Different models can be faster, cheaper or better at certain jobs.
What is a prompt?
A prompt is what you type to an AI: your question or instructions. Clearer prompts get better answers.
What is a system prompt?
A system prompt is a hidden set of instructions the app gives the AI before you type anything. It sets the AI's role, tone and rules.
What is a context window in AI?
The context window is how much text an AI can keep in mind at once: your messages, its replies and any files. Anything that doesn't fit is forgotten.
What is a token in AI?
A token is a small chunk of text, often a short word or part of a word, that an AI reads and writes. AI limits and prices are counted in tokens.
What is an AI hallucination?
A hallucination is when an AI states something false as if it were true, such as a made-up fact, quote or source.
What is an AI agent?
An AI agent is an AI that takes actions to reach a goal: it decides its own steps and uses tools, rather than only replying with text.
What is tool use in AI?
Tool use is when an AI calls another program to get something done, such as searching the web, checking a calendar or running a calculation.
What is MCP (Model Context Protocol)?
MCP is a shared standard that lets AI apps plug into other tools and data, like your calendar or files, in the same way every time.
What is a skill in AI tools?
A skill is a packaged set of instructions, sometimes with files, that an AI loads when a task needs it, so it does that job the same careful way every time.
What is RAG (retrieval-augmented generation)?
RAG means the AI first looks up relevant information, for example in your documents, and then writes its answer using what it found.
What is an API key?
An API key is a secret code that lets a program use an online service, such as an AI model, and tells the service whose account to charge.
Read 8 everyday situations and choose the idea behind each one. Points count toward your score and today's streak.
Module check: which idea is this?
Question 1 of 8