Understanding AI
What is a large language model? A simple explanation
Large language models power AI chatbots and coding tools. A simple explanation of tokens, training and prediction — and why they're useful but not always right.
By the GenKid team · · Updated · Facts checked · 5 min read
Key takeaways
- A large language model (LLM) is an AI system trained on huge amounts of text to predict what comes next, which it uses to write answers, summaries, stories and code.
- It reads and writes text in small chunks called tokens, generating answers one token at a time.
- "Large" refers to both the amount of training text and the number of internal settings the model learns.
- LLMs are very good at producing fluent, useful text and code — and can also produce confident mistakes.
- They don't look things up by default; unless connected to search or documents, they generate from patterns.
The one-sentence version
A large language model is an AI system that has learned, from enormous amounts of text, to predict which words are likely to come next — and uses that to write answers, summaries, stories and code.
When you use an AI chatbot or an AI coding tool, there's almost always an LLM underneath.
Tokens: the building blocks
LLMs don't read whole words the way we do. They split text into tokens, which are often whole words, parts of words or punctuation. "Unbelievable!" might be split into tokens like "un", "believ", "able" and "!".
When an LLM writes an answer, it predicts the next token, adds it, then predicts the next one, and so on — thousands of tiny predictions in a row. It's like a very, very advanced version of the predictive text on a phone keyboard.
Try it yourself: be the language model
You can feel how next-token prediction works with a pencil and paper, no computer needed.
- Read this unfinished sentence: "After school, I took my dog for a…"
- Write down the word you think comes next, and two other possible words.
- Give each word a rough chance out of 100. Most people put "walk" high, maybe 80, with "run" or "swim" much lower.
That's what an LLM does at every step: it works out how likely each possible next token is, picks one (usually a likely one, sometimes a less likely one, which is why answers vary), adds it to the text, and repeats.
Now try: "The capital of the planet Zorbon is…" There is no right answer, because Zorbon is made up. But you could still write a confident-sounding city name. An LLM can do the same: it will continue the pattern of "the capital of X is Y" even when no true answer exists. That's the root of many AI hallucinations.
Training: learning patterns from text
Before it can do anything useful, an LLM is trained. During training, it's shown vast amounts of text and repeatedly asked to predict missing or next tokens. Each time it's wrong, its internal settings are nudged slightly to do better. After an enormous number of these nudges, it becomes very good at continuing text in a plausible way.
"Large" describes two things: the amount of text used in training, and the number of internal settings (called parameters) the model adjusts, which runs into a very large number.
Most chatbots then go through extra training, including feedback from people, so they follow instructions, answer helpfully and refuse some harmful requests.
Why LLMs seem so clever
Because they've learned patterns from so much writing, LLMs can:
- explain topics in different styles and levels,
- summarise and translate,
- write and fix code,
- answer follow-up questions in context.
That's genuinely useful. In software, for example, LLMs sit underneath AI coding agents, which can read a project, plan changes and edit files.
Why LLMs get things wrong
The same thing that makes LLMs fluent also makes them unreliable. They're trained to produce likely-sounding text, not to check facts. So they can:
- invent facts, quotes or sources that sound real (often called hallucinations),
- be out of date, because their training data stops at some point,
- reflect biases in the text they learned from,
- sound equally confident whether they're right or wrong.
Some AI tools reduce these problems by connecting the model to search engines or documents, so it can quote real sources. But the model can still misread or misquote them. See why AI makes things up and AI bias explained.
Do LLMs understand what they're saying?
Not in the way people do. They model patterns in language extremely well, which can look like understanding, but they don't have experiences, intentions or a reliable way to know whether they're right. That's also why an LLM doesn't know you, even when its replies sound warm; we explain why that matters in why AI is not your friend.
LLMs vs search engines
| Search engine | LLM chatbot | |
|---|---|---|
| What it gives you | Links to existing pages | Newly generated text |
| Where answers come from | Pages it has indexed | Patterns learned in training (plus any sources it's given) |
| Easy to check | Yes — you can see the source | Not always — sources may be missing or invented |
| Best for | Finding original, up-to-date information | Explaining, drafting, brainstorming, coding help |
A good habit: use LLMs to understand and draft, and use reliable sources to check.
What this means for young people
Understanding how LLMs work helps children use them sensibly. If you know the model is predicting likely text, it's obvious why you should check important answers, why it might agree with a wrong idea, and why asking it for hints teaches you more than asking it for answers (see hints, not answers). Educational resources like the Raspberry Pi Foundation's Experience AI lessons teach exactly this to 11–14-year-olds: what LLMs are for, and why their output isn't always trustworthy.
GenKid teaches these ideas in its AI Foundations courses, then puts them into practice: learners use an AI coding agent and check everything it produces. See how does AI work? for a gentler introduction, or explore the pathway.
Frequently asked questions
Is an LLM the same thing as AI?
No. An LLM is one kind of AI. AI also includes systems that recognise images, recommend videos or play games, many of which aren't language models at all. LLMs are the kind behind most AI chatbots and AI coding tools.
What happens to what I type into an LLM chatbot?
It's sent to the company running the service, and depending on the service it may be stored and, in some cases, used to improve its models. Check the privacy settings and terms, and never type personal details such as your name, school or address. See [what not to tell an AI](/blog/ai-privacy-for-kids).
Do LLMs search the internet?
Not by default. Some AI tools connect a model to web search or documents, but the core model generates answers from patterns learned during training.
Why do LLMs give different answers to the same question?
Most chatbots add some randomness when choosing the next token, so answers vary. Small changes in how you ask can also change the answer.
Sources
- Large language models (LLMs) (11–14) (opens in a new tab) — Experience AI, Raspberry Pi Foundation
- Machine Learning Crash Course: Introduction to large language models (opens in a new tab) — Google for Developers
- Artificial Intelligence Risk Management Framework: Generative Artificial Intelligence Profile (NIST AI 600-1) (opens in a new tab) — National Institute of Standards and Technology, 2024
How we write: GenKid articles are researched and drafted with the help of AI tools, then checked in a separate review step against the sources listed above before they are published, and re-checked when they are updated. Rules and products change, so check official pages for your country before acting on anything here. This article is general information, not legal advice. Spotted a mistake? Email hello@genkid.app.