Part 2 · How AI Actually Works
Generative AI: How It Actually Works
You type the same question into a chatbot twice, word for word, and get two different answers. You changed nothing between them, and the machine cannot tell you which answer is correct. It is not even trying to.
Why This Matters
Generative AI predicts its answers; nothing is fetched from a database. That distinction changes how you should read its output: read it as a draft to check. It is the habit that separates people who use AI well from the ones it quietly misleads.
By the end of this lesson you will be able to:
- Describe how a large language model generates text, one word at a time.
- Explain why the same prompt can produce different answers.
- Describe how AI turns a short description into an image.
How Generative AI Actually Works
A vision model recognises what is in a picture by spotting patterns it picked up from thousands of labelled examples. Generative AI runs the same move forward: instead of reading patterns, it produces them.
A large language model (LLM) is trained on vast amounts of text until it learns which words tend to follow which. To reply, it predicts the next word, adds it, then predicts the one after that, one at a time, each choice shaped by everything before it. There is no lookup and no stored answer; only a running prediction of what plausibly comes next.
That is also why answers vary. The model does not always take the single most likely word; it samples from the top few, with a little deliberate randomness. The same prompt takes a different path and lands on different wording. The variation is designed in; it is what keeps the writing from sounding mechanical.
Images use the same move in another medium. The model starts from a field of random noise and removes it step by step, steered by your words, until a picture forms. It learned that process by watching millions of images dissolve into noise, then teaching itself to run the process backwards.
- Text: predicts the next word, one at a time.
- Variation: samples with slight randomness, so answers differ.
- Images: removes random noise step by step until a picture forms.
Text, variation, image. Underneath all three sits one move: prediction. The machine cannot tell whether what it predicts is true. That judgement is yours.
Key Takeaway
Fluency shows a model is predicting well, not that it is right. From your next prompt on, treat a confident-sounding answer as a cue to check, never a reason to trust.
Check your understanding
Self-check only. Nothing is scored and nothing is recorded; open an answer to compare it with your own.
You ask an AI assistant to write a summary of a quarterly report. The first version is decent but uses American spellings and an overly formal tone. You re-run the same prompt and get a slightly different version, this time with British spellings but still too formal. Based on how LLMs work, what is the most effective next step?
- Try a different AI tool, this one clearly cannot handle the task.
- Run the same prompt ten more times and pick the best version.
- Revise the prompt to be more specific (add constraints like 'use British spellings' and 'write in a conversational, approachable tone') to narrow the probability space toward your desired output.
- The AI does not understand English well enough for business writing.
Show the answer
Revise the prompt to be more specific (add constraints like 'use British spellings' and 'write in a conversational, approachable tone') to narrow the probability space toward your desired output.
A colleague says: 'AI-generated images are just copying art from the internet.' Based on how the lesson described image generation, what is a more accurate description?
- They are retrieving and stitching together pieces of existing images.
- They start from random noise and gradually shape it into an image that is statistically consistent with their training data and your text description, the output is new but informed by patterns from millions of existing images.
- They are pure randomness, the output has no connection to existing art.
- They work exactly like text generation, predicting the next pixel instead of the next word.
Show the answer
They start from random noise and gradually shape it into an image that is statistically consistent with their training data and your text description, the output is new but informed by patterns from millions of existing images.
Saved in this browser only. Carry progress between devices with the resume link on the course page.
