GCP-191 · Lesson 4 of 12 · 22 min
Review: Fundamentals of generative AI
▶ Video coming soon A video version of this lesson is on the way.
The first review session covers the section of the guide that Jules feels most comfortable with, which is exactly why Ravi wants to start there. "Comfort is where people get lazy," he says. "You have lived these ideas for three months, but the exam uses precise words, and it will offer you an answer that is nearly right." Section 1 of the guide we read covered roughly 30 out of every 100 questions. It asks you to explain core terms, the types of machine learning, the stages of the machine learning lifecycle, the kinds of data models use and why data quality matters, the layers of the generative AI landscape, and the strengths of Google's own foundation models. This lesson reviews each objective briefly and then gives you original practice scenarios. If any idea here feels unfamiliar, go back to the matching lesson in GCP-110 before moving on.
Core terms, precisely
Artificial intelligence is the broad field of building systems that perform tasks we associate with human intelligence. Machine learning is the part of AI in which systems learn patterns from data instead of following rules written by hand. Natural language processing is the part of AI concerned with understanding and producing human language. Generative AI is machine learning that creates new content, such as text, images, audio, code or video, rather than only classifying or predicting. A foundation model is a large model trained on broad data that can be adapted to many tasks. A large language model is a foundation model specialized in language. A multimodal model works across more than one type of data, such as reading an image and answering in text. A diffusion model generates images or video by starting from noise and refining it step by step.
Two terms are easy to confuse. Prompt engineering means designing the input you give a model, the instructions, examples and context, to get better output; it changes nothing inside the model. Prompt tuning is a lightweight way of adapting a model in which a small set of learned values is added to the input and trained, while the model's main weights stay fixed. On a leader's exam you do not need the mathematics, only the distinction: engineering is something a person writes, tuning is something a system learns.
Types of machine learning
Supervised learning trains a model on labeled examples, inputs paired with the correct answers, so it can predict answers for new inputs. Classifying emails into queues using thousands of emails that staff have already sorted is supervised learning. Unsupervised learning looks for structure in data without labels, such as grouping customers into segments by buying behavior. Reinforcement learning trains a system through rewards and penalties as it acts, the way a system might learn a strategy by trial and error. Many generative models combine these ideas: they are pre-trained on huge amounts of unlabeled data, then refined with labeled examples and with feedback from people.
Data: types and quality
Structured data fits neatly into rows and columns, such as Birchline's sales, stock levels and prices. Unstructured data has no fixed format, such as product photos, customer reviews, emails, call recordings and policy documents, and it makes up most of the data organizations hold. Generative AI is especially valuable because it can work with unstructured data at scale. Labeled data has the correct answer attached, which supervised learning needs; unlabeled data does not, which is cheaper to collect but supports different methods.
The guide we read listed several qualities of good data: completeness, consistency, relevance, availability, cost and format. Jules knows the first three from experience. Birchline's catalog audit in the autumn found 340 products with no weight recorded and 90 with weights in mixed units, which would have made the shopping assistant give wrong answers. Availability means the data can actually be reached by the system that needs it; cost means collecting, cleaning and storing it is affordable; and format means it is in a form the model or pipeline can use. Exam questions often describe a disappointing AI result and ask for the most likely cause. Poor data is very often the answer.
The machine learning lifecycle
The lifecycle runs through data ingestion, data preparation, model training, deployment and ongoing management. Ingestion brings data in from its sources, for example into Cloud Storage or BigQuery. Preparation cleans, labels and transforms it. Training builds or adapts the model. Deployment makes it available to applications. Management monitors performance, watches for drift and handles updates. On Google Cloud, the developer platform that GCP-111 covered supports most of these stages in one place. The guide we read named it Gemini Enterprise Agent Platform in some places and Agent Platform in others; earlier materials call it Vertex AI. For the exam, know the stages and which kind of tool supports each, and check the current names in the guide.
| Stage | What happens | Example at Birchline |
|---|---|---|
| Ingestion | Data is collected and brought in | Product data and reviews loaded into BigQuery |
| Preparation | Data is cleaned, labeled and transformed | Missing weights fixed; units made consistent |
| Training or adaptation | A model is built or adapted | Brand-voice tuning considered for descriptions |
| Deployment | The model is made available to apps | Shopping assistant connected to the shop |
| Management | Performance is monitored and updated | Monthly evaluation set and drift checks |
Choosing a foundation model
The guide lists the factors that matter when choosing a foundation model: modality, context window, security, availability and reliability, cost, performance, and the options for fine-tuning and customization. Modality asks whether the model handles the kinds of input and output you need. The context window is how much text, measured in tokens, the model can consider at once, which matters for long documents. Security and availability ask whether the model can be used under your data and reliability requirements. Cost and performance usually trade off: a larger model may give better answers but cost more and respond more slowly. Questions often describe a use case and ask which factor matters most; the signposts in the scenario usually tell you.
Use cases and the layers of the landscape
The guide groups business use cases into four verbs: create, summarize, discover and automate. Creating covers writing, image, video and code generation. Summarizing covers condensing documents, reviews or calls. Discovering covers finding information, such as searching across documents or answering questions from them. Automating covers completing tasks, often through agents that take steps on a person's behalf. The guide also describes five layers of the generative AI landscape, from the bottom up: infrastructure, models, platforms, agents and applications. Each layer depends on the ones below it, and a business can choose how many layers to own. A company using a prebuilt assistant works only at the application layer; a company building custom agents works at the platform and agent layers too.
Google's foundation models
The guide names four Google model families. Gemini is Google's family of multimodal models for text, code, images, audio and video, used across Google's products and available to developers. Gemma is a family of lightweight open models that organizations can run and adapt themselves, useful when they need more control or want to run a model in their own environment. Imagen generates and edits images from text descriptions. Veo generates video. A typical question gives a need, such as generating product images from descriptions or running a small model on the company's own hardware, and asks which model family fits. Know the purpose of each in one sentence; you do not need version numbers, and they change often.
# Matching needs to Google model families (one-line purposes)
families = {
"Gemini": "multimodal understanding and generation across text, code, images, audio, video",
"Gemma": "lightweight open models an organization can run and adapt itself",
"Imagen": "image generation and editing from text",
"Veo": "video generation",
}
needs = {"a short product video from a script": "Veo",
"a small model running in our own environment": "Gemma",
"lifestyle photos from text descriptions": "Imagen"}
for need, family in needs.items():
print(need, "->", family, "-", families[family])a short product video from a script -> Veo - video generation a small model running in our own environment -> Gemma - lightweight open models an organization can run and adapt itself lifestyle photos from text descriptions -> Imagen - image generation and editing from text
What this code does
Four Google model families are listed with a one-line purpose each, and three needs are matched to the family that fits. The script prints each need with its chosen family and that family's purpose. A product video maps to Veo, a small self-run model to Gemma, and lifestyle photos from text to Imagen.
Practice scenarios
Here are original scenarios in the style of the exam, with reasoning. First: a clinic wants to sort incoming patient messages into five categories, and staff have already sorted twenty thousand past messages. Which type of machine learning fits? Supervised learning, because labeled examples exist. Second: an online retailer's new assistant gives wrong answers about product sizes, and testing shows the catalog has many missing measurements. What is the most likely cause? Incomplete data, a data quality problem, rather than the model itself. Third: a museum wants to describe artworks from photos for visitors who are blind. Which kind of model is needed? A multimodal model that reads images and produces text. Fourth: a manufacturer needs a model that can run inside its own network with no outside connection and be adapted to its terminology. Which Google model family fits best? Gemma, because it is open and can be run and adapted in the company's own environment.
Generative AI is not always the answer
A recurring theme in section 1 is knowing when a problem does not need generative AI at all. If a retailer wants to predict next month's demand for each product from past sales, that is a forecasting task suited to traditional machine learning, not a generative model. If a bank wants to flag transactions that look unusual, that is anomaly detection. If an online shop wants to sort reviews by star rating, it may need no machine learning at all. Generative AI is the right tool when the task is to create, summarize, discover or automate with content, especially unstructured content. Exam questions sometimes offer a generative option for a predictive problem; recognize the mismatch.
Another theme is that the same business problem can sit at different layers. A company that wants better customer emails can buy a prebuilt assistant at the application layer, build an agent on the platform layer, or choose and adapt a model directly. The right layer depends on the skills, data and control the company has and needs. Leaders do not need to build anything, but they do need to choose the layer wisely.
Worked problem
Choosing the deciding factor
A legal team wants a model to answer questions about contracts that are often several hundred pages long. They have tried a model that seems to forget the early sections of long contracts. Which model selection factor should they look at first, and why?
Show solution
- The need is to reason over very long documents in one go.
- The symptom, forgetting early sections, suggests the documents exceed what the model can consider at once.
- That points to the context window, the amount of input the model can take in at one time, measured in tokens.
- Cost and performance matter too, but they are not what the symptom describes.
Answer: Look first at the context window. Grounding that retrieves only the relevant sections is another way to address the same problem.
Jules scores eight out of ten on Ravi's fundamentals set. Both misses are about the lifecycle: Jules placed drift monitoring under deployment rather than management, and confused preparation with ingestion. Jules adds both to the study log as "confusions" to revisit in lesson 10.
Common mistakes
MistakeTreating prompt engineering and prompt tuning as the same thing.
InsteadEngineering writes better inputs; tuning learns a small set of values while the model stays fixed.
MistakeBlaming the model for errors caused by poor data.
InsteadCheck completeness, consistency and relevance of the data first.
MistakeCalling any classification task generative AI.
InsteadGenerative AI creates new content; classification predicts a label.
MistakeMemorizing model version numbers.
InsteadKnow the purpose of Gemini, Gemma, Imagen and Veo; versions change.
MistakePlacing monitoring under deployment.
InsteadMonitoring and drift checks belong to ongoing management.
Summary and key terms
- Generative AI creates new content; foundation models are broad models adaptable to many tasks.
- Supervised learning needs labeled data; unsupervised finds structure; reinforcement learns from rewards.
- Data quality means completeness, consistency, relevance, availability, cost and format.
- The lifecycle runs ingestion, preparation, training, deployment and management.
- Choose models by modality, context window, security, reliability, cost, performance and customization.
- Gemini is multimodal, Gemma is open and lightweight, Imagen makes images, Veo makes video.
- Foundation model
- A large model trained on broad data that can be adapted to many tasks.
- Multimodal
- Able to work with more than one type of data, such as text and images.
- Diffusion model
- A model that generates images or video by refining noise step by step.
- Labeled data
- Examples with the correct answer attached.
- Context window
- The amount of input, in tokens, a model can consider at once.
- Drift
- A gradual change in data or behavior that makes a model less accurate over time.
Practice problems
Work each problem on paper first, then reveal the answer to check.
What kind of learning uses labeled examples?
Show answer
Supervised learning.
Name the four business use case verbs in the guide.
Show answer
Create, summarize, discover and automate.
Which Google model family generates video?
Show answer
Veo.
Which Google model family is open and lightweight?
Show answer
Gemma.
Which lifecycle stage includes drift monitoring?
Show answer
Management.
What are the five layers of the landscape, from the bottom?
Show answer
Infrastructure, models, platforms, agents and applications.
Name three data quality factors from the guide.
Show answer
Any three of completeness, consistency, relevance, availability, cost and format.
Lesson quiz · 5 questions
Score 60% or more to complete this lesson.
Create a free account to save your progress, take quizzes and earn a certificate.