AWS-112 · Lesson 1 of 12 · 20 min

What generative AI is

▶ Video coming soon A video version of this lesson is on the way.

The Tuesday AI hour at Cascade Ridge Veterinary Partners had a new topic on the whiteboard. For a month Noor Siddiqui, the data scientist the group had hired for its AI assessment, had walked Jonah Petrakis through classic machine learning: the no-show model, its features and labels, its precision and recall. Now she wrote two words in large letters: GENERATIVE AI.

"Everyone in the building has already tried it," Noor said. "Andre asked a chatbot to draft the holiday rota email. Kwame uses a coding assistant. Half the front desk has asked one to rewrite a difficult message to a client. So today we are not asking whether people will use it. We are asking what it actually is, what it is good at, and where it can hurt us."

Jonah, who ran the booking reports for all eleven clinics, had a practical worry. "Dr. Kaur wants something that summarizes the overnight phone calls for the emergency team. Is that the same kind of AI as the no-show model, or a different animal?"

"Same family, different branch," Noor said. This lesson follows her answer. It places generative AI in the wider map of artificial intelligence, explains what makes it generative, introduces foundation models, and surveys the use cases the AWS Certified AI Practitioner exam expects you to recognize. The rest of the course goes deeper into how these models work, what they cost, where they fail and which AWS services build with them.

Four nested boxes. The outer box is artificial intelligence, inside it machine learning, inside that deep learning, and in the center generative AI, described as models that create new text, images, audio, video or code.
Generative AI is a branch of deep learning, which is part of machine learning, which is part of artificial intelligence.

From prediction to generation

Artificial intelligence is the broad field of building systems that perform tasks we associate with human thinking: recognizing speech, spotting patterns, making recommendations, answering questions. Machine learning is the part of AI in which a system learns those patterns from data instead of following rules a programmer wrote by hand. Deep learning is the part of machine learning that uses neural networks with many layers, which turned out to be very good at messy data such as images, sound and language.

The no-show model Jonah helped build is a classic example of predictive or discriminative machine learning. It looks at an appointment and outputs one thing: the probability that the client will not arrive. Its answer is a number or a label chosen from a fixed set. It cannot write a sentence, and nobody wants it to.

Generative AI is the part of deep learning whose models produce new content. Instead of choosing between a few labels, a generative model outputs text, images, audio, video or code that did not exist before. Ask it to summarize a phone call and it writes a summary. Ask it for a picture of a golden retriever in a raincoat and it draws one. The content is new in the sense that it was assembled for this request, even though everything the model knows came from the data it was trained on.

Noor put the difference in one sentence for Jonah's notes: a predictive model answers "which one?" or "how much?", while a generative model answers "write me one". Both learn from data. They differ in what comes out.

Predictive and generative models compared.
Predictive machine learningGenerative AI
Typical outputA label, a score or a numberNew text, images, audio, video or code
Example at Cascade RidgeProbability that a booking is a no-showA draft summary of an overnight phone call
Training dataUsually the organization's own labeled recordsVery large, broad collections of text, images or other media
Who usually trains itThe organization itselfA model provider; the organization uses or adapts it
How you check itAccuracy, precision, recall on a test setHuman review, task-specific tests, automated scoring

Foundation models

The models behind modern generative AI are called foundation models. A foundation model is a very large model trained on a broad collection of data, so broad that the same model can be adapted to many different tasks. The term emphasizes that the model is a starting point: a foundation that others build on rather than a finished product for one job.

Three properties set foundation models apart from the models most organizations trained before.

  • Scale. They are trained on enormous amounts of data, often a large share of the public text on the internet plus books, code and licensed collections, and they contain billions of learned values called parameters.
  • Generality. One model can summarize, translate, classify, draft and answer questions, because all those tasks look like the same underlying skill: continuing text sensibly.
  • Adaptability. Instead of training a new model for each task, you guide the existing one with instructions, examples or extra data. Lessons in the next course, on building applications, cover how.

The best-known foundation models are large language models, or LLMs, which work with text. Lesson 3 explains how they work. Other foundation models generate images, understand images and text together, or turn text into the numerical form called an embedding. Lesson 4 surveys those types.

For a business like Cascade Ridge, the most important consequence is economic. Training a foundation model costs far more than a veterinary group could ever spend, and only a handful of companies do it. Using one, however, can cost a fraction of a cent per request. The group's job is not to build a foundation model but to choose one, guide it well and check its work. Noor wrote that on the board too: "We are buyers and users of foundation models, not builders."

How a generative model produces content

Generative models differ in detail, but they share an idea that is worth understanding before any AWS service enters the picture. During training, the model sees a vast number of examples and learns the patterns in them: which words tend to follow which, how sentences in a summary relate to a longer passage, what shapes and textures make up a photograph of a dog. When you use the model, it produces new output by following those patterns one step at a time.

A language model, for example, writes by repeatedly predicting a likely next piece of text and adding it to what came before. Each step involves a small amount of chance, which is why the same question can produce slightly different answers. An image model starts from random noise and gradually refines it into a picture that matches the description. In both cases the model is not looking anything up. It is producing something that fits the patterns it learned.

That one fact explains both the power and the main risk of generative AI. Because the model produces fluent, plausible output rather than retrieving stored facts, it can write a convincing summary of a call it has never heard before. For the same reason, it can also produce a confident statement that is simply wrong. Lesson 6 is devoted to that problem, called hallucination.

Python Example
# A toy "next word" generator built from a tiny sample of call notes.
# Real models learn far richer patterns, but the loop is the same idea:
# look at the text so far, pick a likely next piece, append it, repeat.
import random
random.seed(7)
notes = ("owner reports dog vomiting since morning . owner reports cat not eating . "
         "owner reports dog limping after walk . advised owner to bring dog in tonight .").split()
follows = {}
for a, b in zip(notes, notes[1:]):
    follows.setdefault(a, []).append(b)
word, out = "owner", ["owner"]
for _ in range(6):
    word = random.choice(follows.get(word, ["."]))
    out.append(word)
print(" ".join(out))
Output
owner reports dog limping after walk .

What this code does

It builds a toy text generator from a few call notes by recording which words follow which. Starting from "owner", it repeatedly picks one of the words that came after the current word and adds it to the sentence, six times. Real language models learn far richer patterns, but the loop of looking at the text so far and choosing a likely next piece is the same idea.

Jonah laughed at the output. "It sounds like a call note, but it is not about any real call." Noor nodded. "That is the whole lesson in eight words. The model writes what fits the pattern. Whether it is true is a separate question we have to answer ourselves."

Use cases the exam expects you to recognize

The AWS Certified AI Practitioner exam guide lists the kinds of work generative AI is used for. You should be able to recognize each from a short scenario.

Grid of eight boxes: summarization, AI assistants and chat, translation, code generation, image, video and audio, search and question answering, customer service agents, recommendations.
Typical generative AI use cases. Each still needs a human owner for the result.
  • Summarization. Condensing long text, such as call notes, meeting transcripts or lab reports, into a short version. This is Dr. Kaur's overnight-call idea.
  • AI assistants. Chat-style helpers that answer questions, draft messages and carry out tasks for employees, such as an assistant that drafts a reply to a client complaint.
  • Translation. Converting text between languages, for example client letters into Spanish. Dedicated translation services also exist; lesson 8 compares them.
  • Code generation. Writing, explaining or reviewing software. Kwame Asante, who wrote the BookVet booking app, already uses a coding assistant.
  • Image, video and audio generation. Creating pictures for a newsletter, short videos, or natural-sounding speech.
  • Search. Finding information by meaning rather than exact words, and answering questions using an organization's own documents.
  • Customer service agents. Assistants that handle routine client questions and hand harder ones to a person.
  • Recommendation engines. Suggesting products or content, increasingly by describing and comparing items in natural language.

Noor asked Jonah to sort Cascade Ridge's ideas into these categories. The overnight call notes were summarization. A help assistant on the website for booking and opening-hours questions was a customer service agent. A tool that lets the operations team ask questions about the clinic procedure manuals was search. A request from the marketing coordinator for newsletter pet photos was image generation, and Noor added a note that it would need clear labeling as AI-generated.

Where generative AI is not the right tool

The exam also expects you to recognize when AI, or generative AI in particular, is a poor fit. Noor's rule of thumb was blunt: if a task needs a guaranteed exact answer, a fixed rule, or a clinical judgment, a generative model should not be making the call.

  • Exact calculations and lookups. Drug dose calculations, invoice totals and vaccine due dates follow fixed rules. A calculator or a rules engine gives the same correct answer every time; a generative model may not.
  • Decisions that need accountability. In Cascade Ridge's AI rule, agreed with Dr. Kaur, diagnosis, treatment and triage priority stay with a veterinarian or a credentialed technician. A model can draft and summarize; a person decides.
  • Tasks with no tolerance for invented content. Anything that will be sent to a client as fact, such as a lab result, must come from the source system, not from a model's paraphrase.
  • Tiny tasks that a simple program already does well. Generative AI adds cost and unpredictability. If a short script solves the problem, use the script.

This is why the group had already rejected an "AI diagnosis" chatbot for clients during the machine learning sessions. The idea would have used generative AI exactly where its weaknesses do the most harm.

Why generative AI matters to a business

Hannah Weiss, the privacy and security lead, joined the end of the session. She wanted to know why the board kept asking about generative AI if it was so error-prone. Noor's answer was a list of advantages that the exam guide also names: generative AI is adaptable, because one model serves many tasks; responsive, because it answers in seconds; conversational, because people can use it in plain language; and it can generate content that would otherwise take staff time. "Used for drafting, summarizing and searching," she said, "it gives people time back. Used as an oracle, it gives you mistakes with excellent grammar."

Hannah's follow-up question was the right one for a group that holds client and pet records. We have committed to our clients, and to Colorado's privacy rules where they apply, to protect their information when service providers handle it. Where does the text go when someone pastes a call note into a chatbot? Noor agreed that this was the first governance question, and it shaped the group's plan: no client information goes into public consumer chatbots, and any approved tool must run inside the group's own AWS accounts with clear data handling terms. Lesson 8 shows how Amazon Bedrock addresses that.

Common mistakes

  • MistakeThinking generative AI looks facts up in a database.

    InsteadIt produces output that fits learned patterns. Unless it is connected to trusted sources, it can invent details.

  • MistakeTreating every AI system as generative AI.

    InsteadPredictive models such as a no-show classifier output labels or numbers; generative models create new content.

  • MistakeAssuming a business must train its own foundation model.

    InsteadMost organizations use and adapt models trained by providers; training one from scratch is rarely sensible.

  • MistakeUsing generative AI for exact rules such as dose calculations.

    InsteadUse deterministic tools for exact answers and keep accountable decisions with qualified people.

Worked problem

Sorting ideas into use cases

Jonah lists four ideas: (a) write a short summary of each overnight emergency call for the morning team; (b) predict which bookings will be no-shows; (c) let clinic managers ask questions of the procedure manual in plain language; (d) calculate the correct dose of a medication from a pet's weight. Which are generative AI use cases, and which kind?

Show solution
  1. (a) produces new text from a longer source: generative AI, summarization.
  2. (b) outputs a probability for a fixed outcome: predictive machine learning, not generative AI.
  3. (c) finds and explains information from documents in natural language: generative AI, search and question answering.
  4. (d) follows a fixed formula with no tolerance for error: a deterministic calculation, not a job for a generative model.

Answer: Generative AI fits (a) summarization and (c) search and question answering. (b) is predictive machine learning, and (d) needs an exact calculation.

At the end of the hour Jonah rewrote the board's two words as a sentence for his study notes: generative AI uses foundation models trained on huge amounts of data to create new content, and someone at Cascade Ridge must still own every result.

Summary and key terms

  • Generative AI is the part of deep learning whose models create new content, such as text, images, audio, video and code.
  • It sits inside machine learning and artificial intelligence, alongside predictive models that output labels and numbers.
  • Foundation models are very large models trained on broad data that can be adapted to many tasks; large language models are the best-known kind.
  • Generative models produce output by following learned patterns, not by looking up facts, which makes them fluent but able to be wrong.
  • Common use cases include summarization, assistants, translation, code generation, media generation, search, customer service agents and recommendations.
  • Generative AI is a poor fit for exact calculations, accountable decisions and tasks that cannot tolerate invented content.
Generative AI
AI whose models produce new content such as text, images, audio, video or code.
Foundation model
A large model trained on broad data that can be adapted to many tasks.
Large language model (LLM)
A foundation model that works with text, generating it one piece at a time.
Predictive (discriminative) model
A model that outputs a label, score or number for an input.
Use case
A specific business task an AI system is applied to.
Deterministic
Always giving the same output for the same input, like a calculator.

Practice problems

Work each problem on paper first, then reveal the answer to check.

  1. Name two differences between a predictive model and a generative model.

    Show answer

    A predictive model outputs a label or number and is usually trained on the organization's data; a generative model creates new content and is usually a provider's foundation model.

  2. Why can a generative model state something false with confidence?

    Show answer

    It produces output that fits learned patterns rather than retrieving verified facts.

  3. Give one task Cascade Ridge should not hand to a generative model.

    Show answer

    Medication dose calculations, or any diagnosis or triage decision.

Lesson quiz · 5 questions

Score 60% or more to complete this lesson.

Take the quiz