Switch course ▾
5.9.1 How Generative AI Works
Objective. Explain in plain terms how a generative AI tool produces text, and why the same prompt can give different answers.
When a colleague says 'the AI told me', it helps to know what actually happened inside the tool.
You need only a clear picture: the tool continues text in a likely way, using patterns from its training.
Knowing this helps you decide:
- when a draft is safe to use
- when to ask again
- when to put the tool away
This session gives you that picture and shows how small changes in your prompt change what you get back.
Key ideas
Prediction, not understanding
- Trained on writing. A text AI learns from a very large amount of text which words tend to follow which.
- One step at a time. Given a prompt, it predicts the most likely next piece of text, then the next.
- Fluent is not true. The tool is built to sound right, not to check what is right.
How a text AI produces an answer
Tokens and the context window
- Tokens. The tool reads text in small pieces called tokens: parts of words, not whole sentences.
- Limited view. It can only 'see' a limited amount of your conversation at once. In a long chat, early details can be lost.
- Your prompt shapes the output. Clear context in, better draft out.
Why answers vary
- Sampling. The tool does not always pick the single most likely word; it samples from likely options, so each run differs.
- Good and bad. Variety is useful for brainstorming and risky for facts: the same question can return a right and a wrong answer.
- One draft. Treat each output as one draft among many possible drafts, never as 'the' answer.
Where it fails: hallucination and bias
- Hallucination. A confident statement that is false: invented facts, sources, quotations or numbers.
- Bias. The tool reflects patterns in its training texts, so it can repeat stereotypes and is weaker on smaller languages and local contexts.
- Blind spots. It knows nothing about your students, your curriculum or today's news unless you tell it.
Where it fails
A confident statement that is false: invented facts, sources, quotations or numbers
It repeats patterns from its training texts, and is weaker on smaller languages and local contexts
It knows nothing about your students, your curriculum or today's news unless you tell it
How a text tool writes
Training and tuning: where the confidence comes from
Building a text AI usually has two stages.
Training
Learning patterns.
- What happens: the model learns from a huge collection of writing how language works and how topics are usually discussed.
- Result: it works from patterns up to a certain date, so recent events or this year's textbook changes may be missing. It is not a database: it generates text that resembles how facts are usually written.
Tuning
Learning to please.
- What happens: people rate answers and the model is adjusted to be helpful, polite and well organised.
- Result: it sounds calm and certain even when wrong. A confident tone was rewarded, but nobody can check every fact.
Remember: a confident tone says nothing about whether the answer is true.
Your prompt is the steering wheel
The more useful material you supply, the less the tool has to guess.
- Audience. Who it is for (Grade 6, Uzbek-medium).
- Task. What you want done.
- Format. For example five questions, or a table.
- Source. Paste a textbook paragraph and write 'use only this text': the tool works from the paragraph, not from memory, and checking gets much easier.
- Show its work. Ask it to show its steps or say what it is unsure about. This does not make it truthful, but gives you something to inspect.
- Weak answer? Change the prompt and run it again.
Examples from the classroom
Three answers about photosynthesis
Scene. Dilnoza teaches Grade 5 in Samarkand. She asks an AI tool three times for a four-sentence explanation of photosynthesis. All three answers read smoothly. Two say that plants take in carbon dioxide and release oxygen; the third says plants 'breathe in oxygen to make food'. The third sounds just as confident as the others. Dilnoza compares all three with the textbook page before choosing one for her class.
Insight. Each run is one sample, and a fluent sentence can still be false. Where runs disagree, that is the place to check.
A source that does not exist
Scene. Aziz teaches Grade 9 history in a Bukhara school. He asks the tool for a quotation from a historical figure, with the book title and page number. The answer arrives with an author, a title and a page, all neatly formatted. Aziz searches the school library catalogue and the internet and finds no such book. He decides to use only quotations he has seen in a real book, and tells his students why.
Insight. A hallucination often looks like a real reference. Ask for sources only so you can open them, never to trust them.
The forgotten instruction
Scene. Malika teaches Grade 7 geography in a Russian-medium school in Nukus. At the start of a long chat she asked for short sentences and simple words for a lesson on the Aral Sea. After many exchanges, the answers become long and full of difficult terms. She starts a new chat, pastes the textbook paragraph, repeats her instruction in one line, and the level is right again.
Insight. The tool sees only a limited window of the conversation. Restate key instructions, and start fresh for a new task.
Common pitfalls
- Believing that a calm, confident tone means the answer is correct.
- Using one run as proof; if two runs disagree, that is a signal to check, not to pick the nicer one.
- Asking for sources and trusting them without opening them.
- Assuming the tool knows your curriculum, your students or recent changes.
Same Prompt, Three Answers
- Read the prompt: 'Explain photosynthesis to a Grade 5 class in four sentences.' Three different AI answers (A, B, C) are in your Activity Kit.
- Alone (5 min): list what is the same in all three and what differs — length, tone, examples, accuracy.
- In pairs (10 min): find any statement you would not give to a class without checking. Mark it.
- As a group (10 min): explain in your own words why one prompt produced three answers. Use the words 'predict' and 'sample'.
Your facilitator will guide you through this activity in the session.
Questions to discuss
- Which of the three answers would you trust most, and what would you still check before using it?
- What does variability change about how you should use these tools for facts versus for ideas?
- How would you explain 'it predicts text' to a colleague in one sentence?
Reflect
- Where have you already met AI-written text without noticing?
- What is one thing you assumed AI 'knows' that you now see it only predicts?
- Which of your tasks needs one reliable answer, and which benefits from many options?
Try it tomorrow
- Run the same prompt twice before a lesson and underline every place where the two answers disagree; check those first.
- Paste one textbook paragraph with 'use only this text' and compare the result with an answer to the same question without it.
- Tell students in one sentence, 'The tool predicts likely words; I check the facts', and ask each to verify one claim.
Further reading and links
An AI tool predicts likely text. It does not know, check, or understand — so the checking is your job.