GCP-110 · Lesson 1 of 12 · 21 min
From machine learning to generative AI
▶ Video coming soon A video version of this lesson is on the way.
Jules Baptiste has run Birchline Outfitters' online shop for six years. He knows which product pages sell, which search terms customers type at midnight and which colour of rain jacket sells out first every October. In November 2026 the steering committee asked him to lead Birchline's first generative AI projects: a shopping assistant for the website, help writing product descriptions for the six thousand items in the catalogue, and a way to make sense of the tens of thousands of customer reviews the shop collects every year. Jules is a product manager, not an engineer, and he says so in the first meeting. "I need to understand this well enough to make good decisions and to know when someone is selling me magic."
Ravi Menon, Birchline's data and analytics lead, offers to teach him. Farah Qureshi, the cloud architect who coached Owen Mitchell through the Google Cloud basics, will join for the platform questions. Jules sets himself a goal: to sit the Google Cloud Generative AI Leader exam in the spring of 2027. This course follows his first weeks of study. It covers the concepts every Google Cloud generative AI certification assumes: what generative AI is, how models work, how to prompt and ground them, how to adapt and evaluate them, and how to use them responsibly. GCP-111 then tours Google Cloud's products, GCP-112 covers strategy and adoption, and GCP-191 prepares for the exam itself.
Artificial intelligence, machine learning and deep learning
Ravi starts with vocabulary, because the terms are used loosely in meetings and precisely on exams. Artificial intelligence (AI) is the broad field of building computer systems that perform tasks normally associated with human intelligence: understanding language, recognizing images, making predictions, planning and solving problems. AI is a goal, not a single technique. Early AI systems were often built from hand-written rules, such as "if the order total is over a threshold and the shipping address is new, flag it for review."
Machine learning (ML) is the part of AI in which systems learn patterns from data instead of following rules a person wrote. A machine learning model is a mathematical function with adjustable settings called parameters. During training, an algorithm adjusts those parameters so that the model's outputs match examples in a training dataset as closely as possible. Once trained, the model is used for inference: it receives new inputs it has never seen and produces outputs, such as a predicted demand figure or a fraud score.
Deep learning is a branch of machine learning that uses neural networks with many layers. Each layer transforms its input a little, and stacking many layers lets the network learn very complex patterns, such as the shapes that make up a face or the structure of a sentence. Deep learning drove the big advances of the 2010s in image recognition, speech recognition and translation, and it is the foundation of today's generative models.
Natural language processing (NLP) is the field concerned with computers understanding and producing human language. It overlaps all three: early NLP used rules, later NLP used machine learning, and modern NLP is dominated by deep learning and large language models.
Three ways machines learn
Machine learning methods are usually grouped by the kind of data and feedback they learn from. The exam expects leaders to recognize all three and to match each to a business problem.
In supervised learning, every training example comes with the correct answer, called a label. A model that predicts whether a customer will return an item learns from past orders labelled "returned" or "kept". A model that forecasts weekly sales learns from past weeks with their actual sales. Supervised learning powers most classic business ML: classification (which category?) and regression (how much?). Its weakness is that labels cost money and time to collect.
In unsupervised learning, the data has no labels, and the model looks for structure on its own. Clustering customers into groups with similar buying habits is the standard example: nobody tells the model what the groups are; it finds them. Anomaly detection, such as spotting unusual login patterns, is another. Unsupervised learning is useful when you do not yet know what you are looking for.
In reinforcement learning, a model, often called an agent in this context, learns by trial and error. It takes actions in an environment, receives rewards or penalties, and gradually learns a strategy that earns the most reward. Reinforcement learning has trained systems to play games and control robots, and a form of it, reinforcement learning from human feedback, is used to make large language models more helpful and safer: people rate model answers, and the model is tuned toward the answers people prefer.
| Approach | Learns from | Typical question | Birchline example |
|---|---|---|---|
| Supervised | Labelled examples | Which category? How much? | Predicting which orders will be returned |
| Unsupervised | Unlabelled data | What groups or oddities exist? | Finding customer segments for email campaigns |
| Reinforcement | Rewards for actions | What sequence of actions works best? | Tuning a chatbot toward answers staff rate as helpful |
Predictive AI and generative AI
Most machine learning Birchline already uses is predictive (sometimes called discriminative): it takes an input and returns a judgement about it, such as a label, a score or a number. The demand forecast Ravi built in BigQuery ML is predictive. So is the fraud check the payment provider runs on every card transaction.
Generative AI is different in what it produces. A generative model creates new content that resembles the data it learned from: text, images, audio, video, computer code or combinations of these. Ask it to describe a waterproof hiking boot for a product page, and it writes a paragraph that did not exist before. Ask an image model for a picture of a tent at dawn, and it produces new pixels. The output is new, but it is shaped by patterns in the training data, which is why generative models can be fluent and useful and also confidently wrong.
Ravi draws the difference on the whiteboard as two arrows. Predictive: many inputs go in, one small answer comes out. Generative: a small prompt goes in, a large piece of content comes out. Jules notices that the shopping assistant, the description writer and the review summarizer are all on the generative side, while the returns predictor his team discussed last year is on the predictive side. Many real systems combine both: a generative assistant might call a predictive model to check delivery dates.
What made generative AI suddenly useful
Generative models are not new; researchers have built them for decades. What changed in the late 2010s and early 2020s was a combination of three things. The first was a neural network design called the transformer, introduced by Google researchers in 2017, which handles long sequences of text efficiently by letting every word attend to every other word. The second was scale: training transformers with billions of parameters on enormous collections of text, code and images. The third was computing power, including specialized chips such as Google's Tensor Processing Units (TPUs) and graphics processing units (GPUs), which made training at that scale possible.
The result was foundation models: very large models trained on broad data that can be adapted to many tasks, instead of one model per task. Lesson 2 explains foundation models and large language models in detail. For now, Jules writes down the key business consequence: organizations no longer need to train a model from scratch to get useful language or image capabilities. They can start from a capable model someone else trained and adapt it with prompts, their own data or light tuning.
The machine learning lifecycle
Whether a model is predictive or generative, it lives through a lifecycle, and the exam expects leaders to recognize the stages. Ravi lists them as Birchline runs them for the demand forecast, then shows how each stage looks for a generative project.
- Data ingestion. Collect the data the model needs: sales history for a forecast, or product specifications and past descriptions for a writing assistant.
- Data preparation. Clean, label and organize it. Remove duplicates, fix errors, decide what personal information must be excluded.
- Model training or selection. Train a model, or, as is usual for generative AI, choose an existing foundation model and decide how to adapt it.
- Evaluation. Test the model against data it has not seen and against the criteria that matter to the business: accuracy, tone, safety, cost and speed.
- Deployment. Make the model available to an application or to people, with access controls and limits.
- Monitoring. Watch quality, cost and behaviour in production, because the world changes and models drift. Feed what you learn back into the data and the next version.
Google Cloud provides tools for every stage: BigQuery and Cloud Storage for data, Dataflow for preparing it, and the Gemini Enterprise Agent Platform (which earlier materials call Vertex AI) for choosing, tuning, evaluating, deploying and monitoring models. GCP-111 covers those products. The point for a leader is that a model is not a one-time purchase; it is a system that needs owners at every stage.
What generative AI is good for
Ravi groups the use cases Birchline's teams have proposed into four kinds of work. The grouping helps Jules see quickly whether an idea plays to generative AI's strengths.
| Kind of work | What the model does | Birchline examples |
|---|---|---|
| Create | Drafts new text, images, code or audio | First drafts of product descriptions; banner images for campaigns; email replies for the help desk |
| Summarize | Condenses long or many documents | A weekly digest of customer reviews per product; a summary of a long supplier contract |
| Discover | Finds and explains information across sources | Staff asking the returns policy in plain language; shoppers finding the right sleeping bag for a trip |
| Automate | Carries out multi-step tasks, often with tools | Sorting incoming emails into queues; checking stock and booking an in-store pickup |
Jules notices that every example still has a person somewhere in the loop. Descriptions will be reviewed before they go live. The help desk will approve email replies. The shopping assistant will not be allowed to change orders, a rule Teresa Okonjo, the information security manager, set when the assistant was first proposed. Generative AI changes how work is done; it does not remove the need for judgement.
Data: the raw material
Every model is shaped by data, and the exam asks leaders to reason about data types and quality. Structured data fits neatly into rows and columns with defined fields: order tables, inventory counts, prices. Unstructured data has no fixed format: product photos, review text, emails, call recordings, PDF manuals. Most of an organization's information is unstructured, and generative AI's big contribution is that it can work with unstructured data directly. Semi-structured data, such as JSON product feeds, sits in between.
Labelled data has the answer attached, which supervised learning needs. Unlabelled data does not, and is far more plentiful. Foundation models are trained mostly on unlabelled data, which is one reason they could grow so large.
Quality matters more than volume. Ravi lists the questions he asks of any dataset: Is it accurate? Is it complete, or are some stores or seasons missing? Is it consistent in format and meaning? Is it current? Is it relevant to the task? And can the team actually reach it, with permission? A description writer trained or grounded on old catalogue copy full of discontinued features will repeat those mistakes fluently. Lesson 10 returns to data quality as a limitation of generative AI.
# A tiny supervised model: learn a threshold that separates "returned" from "kept"
# orders using one feature (how many sizes the customer ordered of the same item).
orders = [(1, "kept"), (1, "kept"), (2, "kept"), (2, "returned"), (3, "returned"),
(1, "kept"), (3, "returned"), (2, "kept"), (4, "returned"), (1, "kept")]
def accuracy(threshold):
right = 0
for sizes, label in orders:
predicted = "returned" if sizes >= threshold else "kept"
right += predicted == label
return right / len(orders)
for t in (2, 3, 4):
print("predict returned when sizes >=", t, "-> accuracy", accuracy(t))
best = max((2, 3, 4), key=accuracy)
print("best threshold learned from the labelled data:", best)predict returned when sizes >= 2 -> accuracy 0.8 predict returned when sizes >= 3 -> accuracy 0.9 predict returned when sizes >= 4 -> accuracy 0.7 best threshold learned from the labelled data: 3
What this code does
Ten past orders each record how many sizes of the same item the customer ordered and whether the order was returned. The program tries three cut-off values and measures how often each one correctly sorts the orders into returned or kept. The cut-off of 3 sizes is right 9 times out of 10, so it is the rule the tiny model learns from the labelled data.
The example is deliberately tiny, but it shows the essence of supervised learning: the program tries settings, measures how well each matches the labels and keeps the best. Real models adjust millions or billions of parameters instead of one threshold, using the same idea at enormous scale.
Common mistakes
MistakeUsing AI, machine learning and generative AI as synonyms.
InsteadAI is the broad field; machine learning learns from data; generative AI is the part of deep learning that creates new content.
MistakeAssuming generative AI replaces predictive models.
InsteadThey answer different questions. Many systems use both, such as an assistant that calls a forecast model.
MistakeThinking more data always beats better data.
InsteadAccurate, relevant, current data usually matters more than sheer volume.
MistakeTreating a model as a one-time purchase.
InsteadModels live through a lifecycle of data, evaluation, deployment and monitoring, and need owners at every stage.
Worked problem
Classifying proposed projects
Birchline's teams propose three projects: forecasting how many tents each store will sell next month, grouping loyalty members by buying habits without predefined categories, and drafting replies to customer emails. Which kind of machine learning or AI fits each?
Show solution
- The tent forecast predicts a number from labelled history (past months with actual sales): supervised learning, a regression problem, which is predictive AI.
- Grouping members without predefined categories means finding structure in unlabelled data: unsupervised learning, specifically clustering.
- Drafting replies creates new text: generative AI, most likely a large language model adapted with prompts and Birchline's policies.
Answer: Supervised predictive ML for the forecast, unsupervised clustering for the segments, and generative AI for the email drafts.
By the end of the first week Jules has a page in his notebook headed "Is this a generative problem?" with four questions under it: Does the output need to be new content? Is the input mostly unstructured? Can a person review the output before it matters? And do we have good data to ground it? The rest of the course will add to that page.
Summary and key terms
- Artificial intelligence is the broad field; machine learning learns patterns from data; deep learning uses many-layered neural networks; generative AI creates new content.
- Supervised learning uses labelled examples, unsupervised learning finds structure in unlabelled data, and reinforcement learning learns from rewards.
- Predictive AI returns a judgement about an input, while generative AI produces new text, images, audio, video or code.
- The transformer, scale and specialized chips made foundation models possible.
- Every model lives through a lifecycle of ingestion, preparation, training or selection, evaluation, deployment and monitoring.
- Generative AI is good at creating, summarizing, discovering and automating, and depends on accurate, relevant data.
- Artificial intelligence
- The field of building systems that perform tasks associated with human intelligence.
- Machine learning
- Building models that learn patterns from data rather than following hand-written rules.
- Deep learning
- Machine learning with neural networks of many layers.
- Generative AI
- AI that creates new content such as text, images, audio, video or code.
- Supervised learning
- Learning from examples that include the correct answer, or label.
- Unsupervised learning
- Finding structure, such as clusters, in unlabelled data.
- Reinforcement learning
- Learning a strategy by trial and error from rewards and penalties.
- Inference
- Using a trained model to produce outputs for new inputs.
- Structured data
- Data organized in defined fields, such as rows and columns.
- Unstructured data
- Data without a fixed format, such as text, images and audio.
Practice problems
Work each problem on paper first, then reveal the answer to check.
A model learns to flag fraudulent orders from past orders marked fraud or not fraud. Which learning approach is this?
Show answer
Supervised learning, because each training example carries a label.
Is a weekly digest of customer reviews a create, summarize, discover or automate task?
Show answer
Summarize: the model condenses many reviews into a short digest.
Why could foundation models grow so large?
Show answer
They train mostly on unlabelled data, which is far more plentiful than labelled data, and on specialized chips at very large scale.
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.