What is generative AI, and how does it work?
What is generative AI? It's a type of artificial intelligence that creates new content, such as text, images, video, audio or software code, in response to a prompt. It learns patterns from huge amounts of training data and uses them to produce something new rather than to sort or label what already exists.

The short version
- Generative AI makes new content. Older machine learning models mostly classify or label data.
- Most of it is built on foundation models, large models trained on broad data. Large language models (LLMs) are one kind.
- A text model writes by predicting the most likely next piece of text, one piece at a time.
- It can state wrong information confidently. NIST calls this confabulation, better known as hallucination.
- IBM's timeline lists ChatGPT, introduced by OpenAI in 2022, as a milestone.
What generative AI means
AWS defines generative AI as "a type of AI that can create new content and ideas, including conversations, stories, images, videos, and music." IBM's definition is similar: AI "that can create original content such as text, images, video, audio or software code in response to a user's prompt or request."
The National Institute of Standards and Technology (NIST), in its July 2024 Generative AI Profile, cites a definition of generative AI as "the class of AI models that emulate the structure and characteristics of input data in order to generate derived synthetic content." In plain terms, the model studies a lot of examples and then produces new material that looks like them.
The output depends on the model. A chatbot writes answers and code. An image model draws pictures. Other models produce speech, music or video. IBM also lists design, art and synthetic data among the things generative AI can create.
Generative AI vs traditional AI
Generative AI is a subset of AI, not a replacement for it. The difference is in what the model is trained to do.
AWS explains that traditional machine learning models "were discriminative or focused on classifying data points." AWS's example is a model that looks at the pixels, lines, colors and shapes in an image and maps them to words.
Generative models work the other way around. In AWS's words, "Instead of predicting a label given some features, they try to predict features given a certain label." Its example is a model that studies animal photos and learns what ears, eyes, tails and skin patterns look like. It can then create new animal images that weren't in its training set.
| Traditional (discriminative) AI | Generative AI | |
|---|---|---|
| Main job | Classify data points | Create new content |
| Typical output | A label, such as a word for what an image shows | Text, images, audio, video or code |
| AWS's examples | Look at an image and map it to words | Create new animal images that weren't in the training set |
How does generative AI work?
IBM describes 3 stages: training a foundation model, tuning it for a job, then generating output.
1. Training a foundation model
AWS describes foundation models as "large generative AI models trained on a broad spectrum of text and image data." IBM says the training uses "huge volumes of raw, unstructured, unlabeled data" and calls the process "compute-intensive, time-consuming and expensive," requiring thousands of graphics processing units (GPUs) and weeks of processing.
2. Tuning it for a task
IBM compares a foundation model to "a generalist," so it usually needs tuning before it is good at a specific job. Developers then keep assessing its output and retuning it over time.
3. Generating from a prompt
For text, Microsoft's training material explains that large language models "are trained to generate completions based on prompts" and compares them to a far more powerful version of the predictive text on a phone keyboard.
The model breaks text into tokens, which can be words, parts of words or punctuation. A design called a transformer uses a technique called attention to work out which earlier tokens matter most for what comes next. The model predicts the most probable next token and adds it to the text. It repeats this until it predicts the end. Microsoft's example: given "When my dog was a ...", the model predicts "puppy" rather than "cat" or "skateboard."
Types of generative AI models
AWS and IBM name 4 main families of generative models:
- Transformers. The basis of today's LLMs. IBM dates them to the 2017 research paper "Attention is All You Need."
- Diffusion models. AWS says they create new data by "iteratively making controlled random changes to an initial data sample."
- Generative adversarial networks (GANs). AWS explains that GANs train 2 neural networks "in a competitive manner": one creates samples and the other tries to tell them apart from real data.
- Variational autoencoders (VAEs). According to AWS, they learn a compact representation of data called latent space and generate new data from it.
AWS adds that LLMs are "one class of FMs," or foundation models. So an LLM is a type of generative AI model, but not every generative AI model is an LLM. Image generators, for example, are generative AI without being language models.
Generative AI examples
IBM describes ChatGPT, which OpenAI introduced in 2022, as a front-end to GPT-3 that generates coherent sentences and long-form content in response to prompts. Newer models keep arriving, such as OpenAI's GPT-6.1 Terra and Google's Gemini 4 Carbon.
Common uses include:
- drafting and summarizing text, and answering questions in plain language;
- writing and explaining software code;
- creating images, audio, music and video from a description;
- customer service chatbots, which AWS says financial institutions use to recommend products and answer customer questions;
- science and medicine: AWS says generative AI can create new protein sequences with specific properties for drug and therapy design.
Generative AI can also answer from your own documents through a method called retrieval-augmented generation (RAG). If you want to try a model on your own computer, see our guide to running an LLM locally.
Generative AI vs agentic AI
The newer term "agentic AI" builds on generative AI. IBM puts the difference this way: "Gen AI models focus on creating content based on learned patterns; agents use that content to interact with each other and other tools to make decisions, solve problems and complete tasks."
A chatbot that writes a travel plan is generative AI. An agent that uses the same kind of model to search for flights and fill in a booking form is agentic AI. Our guide to what an AI agent is covers how that works.
Risks of generative AI
NIST's Generative AI Profile lists 12 risks that are unique to generative AI or made worse by it. These are the ones that matter most for everyday users:
- Confabulation. NIST defines it as "confidently stated but erroneous or false content," known colloquially as hallucinations. AWS also warns that generative AI systems "can sometimes produce inaccurate or misleading information." Check facts, figures and citations before you rely on them.
- Harmful bias. NIST notes that text-to-image models asked for pictures of CEOs, doctors, lawyers and judges have underrepresented women, racial minorities and people with disabilities. IBM says models "may learn societal biases present in the training data."
- Data privacy. NIST lists the leakage and unauthorized use or disclosure of personal or sensitive data. Be careful what you paste into a chatbot.
- Information integrity. NIST warns that generative AI lowers the barrier to producing content that blurs fact and fiction and could be used for large-scale disinformation campaigns.
- Information security. NIST says it lowers barriers for attackers, including for hacking, malware and phishing. Our phishing guide explains how to spot scam messages.
- Intellectual property. NIST points to the easier replication of copyrighted or trademarked content without permission.
- Environmental impact. NIST cites the high computing resources needed to train and run models.
None of this makes generative AI useless. It means treating its output as a first draft that a person checks, not a final answer.
Frequently asked questions
What is generative AI in simple terms?
It's AI that makes new things. You type a request, called a prompt, and the model writes text, draws an image or produces audio, video or code based on patterns it learned from its training data.
What is the difference between generative AI and AI?
AI is the whole field, and generative AI is one branch of it. AWS explains that traditional machine learning models were mostly discriminative, meaning they classify data points. Generative AI creates new content instead.
What is generative AI vs an LLM?
A large language model is one type of generative AI: AWS calls LLMs one class of foundation models. LLMs work with language and generate text. Generative AI also includes models that create images, audio and video, which aren't LLMs.
When did generative AI start?
The building blocks are more than a decade old. IBM dates the first variational autoencoders to 2013, the first GANs and diffusion models to 2014 and transformers to 2017. IBM's timeline also lists OpenAI's introduction of ChatGPT in 2022, and AWS says cloud computing advances made generative AI commercially viable from 2022.
What is generative AI primarily used for?
It's mostly used to create and transform content: writing and summarizing text, answering questions, writing code and generating images, audio and video. AWS lists business uses that range from customer service chatbots at banks to designing new protein sequences for drug research.
More in AI
- What is a large language model (LLM), and how does it work?
- What is an AI agent, and how does it work?
- What is machine learning, and how does it work?
- What is prompt engineering, and how does it work?
- What is RAG in AI, and how does it work?