The same core idea behind a chatbot's reply — predicting what's most likely, one piece at a time — can also paint a picture, compose music, or write code. Here's how generative AI creates new content, and the genuine questions it raises.
The large language model article in this series explained how a chatbot predicts one word at a time to write a reply. Generative AI is that same underlying idea — predicting the most plausible next piece of something, based on patterns learned from vast amounts of training data — applied far beyond text: to images, music, video, and code. This guide looks at how that extension actually works, and at the genuine questions it raises.
The spam-detection example from the machine learning article was a discriminative model — given an email, it sorted it into one of two existing categories. A generative model does something different: instead of sorting or labelling existing content, it produces brand-new content that resembles the patterns in its training data. An LLM generating text was the first example in this series; the same principle extends naturally to images, audio, and beyond.
Most modern AI image generators use a technique called a diffusion model. The core idea is almost the reverse of what you'd expect: during training, the model is shown real images that have had random visual "noise" added to them in small increments, and it learns to predict and remove that noise, step by step, to recover the original image.
Once trained, generating a brand-new image works by running that process backwards, starting from pure random noise: the model repeatedly predicts "what noise should be removed here to make this look more like the prompt I was given," gradually refining static into a coherent image over many small steps.
The text prompt guides every step of this process, steering the denoising toward an image that matches the description rather than an arbitrary one — which is why changing the wording of a prompt changes the final result.
Before diffusion models became dominant, many image generators used Generative Adversarial Networks (GANs) — a setup with two neural networks trained together in competition: a generator that creates fake images, and a discriminator that tries to tell real images apart from the generator's fakes. As training progresses, the generator gets better at fooling the discriminator, and the discriminator gets better at catching it, each pushing the other to improve.
| Feature | GANs | Diffusion Models |
|---|---|---|
| Core mechanism | Two networks compete (generator vs. discriminator) | Gradually removes noise, step by step |
| Training stability | Can be difficult to train well | Generally more stable to train |
| Common use today | Less common for cutting-edge image generation now | Basis for most current top image generators |
The same generative principle — learning patterns from huge amounts of real examples, then producing new content that follows those patterns — extends to other kinds of content too. AI music tools generate original melodies and arrangements from a text description or style reference; voice-generation tools can produce speech in a given voice from text; video-generation models extend image diffusion techniques across time to produce short moving clips; and code-generation tools, an extension of the language modelling covered in the coding article, predict likely next lines of code the same way an LLM predicts likely next words.
Generative AI models learn from enormous datasets of existing human-made work — art, writing, music, photography — which raises a genuinely contested set of questions with reasonable arguments on more than one side.
Some argue that training a model on publicly available creative work is a transformative use, similar in principle to how a human artist learns by studying countless existing works, and that the resulting tool creates real value without directly copying any single source. Others argue that using copyrighted creative work without the original creators' consent or compensation, especially at the massive scale generative AI requires, causes real economic harm to working artists and writers, regardless of whether any single output directly copies a specific source. Courts, lawmakers, and creative communities in different countries are actively working through these questions, and the legal and ethical consensus is still forming rather than settled.
A generative model doesn't typically store and paste together pieces of its training images or text the way a collage does — it learns statistical patterns and generates new output from them. Whether that process should be treated more like human learning or more like unauthorised copying is exactly the crux of the ongoing debate, not a settled technical fact.
As the AI ethics article in this series covered, distinguishing AI-generated content from human-made content is becoming genuinely harder. Some efforts to address this include invisible watermarking embedded directly in generated images, and content-provenance standards (such as C2PA) that attach verifiable metadata showing how and where an image was created or edited. None of these methods are perfect or universally adopted yet, which is why the "questions worth asking" checklist from the ethics article remains one of the most reliable everyday tools available.
Generative models are also used far beyond art and chatbots — in drug discovery, similar techniques help predict plausible new molecular structures with desired properties, and in accessibility tools, generative text-to-speech gives a natural-sounding voice to people who have lost the ability to speak, built from samples of their own recorded voice.
Generative AI can feel like the most "magical" part of modern AI — a blank page becoming a picture, a prompt becoming a paragraph. But it rests on the same foundation as everything else in this series: patterns learned from data, and a model predicting the next most plausible piece, whether that's a word, a pixel, or a musical note. Understanding that foundation is what lets you use these tools with genuine skill, and engage honestly with the real questions they raise, rather than treating them as either pure magic or pure threat.
10 questions. Select an answer for each, then submit to see your score instantly.