Scan the QR, or copy the link, or save the QR as an image.
https://ai-literacy-lab.uk/badges/non-determinism-ks4-5/
Why AIs give a different reply each run, and when that matters
Open ChatGPT, Gemini or whichever class AI you have to hand in a second tab. Copy one of the prompts below, run it three times, and put all three answers on the board.
Some of these prompts will produce variety that's genuinely useful. Others will produce variety you should be worried about. The class's job is to work out which is which.
You ask ChatGPT to define photosynthesis for a Y12 revision card. You run the same prompt again for a friend and the sentence comes back worded slightly differently. A third run gives you a third version. All three are probably right, but none of them match, which is uncomfortable when you're building a revision resource that's meant to be identical for both of you.
That's non-determinism. Large language models don't recall answers from a database; they generate them one word at a time by picking from a probability distribution. That randomness is the whole point when you're brainstorming or drafting, but it's a genuine hazard when you need a single reliable answer. The same prompt, different answers, and no warning that it's happening.
Over the next forty minutes we'll take non-determinism apart, work out where it helps and where it hurts, and finish with the prompt habits that pin the AI down on the occasions when you really need it to stay still.
Write one opening sentence for a Y11 GCSE English essay on Macbeth's ambition. Just the sentence, no commentary.
Pick a random whole number between 1 and 100. Just the number, no explanation.
Explain photosynthesis in one clear sentence, suitable for a Y10 GCSE Biology revision card.
Look at the three runs of each prompt and ask the class:
Put three pupils on three devices and get them to run Prompt C simultaneously, all with the exact same wording. Compare the three answers on the board. Ask the class which one they'd actually use in a shared revision resource, and push them on how they decided. Point out that the moment you're choosing between AI outputs, you're doing the AI's job for it, and you can't do that job well unless you already know the topic.
A large language model doesn't retrieve a stored answer. It generates its response one token at a time, and at every token it works out a probability distribution over what the next word could plausibly be. Then it samples from that distribution. Most of the time the top choice wins, but the second or third choice can sneak in, and once one different word has been picked, the rest of the sentence unfolds from there.
That sampling is governed by a setting called temperature. High temperature means the AI takes more chances, so you get more variety and more surprise. Low temperature means the AI plays it safe, so you get less variety and a fairly predictable answer. Consumer chatbots run at a medium setting by default, which is exactly why you get similar-but-not-identical answers each run.
The upshot: sameness is the exception, not the rule. If you actually need it, you have to design your prompt around it.
Write the start of a sentence on the board: 'The best thing about school is...' Ask half the class to complete it in one word, silently. Now ask a few pupils what they wrote. You'll get 'friends', 'lunch', 'PE', 'nothing', 'chess club'. Point out that they all had roughly the same probability distribution over that next word, and each pupil sampled slightly differently. That is exactly what the AI is doing on every single word of its output.
You'll see this trick in more places than you might expect. Before you tap the cards below, have a guess: where in your everyday AI use might the same prompt be quietly producing different answers?
Tap each card to reveal.
The obvious one. Ask for a story, essay, summary or explanation twice and you'll get two different pieces of prose. The gist usually matches, but the wording, ordering and choice of examples don't.
Every image AI is non-deterministic by design. Same prompt, same settings, and you'll still get different pictures. That's why 'pick your favourite of these four' is the standard UI: it's cheaper to sample four times than to guarantee the perfect one.
Ask the AI to pick a random number, choose a name or roll a virtual die. The choices ARE different each run, but they aren't evenly distributed. Some numbers (42, 7, 73) show up far more than they should. Not random, just non-deterministic.
In all three, the same underlying mechanism is running: sample from a distribution, unfold from there. Understanding this changes what you can safely trust the AI for.
Give each pair one of these behaviours to categorise (text, image or 'random').
Good answers name the flavour. Excellent answers spot which of the three is the sneakiest, because it looks like randomness but isn't.
This is the question that actually matters in practice. Non-determinism isn't good or bad on its own; it's good for some tasks and bad for others, and the trick is knowing which one you're doing before you press return.
The rule of thumb: if the task has one correct answer, variability is a bug. If the task has many possible good answers, variability is a feature.
Ask the AI for maths, unit conversions, spelling, factual answers, code that has to compile, legal advice, medical dose calculations or exact quotations, and you want consistency. The same input should give you the same output every time, and if it doesn't then at least one of the two runs is wrong.
Ask the AI for a poem, a story opener, an essay plan, a revision analogy, a brainstorm, alternative ways to phrase a sentence or three ideas for a project, and variety is the whole reason you're using it. The point of asking is to get options you wouldn't have thought of on your own.
Draw two columns on the board: 'wants sameness' and 'wants variety'. Read out these ten prompts and get the class to vote which column each belongs in.
The interesting ones are numbers 5 and 8, where the class will disagree. Push them on why.
The dangerous cases are when a task looks creative but actually needs a single correct answer. Or when someone runs a prompt once, trusts the output, and never realises that a second run would have said something meaningfully different.
One well-known example: in 2023, a New York lawyer submitted a legal brief drafted by ChatGPT that cited entirely fictional court cases the AI had invented (a mixture of non-determinism and hallucination, and a career-ending mistake). It happens quietly in much smaller ways all the time. A revision app might tell one pupil that Henry VIII had six wives and another that he had five, because the AI's borderline sampling landed on a different token. A medical chatbot might give slightly different dosage suggestions to different users for the same query. A shop's price-lookup bot might quote £39.99 on Tuesday and £42.50 on Wednesday.
The pattern to watch for: any time an AI's answer will be trusted as authoritative, or copied straight into a document, or used to make a real decision, sameness matters, and you cannot assume you'll get it.
Give each pair one of these short case studies and ask them to name the non-determinism risk in plain English.
For each case, ask: what happens if the AI gives a slightly different answer next time? Which are dangerous, and which are genuinely fine?
You can't fully switch non-determinism off in a normal chatbot, because the temperature setting is baked in and you don't get to touch it. But you can push the AI hard towards consistency by writing prompts that leave it far less room to wander.
The trick is to pin down exactly what you want the answer to look like. Name the format. Name the length. Name the level. Name the content. Every constraint you add is one less place for the AI to roll different dice, and by the time you've named enough of them, the shape of the output stops varying even if the exact wording still drifts a little.
Tell me about photosynthesis for my GCSE Biology revision.
Wide open. Format, length, level of detail and choice of examples are all unspecified. On every run, the AI will pick differently on all of those, so two revision cards from the same prompt will look nothing alike, and the pupil has no way of knowing which one is closest to what the exam actually wants.
Write a GCSE Biology revision card on photosynthesis. Exactly 4 bullet points, one short sentence each, covering: (1) the word equation, (2) where in the cell it happens, (3) two factors that limit the rate, (4) one common misconception. No extra commentary.
Every choice is pinned down: format, count, content, order and tone. Runs of this prompt will still vary a little at the wording level, but the shape and the covered content will match, which makes the card reliable enough to actually paste into a revision folder.
In pairs, give pupils one of these wandering prompts and ask them to rewrite it so that three runs would come back nearly identical in shape. Test the winners in a real AI at the front and see how close the three runs actually get.
The best rewrites will name the format (bullet list, paragraph, cue card), the length, the level (which year group), and the exact content to cover. Point out that this is prompt engineering, which is currently one of the more employable skills in the room.
Time to put everything together. You're a Y12 revising for an A-level Business exam. You ask ChatGPT to explain the difference between a cash flow forecast and a profit and loss statement. Two hours later, working through a past paper, you ask again. You get a slightly different definition. Neither one is obviously wrong, but they don't match: one uses the phrase 'over a period' for cash flow, the other uses it for P&L.
You've got mocks in three weeks. You need to decide which of the two is right, and you need a workflow that stops this happening again in the run-up to the exam.
Read the four options below out loud. Hands up on which one the class would pick. Then ask three pupils to explain: one for the strongest option, one for a tempting-but-weak one, and one for whichever the class actually voted for. Push them to name which principle from today they're applying, whether that's the rule of thumb, the prompt-pinning trick, or the reliable-answer trap.
The class has covered everything they need. Ask each learner to scan the QR code on their phone or tablet — they will get the 12-question quiz, and if they pass they can print their own certificate.
Send this URL round if the QR isn't handy:
https://ai-literacy-lab.uk/badges/non-determinism-ks4-5/quiz/Badges live on each learner's device only. No accounts, no sign-in.