What is generative AI
Generative AI is a branch of artificial intelligence in which a model creates new content, such as text, images, audio, video or code, using patterns it learned from very large amounts of training data.
Last updated: 08 Oct, 2026
Before any code, it helps to place generative AI among the fields it grew out of, so that the words AI, machine learning and deep learning each mean something specific. Then the course can say exactly what is new.
Placing generative AI among AI, machine learning and deep learning
- Artificial intelligence is software that does tasks that normally need human intelligence. A film recommender and a self-driving car are familiar examples.
- Machine learning is the part of AI where a program learns its rules from data instead of being handed them.
- Deep learning is machine learning with neural networks of many layers. The transformer, the design behind today's language models, is a deep learning model.
- Generative AI is the part of deep learning aimed at creating content.
Reading generative AI as a branch of deep learning
The video puts generative AI inside deep learning and splits deep learning models into two kinds. Discriminative models do classification and regression: given an input, they predict a label or a number, and they are usually trained on labelled data. Generative models create new data, and they are trained on a huge amount of it.
The video's analogy is a person who has read a hundred books about cats. Ask that person any question about cats and they answer in their own words, and the answers are good because of everything they read. A generative model works the same way: it answers from the patterns in a very large body of training text, and the words of the answer are its own.
The video names two families. Large language models work with text: text goes in and a text answer comes out. The second family takes text and produces images or video. Such models are usually called image generation or video generation models; many of them are diffusion models. The word multimodal describes a model that handles more than one kind of content, such as text and images together.
Discriminative models vs generative models
| Discriminative | Generative | |
|---|---|---|
| Task | Classify or predict: spam or not spam, a house price | Create: write a reply, draw an image, complete code |
| What it learns | How to tell the cases apart, or how to predict a value | What the data looks like, well enough to produce more of it |
| Output | A label or a number | New text, image, audio, video or code |
| Training data | Usually labelled examples | A very large body of text, images or other content |
| Example | A spam filter | A chat assistant |
Foundation models and fine-tuning
Companies such as OpenAI, Meta, Google and Anthropic build very large models that the video calls foundation models or pre-trained models. They are trained once on a huge amount of text and code, and then many applications reuse them. A foundation model can be used as it is, or adapted to one domain by fine-tuning, which trains it further on your own examples. Fine-tuning LLMs covers when that is worth doing.
The chat model used in this course, openai/gpt-oss-120b, is an open-weight model that Groq hosts; the same code works with Gemini and with many other providers.
How a text model generates a reply
A language model produces text one small piece at a time. Given the text so far, it scores every possible next piece, called a token, picks one, adds it to the text and repeats. A whole reply takes one such step for every token in it. Because the pick is made by sampling from the scores, the same prompt can give different wording each time. How LLMs are built shows the training behind those scores.
Where you use generative AI
- Writing and summarising: drafts, rewrites, translations and summaries of long text.
- Answering from your own documents: retrieval-augmented generation, built in Retrieval-augmented generation (RAG).
- Extracting data from messy text: turning an email into fields, as in Structured output.
- Acting through tools: a model that decides to search, calculate or call an API, which is where AI agents begin.
Related
- Previous: Installing Python for generative AI
- Next: Generative AI vs AI agents vs agentic AI
- Go deeper: Tokens and Next-token prediction
- Write down three apps you use every week and mark each one discriminative (it predicts a label or a number) or generative (it creates content).
- Pick one task you do at work and write the sentence you would give a language model to do it. Which facts would it need that it cannot know?
You understood something today that you didn't yesterday.