Fundamentals of gen AI · Topic 2 of 6

Machine Learning Approaches and the ML Lifecycle

Supervised, unsupervised and reinforcement learning, and the ML lifecycle from data ingestion to model management with the Google Cloud tools for each stage.

  • 4 min
  • Includes a diagram
In a nutshell
  • Supervised: labeled data, predict known outcomes. Unsupervised: unlabeled data, find structure. Reinforcement: learn from rewards.
  • Lifecycle: ingestion, preparation, training, deployment, management, then back again.
  • Agent Platform covers training, deployment and management; BigQuery and Cloud Storage cover data.

What it is

Machine learning models learn in different ways. The exam names three approaches: supervised, unsupervised and reinforcement learning. It also expects you to know the stages of the ML lifecycle (data ingestion, data preparation, model training, model deployment, model management) and the Google Cloud tools used at each stage.

Data ingestionData preparationModel trainingModel deploymentModel managementmonitor and retrainData ingestion

How it works

The three approaches

ApproachHow it learnsTypical business useExample
Supervised learningFrom labeled examples: inputs paired with the correct answerClassification and predictionEmails labeled spam or not spam train a spam filter
Unsupervised learningFrom unlabeled data, finding structure on its ownGrouping, pattern finding, anomaly detectionSegmenting customers by purchase behavior
Reinforcement learningBy trial and error, receiving rewards or penalties for actionsDecision making in changing environmentsOptimizing warehouse robot routes; improving model responses using human feedback
Exam tip

Look for the clue. "Historical data with known outcomes" is supervised. "Find natural groups" is unsupervised. "Learns by reward" is reinforcement.

Generative AI models use a mix: they learn language patterns from huge amounts of unlabeled text (a form of self-supervised learning), are then refined with labeled examples, and are often improved with reinforcement learning from human feedback.

The ML lifecycle

The ML lifecycle as a loop: data ingestion with Cloud Storage, Pub/Sub and BigQuery, data preparation, model training on Agent Platform, AutoML or BigQuery ML, deployment to endpoints, and model management with monitoring and retraining when new data or drift appears.

StageWhat happensGoogle Cloud tools
Data ingestionCollect data from sources such as apps, files, databases and streamsCloud Storage, Pub/Sub, BigQuery
Data preparationClean, transform, label and split data; create featuresBigQuery, Dataflow, data labeling, Agent Platform Feature Store
Model trainingTrain or adapt a model, and evaluate itGemini Enterprise Agent Platform (custom training, AutoML, model tuning), BigQuery ML
Model deploymentMake the model available to applicationsAgent Platform endpoints for online and batch predictions, Model Registry
Model managementMonitor quality, detect drift, retrain, version and governAgent Platform model monitoring, Agent Platform Pipelines, Model Registry

The lifecycle is a loop, not a line. Data changes, models drift, and teams retrain. Managing that loop with automation is often called MLOps.

Why the lifecycle matters to leaders

  • Most effort goes into data, not into the model. Budget and plan for data work.
  • A model that is never deployed creates no value.
  • A deployed model that is not managed slowly gets worse as the world changes.
  • Using a managed platform (Agent Platform) for the whole loop reduces cost and risk.

Foundation models and the lifecycle

With foundation models, many organizations skip training from scratch. They start from a pre-trained model, adapt it with prompts, grounding or tuning, then deploy and manage it. The lifecycle still applies: data preparation (for grounding or tuning), evaluation, deployment and monitoring remain.

A worked scenario

An insurer wants to flag likely fraudulent claims. Past claims marked fraud or genuine are labeled data, so it uses supervised learning. Claims data flows into BigQuery (ingestion), is cleaned and turned into features (preparation), a model is trained with AutoML on Agent Platform (training), deployed to an endpoint that scores each new claim (deployment), and monitored for drift and retrained every quarter with Agent Platform Pipelines (management).

How the exam asks about this

  • A learning situation is described and you choose the approach.
  • A lifecycle stage is described and you name it, or choose the Google Cloud tool for it.
  • "What happens after a model is deployed?" It is monitored and managed, and retrained when it drifts.

What to remember for the exam

  • Supervised: labeled data, predict known outcomes. Unsupervised: unlabeled data, find structure. Reinforcement: learn from rewards.
  • Lifecycle: ingestion, preparation, training, deployment, management, then back again.
  • Agent Platform covers training, deployment and management; BigQuery and Cloud Storage cover data.
  • Foundation models shorten the training stage but do not remove the rest of the lifecycle.
Watch out

"Deployed" is not "done". Without monitoring, model quality falls silently as data changes.

Common mistakes

Calling clustering supervised. Clustering finds groups without labels, so it is unsupervised.

Forgetting data preparation. It is usually the largest part of the work.

Treating the lifecycle as one pass. It is a continuous loop.

Check yourself

  • Which ML approach learns from labeled examples?

    Supervised learning.

  • Name the five stages of the ML lifecycle.

    Data ingestion, data preparation, model training, model deployment and model management.

  • Which approach learns by receiving rewards for actions?

    Reinforcement learning.

Topic 2 of 6 in Fundamentals of gen AI

Test yourself on Fundamentals of gen AI

The full Google Cloud Generative AI Leader question bank has 512 questions, with timed practice exams and an explanation for every answer.

This study guide is independent and is not affiliated with, endorsed by, or sponsored by Google Cloud. Vendor names, certification names and exam codes are trademarks of their respective owners and are used for identification only.